Documentation
¶
Overview ¶
Package retry defines shared types and helpers for producing standardized retryable errors and compact repair prompts used across generated clients.
Generated clients wrap transport errors for invalid parameters into RetryableError with a Prompt intended for LLM-driven correction. The LLM is expected to redo the same operation (e.g., JSON-RPC tools/call for MCP tools) with valid parameters based on the prompt constraints.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildRepairPrompt ¶
BuildRepairPrompt constructs a deterministic, compact repair instruction. schema is an optional compact JSON schema excerpt; exampleJSON is a minimal valid example of the params payload.
Types ¶
type RetryableError ¶
RetryableError is returned by clients when the server reports invalid parameters and a structured repair prompt is available.
Prompt is human-readable and designed for LLM-driven correction. Typical flow:
- Present Prompt to the LLM
- Capture the JSON-only corrected params
- Decode into the operation payload type
- Retry the same operation
func (*RetryableError) Error ¶
func (e *RetryableError) Error() string
Error returns the error message.