# 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-generated JSON (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash on bad output.

## Facts

- Endpoint: GET https://llms-generator.agentdiet.dev/v1/malformed-json-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-78051e63
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_usln8Sv24jSTh9ayNT0tT

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-78051e63
```

Example prompt: This LLM output came back with markdown fences, trailing commas, and single quotes — can you repair it into valid JSON so I can pass it to the next step? Here's the broken string: ```{'name': 'Alice', 'age': 30,}```

## When to prefer this

Use this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails standard JSON.parse due to common formatting issues like trailing commas, markdown fences, or single quotes. Ideal for agent orchestration layers that need deterministic, rule-based repair rather than probabilistic LLM re-prompting. Prefer over re-querying the LLM when you need fast, cheap, and deterministic correction.

## Known failure modes

- JSON too malformed to deterministically repair — returns error indicating repair failure
- Empty or missing raw_json parameter — returns validation error
- Input string is not JSON-like at all — may return error or empty object
- Extremely long truncated JSON may fail structural inference

## 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/malformed-json-healer)

## Output

Returns a repaired, valid JSON object that has been corrected for common LLM output issues including trailing commas, markdown code fences, single-quote delimiters, and truncation — ready for safe downstream consumption in agent pipelines.

## 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-78051e63/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)
