shell_command
Run a shell command in the configured workspace and wait for its completion. Handles standard input, environment variables, and timeouts for quick local tasks.
Instructions
Run a shell command inside the configured workspace root and wait for it to finish. Use start_process for anything long-running.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Environment variables merged over the server environment. | |
| shell | No | ||
| stdin | No | Text written to the command standard input, which is then closed. | |
| command | Yes | Command to execute. | |
| workdir | No | Absolute path or path relative to the default workspace. | |
| on_timeout | No | Terminate on timeout (default), or keep running as a managed background process. | |
| timeout_ms | No | Timeout in milliseconds. | |
| expect_exit_code | No | Expected exit code; a different result is reported as an error. | |
| max_output_bytes | No | Maximum combined stdout/stderr bytes (1024-4194304). |