exec
Run shell commands on the host system, capturing stdout, stderr, exit code, and timeout status. Commands are subject to rate limits and safety blocks for destructive patterns.
Instructions
Execute a shell command on the host system and return its output. Runs the command in a non-interactive shell and captures both stdout and stderr. The response includes the exit code, a timed-out flag, and the full stdout/stderr output. Commands are subject to rate limiting (default 60/min) and a configurable execution timeout. Certain destructive patterns (e.g. rm -rf /, mkfs, dd if=) are always blocked. When the server runs in sandbox mode, network tools (curl, wget), package managers, and process-control commands are also blocked. Sudo commands require the server to be started with ALLOW_SUDO=true. Use this tool for running CLI commands, scripts, build tasks, inspecting the environment, or any operation that can be expressed as a shell one-liner or pipeline.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | The shell command to execute. Can be a single command (e.g. `ls -la`), a pipeline (e.g. `cat file.txt | grep pattern`), or a compound expression (e.g. `cd /tmp && ls`). The command is passed to the system shell for interpretation. Must not be empty. |