run_command
Executes local shell commands and returns stdout, stderr, and exit code, so agents can inspect system state or automate tasks. Supports working directories, stdin, timeouts, and tmux sessions.
Instructions
Execute a shell command locally. Returns stdout, stderr, and exit code.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"command": "<command>"
},
"name": "run_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory (default: home) | |
| stdin | No | Optional string to pipe to command stdin | |
| command | Yes | The shell command to execute | |
| session_id | No | If provided, run inside this tmux session | |
| timeout_ms | No | Timeout in ms (default 30000, max 300000) |