ask_claude_code
Run prompts through Claude Code headlessly in a selected profile and return the answer; enable edits only for file changes, with session IDs for terminal handoff.
Instructions
Run a prompt through Claude Code headlessly in a profile and return the answer.
Set allow_edits only when the user has asked for files to be changed. The returned session_id can be passed to handoff_to_terminal to continue the same session on screen.
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": "ask_claude_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| profile | No | ||
| allow_edits | No |