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

Deterministically repairs malformed, truncated, or markdown-wrapped LLM JSON outputs (trailing commas, single quotes, fences) so multi-agent pipelines can continue without crashing.

## Facts

- Endpoint: POST https://cve-intel.agentdiet.dev/v1/schema-repair?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-28
- 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-58edc229
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JqCRKCLkgjTlzda6Ylj5J

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-58edc229 -d '<json body>'
```

Example prompt: This JSON I got back from the language model is broken — it has trailing commas and markdown fences around it. Can you repair it into valid JSON so my pipeline can keep running? Here's the raw string: ```json {"name": "Alice", "score": 42, } ```

## When to prefer this

Choose this endpoint when your multi-agent or LLM pipeline receives JSON that fails JSON.parse() due to common LLM quirks — trailing commas, markdown fences, single quotes, or mid-stream truncation. It is deterministic (not generative), idempotent, and purpose-built for agent-to-agent reliability, making it ideal as a middleware step between LLM calls and downstream JSON consumers.

## Known failure modes

- Input is so severely malformed that deterministic repair is not possible, returning an error
- Input is not JSON-like at all (e.g. plain prose), causing repair to fail or produce garbage
- Truncation is too deep for structural inference, leaving ambiguous closing
- Payment/402 flow not completed, blocking the request

## 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/schema-repair)

## Output

A repaired, valid JSON object reconstructed from the malformed input — with trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for downstream consumption in an agent pipeline.

## 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-58edc229/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)
