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.
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) |