ctx_run
Run allowlisted commands such as tests, builds, type checks, and read-only git without a shell, returning distilled errors, failures, and summaries while keeping full output for expansion.
Instructions
Run an allowlisted command (tests, builds, type checks, read-only git) without a shell and return distilled output: errors and failures with their context, a summary for known formats, repeated lines folded, head and tail. The full output is kept under a handle for ctx_expand. Commands not on the allowlist are refused.
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": "ctx_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory relative to the project root (default: the root). | |
| args | No | Arguments, one per element, e.g. ["test", "--", "auth"]. | |
| command | Yes | Program name only, e.g. "npm", "git", "pytest". No shell syntax. | |
| timeout_ms | No | Kill the command after this long. | |
| budget_tokens | No | Hard cap on the tokens returned (estimate; default 800). |