Skip to main content
Glama

compile_prompt

Transforms structured JSON blocks into Claude-optimized XML prompts with token estimates for AI interactions.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blocks_jsonYes

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Nyrok/flompt'

If you have feedback or need assistance with the MCP directory API, please join our Discord server