execute
Execute code in multiple languages to test hypotheses before implementation, supporting both code snippets and shell commands with auto-runtime detection.
Instructions
Execute code in JS/TS, Go, Rust, Python, C, C++, or bash with auto-runtime detection. Primary tool for testing hypotheses before implementation. Supports both code snippets and shell commands.
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": {
"workingDirectory": "<workingDirectory>"
},
"name": "execute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workingDirectory | Yes | Path to working directory for execution. | |
| code | No | Code to execute. Include timeouts for network/async operations to prevent hangs. | |
| commands | No | Bash commands (single or array for planned batch executions) | |
| runtime | No | Execution runtime (default: auto-detect) | |
| timeout | No | Timeout in milliseconds (default: 240000) |