# The agent decides when to run it. The script decides exactly what happens.

Script tools are TypeScript tools the Risotto Assistant writes for you. Each runs the same steps in the same order, every time, in a sandbox that holds no credentials. Put one in a runbook: the AI agent decides when to run it, the code decides what happens. See it as a flow chart, test it on your real systems, and choose who approves what it changes.

[Book a demo](/demo)

## Describe the job. The Assistant writes the tool.

In Script Studio, brief the Assistant like a teammate: "When someone leaves, end their Okta sessions, suspend Google Workspace and move their files to their manager." It writes the TypeScript, names each step and draws the flow chart from the code.

- **It uses what you already connected:** Okta, Google Workspace, Jamf, Intune, Slack, your custom API tools and MCP servers, plus Risotto's own people and ticket actions.
- **Every save is checked**, so a tool can only call systems you've connected and write only to hosts you allow.
- **Start from a template** for license seat alerts, on-call paging with the requester's manager, or a service health sweep, or publish your team's own. [Browse the library](/library)
- **The code is there when you want it**, in the browser with autocomplete for every connected tool.

Moving off Okta Workflows, Zapier or Tines? Describe the flow you have today, and the Assistant rebuilds it as a script tool you can test.

## Run it inside a runbook

In a runbook, Risotto's AI agent uses judgment: it reads the request, asks what it needs and picks the next step. Some steps shouldn't be a judgment call. Add a script tool and the agent decides when to run it and with which inputs; the code then runs every step, in order, with no improvising.

- **One approval for the whole job**, in Slack or Teams.
- **One tool, everywhere.** Runbooks, [automations](/product/automations) triggered by Okta, HR, ticket or schedule events, access rules, the Assistant, and Claude or any MCP client all call the same published tool.
- **It reports back**, so the agent can reply to the employee and close the ticket.

## The script that grants access is the one that removes it

Attach a script tool to a Risotto access rule, and it grants and removes access in apps your identity provider can't provision. It runs once the request is approved, and again when access ends: on its end date, or when someone revokes it.

Your script asks for the facts it needs from a short list: the recipient's email, their other email addresses, their name and the access rule's name. Risotto sends only those, and the rule pins the rest, like the Sentry org, role and team. Each grant keeps the tool and pins it ran with, so the removal acts on the same org and team even if you change the rule in between. And Risotto won't publish a version that would break a rule using the script, or the removal of access it already granted.

[Access requests](/product/access-requests) · [The Sentry org access script](/library/script-tools/sentry-org-access)

## Test on real systems. See every step.

Test runs call your real systems, so you know the tool works before an agent uses it. Risotto lists every change a test will make before it starts.

- **The flow chart is the trace:** when each step ran, how long it took and where a run stopped.
- **Every run is recorded**, from tickets, access rules, automations, the Assistant, MCP clients and tests, with its step trace, for 90 days. A run from an access rule also leaves its result as an internal comment on the ticket.
- **Every publish is a version.** Agents run only the published version, and you can restore any earlier one.

## Locked down by design

The safeguards live in the platform, not in a prompt.

- **A fresh sandbox for every run**, with no network, file access or environment variables.
- **Credentials never enter the sandbox.** Tool calls run inside Risotto with each tool's own credentials, and secrets are stripped from traces.
- **Only the hosts you list.** Read-only hosts get GET requests only; anything else is refused before it leaves.
- **Writes need approval**, including opening or commenting on a ticket. On an access rule, the rule's approval stands in for the tool's, and the dashboard flags it.
- **Approvals match the code.** A tool's approval covers only the version the approver saw.
- **Runs keep the caller's permissions.** A run from the Assistant or an MCP client can do no more than the person or API key behind it.

[Security and trust](/security)

## When to use a script tool

| | Runbook step in plain English | Script tool | Code Mode |
|---|---|---|---|
| Best for | Work that needs judgment: troubleshooting, questions, collecting details | A fixed sequence across systems: offboarding, a device lock, a group sync | A one-off bulk job: a report, a CSV, a batch of changes |
| Who decides each step | The AI agent | The code | The code, written for that one job |
| Who can run it | The AI agent | Runbooks, automations, access rules, the Assistant, MCP clients | The Assistant, in your conversation |
| Changes need approval | Where your policy says | For writes through your tools; on an access rule, the rule's approval | Yes, before the code runs |

> "We wanted to implement more standardization and automation in our help desk, but there wasn't an easy way in Slack without clunky custom work. Risotto helped us do that." — Vergil Smith, IT Manager, Vidyard

## Frequently asked questions

### What is a script tool in Risotto?

A TypeScript tool that Risotto's Assistant writes and IT publishes. It runs a fixed sequence of steps across systems such as Okta, Google Workspace, Jamf and Slack, the same way every time, from runbooks, automations, access rules, the Assistant or MCP clients.

### Can I build a script tool without knowing TypeScript?

Yes. Describe what the tool must do, and the Assistant writes it, draws the flow chart and tests it with you. The code is there for anyone who wants to read or change it.

### How is a script tool different from a runbook?

A runbook tells Risotto's AI agent how to handle a type of request, using judgment along the way. A script tool is one step the agent calls, where the code decides what happens. Most teams use both: the runbook handles the conversation, the script tool does the exact work.

### Is it safe to let AI-written code change Okta or Google Workspace?

Yes. Risotto runs each script tool in a fresh sandbox with no network access and no credentials. Every call goes through Risotto, only to the tools and hosts the code names. Writes need approval, and a tool's approval covers only the version the approver saw. When an access rule runs the script, the rule's approval applies instead, and Risotto won't publish a version that would break that rule. [Security and trust](/security)

### Which systems can a script tool use?

Any tool connected to Risotto: native integrations such as Okta, Google Workspace, Jamf, Intune and Slack, custom API tools and MCP servers, plus HTTP APIs on the hosts it lists and Risotto's own people and ticket data. [Integrations](/integrations)

### Can I move a workflow from Okta Workflows, Zapier or Tines?

Yes. Describe the workflow to the Assistant, and it rebuilds it as a script tool you test in Script Studio before you publish.

## Make your most important workflows run the same way every time

[Book a demo](/demo)

Source: https://www.tryrisotto.com/product/script-tools
