bash_exec
Execute shell commands with configurable timeout and working directory, returning combined output and exit code.
Instructions
Execute a shell command and return its combined output.
Streams each stdout/stderr line as a tool_execution_update event on
the per-task event stream when a task context is available (i.e. the
server was started with a bound session_id linked to a task).
Parameters
command: Shell command string (passed to /bin/sh -c or cmd.exe /c). cwd: Working directory. Defaults to the server process cwd. timeout: Wall-clock timeout in seconds (default 300). Pass null for no limit (use with care on long-running commands).
Returns
{"output": str, "exit_code": int, "timed_out": bool}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | ||
| cwd | No | ||
| timeout | No |