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.
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": {
"attempts": "<attempts>"
},
"name": "build_retry_prompt"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| attempts | Yes | List of prior attempts. Each item should have the assistant text plus either a parsed value or an error string. | |
| expected_shape | No | Optional agentcast shape spec to include in the feedback for extra grounding. |