# Deterministic A2A Broken-JSON Repair & Schema Validator

> Deterministic A2A Broken-JSON Repair & Schema Validator is a paid API for AI agents from llms-generator.agentdiet.dev, paid per call via MPP, $0.002/call, status unknown (last checked 2026-10-21).

Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash

## Facts

- Endpoint: GET https://llms-generator.agentdiet.dev/v1/llm-json-schema-healer?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Provider: llms-generator.agentdiet.dev
- Website: https://llms-generator.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/llms-generator-agentdiet-dev-deterministic-a2a-broken-json-repair-a6661976
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pm8bCthUezFKxjFL2JLtz

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability llms-generator-agentdiet-dev-deterministic-a2a-broken-json-repair-a6661976
```

Example prompt: This JSON came back from the LLM with trailing commas and markdown fences and it's crashing my pipeline — can you repair it into valid JSON? Here's the raw string: ```{"name": "Alice", "age": 30,}```

## When to prefer this

Choose this endpoint when an AI agent or multi-agent pipeline receives LLM-generated JSON that fails to parse due to common syntax issues like trailing commas, markdown code fences, single quotes, or truncation. It is purpose-built for deterministic, rule-based repair rather than LLM-based re-generation, making it faster, cheaper, and more predictable for high-volume pipeline use. Prefer it over manually parsing or re-prompting the LLM when you need a reliable, low-latency fix that won't hallucinate structure.

## Known failure modes

- Input JSON too severely malformed to deterministically repair — returns error or best-effort partial output
- Ambiguous truncation points where the intended structure cannot be inferred — may produce structurally valid but semantically incorrect JSON
- Empty or whitespace-only raw_json input — returns validation error
- Input too long or deeply nested — may time out or return partial repair
- Non-JSON input (e.g. plain text, XML) passed as raw_json — may fail or return unexpected output

## How this service works

Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash. (Live x402 v2, IETF MPP & MCP endpoint at https://llms-generator.agentdiet.dev/v1/llm-json-schema-healer)

## Output

A repaired, valid JSON object with all syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for downstream parsing in an agent pipeline.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "raw_json"
 ],
 "properties": {
  "raw_json": {
   "type": "string",
   "minLength": 1,
   "description": "Malformed, truncated, or markdown-wrapped JSON string to deterministically repair"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/llms-generator-agentdiet-dev-deterministic-a2a-broken-json-repair-a6661976/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from llms-generator.agentdiet.dev](https://www.zero.xyz/host/llms-generator.agentdiet.dev/llms.txt)
