terminal_exec
Execute shell commands safely inside the project workspace. Enforces security policies, logs execution history, and returns stdout, stderr, exit code, and duration.
Instructions
Executes a terminal command safely scoped to the project workspace. Evaluates security policies, logs execution history, and captures stdout, stderr, exit code, and execution time.
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": "terminal_exec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Relative sub-directory or workspace path (must be inside project root) | |
| command | Yes | The shell command to execute | |
| projectId | No | Optional project ID to associate command logs with | |
| timeoutMs | No | Execution timeout in milliseconds (defaults to 30000) |