Skip to main content
Glama

build_retry_prompt

Generates retry feedback prompts from prior attempts, appending validation errors to guide LLM towards correct structured output.

Instructions

Given an attempt history, produce the retry feedback message agentcast would append to the conversation when the model returned the wrong shape. Codifies the "validation error as feedback" pattern for non-Node MCP clients.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
attemptsYesList of prior attempts. Each item should have the assistant text plus either a parsed value or an error string.
expected_shapeNoOptional agentcast shape spec to include in the feedback for extra grounding.
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool generates a retry feedback message, but does not detail the output structure, side effects (assumed none), or error behavior. Lacks specifics beyond the basic action.

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?

Two concise sentences. The first front-loads the main action, the second adds context. No redundant or unnecessary words.

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

Completeness3/5

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

The description explains the type of input (attempt history) and the pattern it codifies, but fails to mention the output format or any return value. Given the nested parameters and no output schema, the description is incomplete for full context.

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 description coverage is 100%, providing detailed explanations for both parameters (attempts, expected_shape). The description adds contextual value by framing the tool's purpose as retry feedback, but does not introduce new parameter semantics beyond what the schema offers. Baseline of 3 is appropriate.

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: 'produce the retry feedback message' for when the model returned the wrong shape. It specifies the context (non-Node MCP clients) and distinguishes it from siblings (extract_json and validate_response) which focus on extraction or validation, not feedback generation.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool versus alternatives. The description does not mention when-not to use it or provide comparisons to sibling tools. It only implies the scenario (validation error pattern) but lacks direct usage directives.

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/MukundaKatta/agentcast-mcp'

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