shell_exec
Run shell commands on the local host with configurable timeout, output size, working directory, and optional shell usage. Supports stdin input and stderr merging.
Instructions
Run a shell command on the local host and return its combined output.
Timeout and output size are clamped to the server limits. Set
use_shell=false to exec an argv without a shell.
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": "shell_exec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | ||
| timeout | No | ||
| max_output | No | ||
| cwd | No | ||
| stdin | No | ||
| merge_stderr | No | ||
| use_shell | No | ||
| env_json | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |