run
Execute shell commands without a shell and get parsed JSON, including piped output, row filtering/sorting, large-result pagination, and control of long tasks and services.
Instructions
Run a command without a shell and get parsed JSON. Pass the whole line as command (pipes to grep/head/tail/wc/sort/uniq/cut work). Large results return a preview, result_id and _hint; continue with query_result. Commands pass an execution guard. mode starts tasks and services; task_id reads or stops them.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cmd | No | Executable, when passing args separately | |
| cwd | No | Working directory | |
| args | No | ||
| mode | No | task: long command, returns task_id. service: start a server and wait until ready | |
| limit | No | ||
| where | No | [{field, op: eq|ne|prefix|contains|gt|gte|lt|lte, value}] | |
| cancel | No | ||
| select | No | Fields to keep per row | |
| command | No | Whole command line, e.g. "git log --oneline -5" or "ps aux | grep node | head -5" | |
| options | No | Advanced: format, include_raw, includeDiff, array, aggregate, budget, contract_version, evidence, retain, machine_format, attribution, ready_pattern, ready_port, lease_ms, persist, page, page_size. See describe().run_options | |
| sort_by | No | ||
| task_id | No | Read (wait_ms) or stop (cancel) a task or service | |
| wait_ms | No | Capped at 30000 |