# Deterministic A2A Broken-JSON Repair & Schema Validator

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

Deterministically repairs malformed, truncated, or markdown-wrapped LLM JSON outputs so multi-agent pipelines can parse them without crashing

## Facts

- Endpoint: GET https://cve-intel.agentdiet.dev/v1/repair?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Provider: cve-intel.agentdiet.dev
- Website: https://cve-intel.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/cve-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-6a1c8471
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_O57Xeo5S8vw-BBDQ_1fbU

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 cve-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-6a1c8471
```

Example prompt: The LLM just returned this broken JSON string with trailing commas and markdown code fences — can you repair it into valid JSON I can parse? Here's the raw output: ```{"name": "test", "value": 42,}```

## When to prefer this

Choose this endpoint when you need deterministic, rule-based JSON repair (not heuristic or ML-based) for LLM outputs in automated multi-agent pipelines where reliability and predictability matter most. Ideal when you encounter trailing commas, markdown fences, or single-quote JSON from language models and need a fast, cheap ($0.002/call) fix before passing data downstream.

## Known failure modes

- Input JSON is too severely malformed to repair deterministically — returns error indicating unrecoverable syntax
- Input is not JSON at all (e.g. plain prose) — may return error or unexpected output
- Extremely long truncated payloads may not be restorable to original intent
- Missing required raw_json parameter returns 400 or validation error
- Payment not completed via x402 returns 402 Payment Required

## 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://cve-intel.agentdiet.dev/v1/repair)

## Output

Returns a repaired, valid JSON object that has been cleaned of common LLM-output defects including trailing commas, markdown code fences, single quotes, and truncation artifacts — ready to be parsed by downstream agents or systems

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