Skip to main content
Glama

decompose_prompt

Break down raw prompts into structured components like role, objective, context, and constraints for clearer AI interactions and easier editing.

Instructions

Decompose a raw prompt into structured blocks (role, objective, context, constraints, etc.).

Uses AI (Claude/OpenAI) if an API key is configured on the server, otherwise
falls back to keyword-based heuristic analysis.
Returns a JSON list of blocks ready to edit or pass to compile_prompt.

Args:
    prompt: The raw prompt string to decompose.

Returns:
    A summary of extracted blocks + the full JSON to pass to compile_prompt.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden and discloses key behavioral traits: it uses AI (Claude/OpenAI) if an API key is configured, otherwise falls back to heuristic analysis. It also describes the return format ('JSON list of blocks' and 'summary'), which is valuable context not covered by annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded: the first sentence states the core purpose, followed by implementation details and usage context. Every sentence adds value without redundancy, making it efficient and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (1 parameter, no annotations, but with output schema), the description is complete enough. It explains the purpose, usage, behavior, and output, and since an output schema exists, it doesn't need to detail return values further, covering all necessary context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It adds meaning by explaining that the 'prompt' parameter is a 'raw prompt string to decompose', clarifying its purpose beyond the schema's basic type. However, it doesn't detail constraints like length or format, leaving some gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('decompose') and resource ('raw prompt'), transforming it into 'structured blocks (role, objective, context, constraints, etc.)'. It distinguishes from sibling tools by specifying the output is ready for 'compile_prompt' or editing, unlike 'list_block_types' which likely lists types without decomposition.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly states when to use this tool: to decompose a raw prompt into structured blocks for editing or passing to 'compile_prompt'. It distinguishes from alternatives by mentioning the fallback to keyword-based analysis if no AI API is configured, though it doesn't name specific alternatives beyond implied ones.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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