# 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).

Repairs truncated or malformed LLM-generated JSON (trailing commas, markdown fences, single quotes) so multi-agent pipelines receive valid, schema-conformant output.

## Facts

- Endpoint: GET https://cve-intel.agentdiet.dev/v1/llm-json-schema-healer?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-cd9c759e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HPf_u-RmOor8D_0zeaw8e

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-cd9c759e
```

Example prompt: The JSON my LLM just returned has trailing commas and markdown fences and is crashing my pipeline — can you repair this string so it parses cleanly: '```json\n{"name": "Alice", "age": 30,}\n```'?

## When to prefer this

Choose this endpoint when your multi-agent or LLM pipeline receives structured JSON outputs that are frequently malformed due to model truncation, markdown formatting, or non-strict quoting — and you need a deterministic, rule-based fix rather than asking the LLM to re-generate. Prefer it over regex heuristics or manual post-processing when reliability and auditability matter.

## Known failure modes

- Input JSON is so severely malformed that deterministic repair is ambiguous — endpoint may return a best-effort result or an error indicating the string cannot be recovered
- Empty or whitespace-only raw_json input returns a validation error
- Non-JSON input (plain text, binary data) cannot be meaningfully repaired
- Extremely long truncated inputs may time out or return partial repairs
- Network or payment (x402) authentication failures return HTTP 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://cve-intel.agentdiet.dev/v1/llm-json-schema-healer)

## Output

A repaired, valid JSON object where truncations are closed, trailing commas removed, markdown fences stripped, and single quotes converted to double quotes — ready for programmatic parsing 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/cve-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-cd9c759e/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)
