recover_agent_output
Recover and validate broken structured output from LLMs and AI agents. Extract JSON hidden in prose or Markdown, repair malformed JSON, enforce a supplied JSON Schema, safely coerce optional types/defaults, report exact validation errors, and return a deterministic retry prompt when output still fails. Useful for tool calls, agent workflows, automation pipelines, and API integrations. Price: $0.01 USDC. An unpaid call returns an x402 PaymentRequired tool result and does not run the tool. Payment is verified and settled before the tool runs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | No | Optional JSON Schema Draft 2020-12 used to validate the recovered value. | |
| options | No | ||
| rawOutput | Yes | Raw LLM or AI-agent output. Prose, Markdown fences, and malformed JSON are accepted. |