Skip to main content
Glama

decompose_prompt

Decompose any raw prompt into structured semantic blocks (role, objective, context, constraints) for editing or recompilation.

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
Behavior3/5

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

With no annotations, the description carries full burden. It discloses the AI vs heuristic behavior and that the return value includes both a summary and full JSON. However, it does not mention limitations like prompt size, rate limits, or error conditions, leaving some gaps.

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

Conciseness4/5

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

The description is concise and front-loaded with the main action. It uses a clear two-paragraph structure. The 'Args' and 'Returns' sections add minor redundancy but overall the text is efficient and focused.

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

Completeness4/5

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

Given the tool's simplicity (one param, output schema exists), the description covers the key points: how it works (AI vs heuristic), what it produces (structured blocks), and how to use the result (edit or pass to compile_prompt). It does not list block types but references a sibling tool, which is acceptable.

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

Parameters3/5

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

Schema coverage is 0%, so description must compensate. It adds 'The raw prompt string to decompose', which clarifies the parameter's role. However, this is minimal—no examples, length constraints, or formatting hints. For a single simple parameter, this is adequate but not exemplary.

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 tool's purpose: 'Decompose a raw prompt into structured blocks'. It specifies the action (decompose) and resource (raw prompt), and hints at the output format. This distinguishes it from siblings like compile_prompt, which does the reverse.

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

Usage Guidelines4/5

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

The description mentions when to use AI vs heuristic fallback based on configuration, and suggests the output is 'ready to edit or pass to compile_prompt'. It does not explicitly state when not to use, but the sibling context and the decomposition vs compilation contrast provide adequate guidance.

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