# Deterministic A2A Broken-JSON Repair & Schema Validator

> Deterministic A2A Broken-JSON Repair & Schema Validator is a paid API for AI agents from arxiv-digest.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://arxiv-digest.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: arxiv-digest.agentdiet.dev
- Website: https://arxiv-digest.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/arxiv-digest-agentdiet-dev-deterministic-a2a-broken-json-repair-feed9c29
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_FWLLLo8sXKTNjwCKOAZL9

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 arxiv-digest-agentdiet-dev-deterministic-a2a-broken-json-repair-feed9c29
```

Example prompt: The LLM just returned this broken JSON with trailing commas and markdown code fences — can you repair it so it's valid and parseable: ```json {"name": "Alice", "age": 30,} ```?

## When to prefer this

Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails to parse due to common formatting issues like trailing commas, markdown fences, or single quotes, and you need a deterministic (non-AI) repair rather than asking another LLM to fix it. Especially useful in production pipelines where reliability and reproducibility matter more than flexibility.

## Known failure modes

- JSON too severely corrupted to deterministically repair — returns error or best-effort partial output
- Empty or null raw_json input — returns validation error
- Input is already valid JSON — may return as-is or confirm validity
- Non-JSON input passed (e.g. plain text) — may return error or attempt coercion

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

## Output

Returns a repaired, valid JSON object that has been cleaned of common LLM output artifacts such as trailing commas, markdown code fences, single quotes instead of double quotes, and truncation issues — ready to parse and use downstream 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/arxiv-digest-agentdiet-dev-deterministic-a2a-broken-json-repair-feed9c29/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from arxiv-digest.agentdiet.dev](https://www.zero.xyz/host/arxiv-digest.agentdiet.dev/llms.txt)
