claude_run
Run a Claude Code task from an MCP-compatible agent, optionally as a managed background job with status, result, and cancellation controls.
Instructions
Run a Claude Code task. Set background to true to return a job ID immediately; use claude_status, claude_result, and claude_cancel to manage it.
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": {
"prompt": "<prompt>"
},
"name": "claude_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory. Defaults to the server working directory. | |
| model | No | Optional per-invocation model override. | |
| effort | No | Optional Claude CLI reasoning effort for this invocation. | |
| prompt | Yes | Task for Claude Code. | |
| background | No | Run as a managed background job. | |
| timeout_ms | No | ||
| review_model | No | Optional model override for the review only. | |
| allowed_tools | No | ||
| max_budget_usd | No | ||
| permission_mode | No | Defaults to manual. | |
| review_after_run | No | Override the configured review hook for this invocation. |