bash_exec
Execute bash commands and retrieve stdout, stderr, exit code, and duration. Supports custom working directories, timeouts, and environment variables.
Instructions
Execute a bash command and return stdout, stderr, exit code, and duration.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | The bash command to execute | |
| cwd | No | Working directory (defaults to server's cwd) | |
| timeout | No | Timeout in seconds (default 30, max 600) | |
| env | No | Additional environment variables to set |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stdout | Yes | Command standard output | |
| stderr | Yes | Command standard error | |
| exit_code | Yes | Exit code (124 = timeout) | |
| duration_ms | Yes | Execution time in milliseconds |