claude_prompt_with_context
Execute Claude Code prompts with added context or file contents to generate coding responses in headless, stateless mode.
Instructions
Run a one-shot prompt against the Claude Code CLI in headless, stateless mode, with additional free-form context and/or file contents prepended to the prompt. Returns the model's text response. Uses the server process's current working directory; file paths are resolved relative to cwd.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | The user prompt to send to Claude Code. | |
| context | No | Optional free-form context text to prepend to the prompt. | |
| files | No | Optional list of file paths whose contents will be read and prepended to the prompt as labeled context blocks. | |
| model | No | Optional Claude model alias or full name (e.g. 'sonnet', 'opus'). | |
| system_prompt | No | Optional system prompt to use for this turn. |