# 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/schema-repair?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-92fe9d31
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BCtUE4llPnFzVQ_BkyF65

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-92fe9d31
```

Example prompt: This JSON string from the LLM has trailing commas and markdown code fences and it's crashing my pipeline — can you repair it so it's valid JSON I can actually use: ```json {"name": "Alice", "age": 30,} ```

## When to prefer this

Choose this endpoint when you need deterministic, rule-based JSON repair for LLM outputs in automated pipelines — specifically when dealing with trailing commas, markdown code fences, single quotes, or mild truncation. Prefer this over LLM-based JSON re-generation when you need speed, cost efficiency ($0.002/call), and reproducibility. Best suited for multi-agent orchestration scenarios where downstream steps require guaranteed-valid JSON.

## Known failure modes

- Input is so severely malformed that structure cannot be inferred — returns error indicating unrecoverable JSON
- Empty or null raw_json parameter — returns validation error
- Input is not JSON-like at all (plain text, binary) — may return error or best-effort result
- Extremely long truncated JSON where inferred closing structure may be incorrect

## 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/schema-repair)

## Output

Returns a repaired, valid JSON object with the original structure preserved but all malformations fixed — including trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed.

## 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-92fe9d31/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)
