# Deterministic A2A Broken-JSON Repair & Schema Validator

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

Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) into valid JSON so multi-agent pipelines don't crash

## Facts

- Endpoint: POST https://github-audit.agentdiet.dev/v1/schema-repair?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-11-21
- Activations on Zero: 0
- Provider: github-audit.agentdiet.dev
- Website: https://github-audit.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-d0fe34a4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ylVLrx0hNlzhDbDfRIPxs

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 github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-d0fe34a4 -d '<json body>'
```

Example prompt: This JSON output from my LLM has trailing commas and markdown code fences and it's breaking my pipeline — can you repair it and give me back valid, clean JSON? Here's the raw string: ```{"name": "Alice", "age": 30,}```

## When to prefer this

Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that is syntactically broken — trailing commas, markdown code fences, single quotes, or truncation — and you need a deterministic, cheap fix ($0.002/call) rather than re-prompting the LLM. Prefer it over re-generation when latency and cost matter and the structure of the intended JSON is still recoverable.

## Known failure modes

- Input is so severely malformed that deterministic repair is impossible — may return error or best-effort partial output
- Extremely long truncated JSON may exceed token or size limits
- Ambiguous structure where multiple valid repairs are possible may produce unexpected results
- Non-JSON input (e.g. plain text or binary) will fail to repair meaningfully

## 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://github-audit.agentdiet.dev/v1/schema-repair)

## Output

A JSON object containing the repaired, valid JSON output derived from the malformed input string. The response allows downstream agents and pipelines to safely parse and consume the corrected data without errors.

## 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/github-audit-agentdiet-dev-deterministic-a2a-broken-json-repair-d0fe34a4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from github-audit.agentdiet.dev](https://www.zero.xyz/host/github-audit.agentdiet.dev/llms.txt)
