Shell
shellExecute terminal commands to run tests, type checks, builds, git, and file listing or searching; use file tools for reading or editing files.
Instructions
Run a shell command and return its output; a failed command starts with its exit code, and stderr is labelled when there is any. Use it for tests, type checks, builds, git, and to list and search files (ls, find, grep). Do NOT use it to read, write or edit files (use the file tools), for interactive commands (stdin is closed), for commands that never exit (dev servers, watch modes), or for destructive ones (rm -rf, git reset --hard, force pushes) unless the user asked. Each call is a fresh process, so cd does not persist: use cwd (default: the server's working directory). The command and its child processes are killed after timeoutMs. Output past 20000 characters keeps its start and end; binary output becomes a short note.
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"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Directory to run the command in. Defaults to the server's working directory. | |
| command | Yes | The command to run, for example 'ls -lh' or 'git status'. | |
| timeoutMs | No | Kill the command after this many milliseconds (at most 2147483647). Defaults to 30000; 0 disables the timeout. |