compile_prompt
Takes a JSON list of prompt blocks and compiles them into a structured XML prompt ready for Claude, including a token estimate.
Instructions
Compile a list of blocks into a Claude-optimized structured XML prompt.
Takes the JSON returned by decompose_prompt (or manually crafted blocks)
and produces a ready-to-use XML prompt with a token estimate.
Args:
blocks_json: JSON-stringified list of blocks.
Each block: {"type": "role|objective|...", "content": "...",
"label": "...", "description": "...", "summary": ""}
Returns:
The compiled XML prompt with token estimate.
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": {
"blocks_json": "<blocks_json>"
},
"name": "compile_prompt"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| blocks_json | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |