execute_command
Execute shell commands securely with output capture, working directory, and timeout control.
Instructions
Execute a shell command and return its combined stdout+stderr output.
Uses PowerShell on Windows, bash/zsh on Linux/macOS. The command is checked against the security blacklist before execution. Output is captured and returned as a string (truncated if too large).
Returns the combined output. On non-zero exit code, output includes the exit code so the caller can detect failures.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | Shell command to execute. Use PowerShell syntax on Windows. | |
| working_directory | No | Working directory for the command. Defaults to user home. | |
| timeout_seconds | No | Timeout in seconds. 0 = use configured default. | |
| environment | No | Additional environment variables as a dict. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |