# Deterministic A2A Broken-JSON Repair & Schema Validator

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

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

## Facts

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

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 email-verify-agentdiet-dev-deterministic-a2a-broken-json-repair-f84258f5 -d '<json body>'
```

Example prompt: This JSON string came back from an LLM and it's broken — it has trailing commas, single quotes, and a markdown code fence wrapping it. Can you repair it into valid JSON so my pipeline can continue?

## When to prefer this

Choose this endpoint when you need deterministic, rule-based JSON repair rather than LLM-based re-generation — particularly in high-throughput multi-agent pipelines where consistency and auditability matter. Ideal when the malformed JSON comes from LLM outputs with known failure patterns (trailing commas, markdown fences, single quotes, truncation) and you need a cheap ($0.002/call), fast, idempotent fix without re-querying a large model.

## Known failure modes

- JSON is so severely malformed it cannot be deterministically repaired — returns error indicating unrecoverable input
- Input is empty or does not contain any JSON-like structure — returns validation error
- Ambiguous truncation where multiple valid completions exist — may return best-effort repair with caveat
- Network or payment (x402) failure — endpoint returns 402 or 5xx

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

## Output

Returns a JSON object containing the repaired, valid JSON — free of trailing commas, markdown fences, single quotes, and truncation artifacts — suitable for direct parsing and use in downstream pipeline steps.

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