Overview
Therun 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
| Parameter | Type | Required | Description |
|---|---|---|---|
script | string | Yes | TypeScript code to execute in the sandbox |
Annotations
destructiveHint: true— scripts can call destructive toolsopenWorldHint: true— scripts interact with external services
Sandbox environment
Scripts have access to:tools.*— typed namespace of all tools available to the user’s roletools.search({ query, limit? })— discover tools by keywordtools.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 anExecutionResult object:
When a destructive tool requires approval
If the script calls a destructive tool, execution pauses and the result includes apaused field:
resume tool with the executionId to approve or deny the action.