Skip to main content

Overview

The run tool executes a TypeScript script inside an isolated sandbox. Scripts have access to the tools.* proxy namespace for calling tools, discovering tools, and inspecting tool schemas.

Input

Annotations

  • destructiveHint: true — scripts can call destructive tools
  • openWorldHint: true — scripts interact with external services

Sandbox environment

Scripts have access to:
  • tools.* — typed namespace of all tools available to the user’s role
  • tools.search({ query, limit? }) — discover tools by keyword
  • tools.describe.tool({ path }) — get full schema for a tool

Calling tools

Tools are invoked using property-chain syntax that mirrors the tool path:

Discovery inside scripts

Output

Returns an ExecutionResult object:

When a destructive tool requires approval

If the script calls a destructive tool, execution pauses and the result includes a paused field:
Call the resume tool with the executionId to approve or deny the action.