execute_script
Run Starlark scripts with all tools as built-in functions. Execute code once in a sandbox and return only the 'result' variable, reducing cost compared to sequential tool calls.
Instructions
Run a Starlark (Python-subset) script with all tools as built-in functions. Intermediate results stay in the sandbox; only result variable is returned. Much cheaper than sequential tool calls.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>"
},
"name": "execute_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Starlark source. Set `result` variable for output. | |
| timeout | No | Max seconds (default: 60) |