Cmdshell
cmdshellRuns a restricted set of Linux/Unix commands with validated arguments to support controlled local automation without full shell access.
Instructions
Runs one of the configured Linux/Unix commands.
Allowed commands: ["ls", "pwd", "date", "cat", "grep", "egrep", "whoami", "head", "tail", "sed", "wc", "file", "du", "df", "free", "ps", "uname", "hostname", "uptime", "w", "last", "mkdir", "cp", "mv", "awk", "jq"] Arguments are checked with _local_path_error: empty arguments are allowed; absolute paths and paths containing a '..' component are rejected.
Args: command: The command name (for example, 'ls'). It must be in the allowed commands list. args: A list of command arguments/flags (for example, ['-la', '.txt']). Put a glob in double quotes (for example, ['".txt"']) to pass it literally instead of expanding it into filenames. Pipes and redirects are not allowed.
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": "cmdshell"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | ||
| command | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |