# Deterministic A2A Broken-JSON Repair & Schema Validator

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

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

## Facts

- Endpoint: POST https://domain-osint.agentdiet.dev/v1/llm-json-schema-healer?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-11-21
- Activations on Zero: 0
- Provider: domain-osint.agentdiet.dev
- Website: https://domain-osint.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/domain-osint-agentdiet-dev-deterministic-a2a-broken-json-repair-85a6be01
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7nuh14T0ldCrfcJiebMsb

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 domain-osint-agentdiet-dev-deterministic-a2a-broken-json-repair-85a6be01 -d '<json body>'
```

Example prompt: This JSON came out of an LLM call and it's broken — trailing commas, single quotes, wrapped in markdown fences — can you repair it so it's valid JSON I can actually use? Here it is: ```json {name: 'Alice', scores: [10, 20,], active: true,} ```

## When to prefer this

Choose this endpoint when your multi-agent or LLM pipeline receives malformed JSON — especially with trailing commas, single quotes, markdown code fences, or truncation — and you need a deterministic, non-hallucinating repair rather than asking an LLM to rewrite the JSON (which risks altering values). Ideal for production pipelines where reliability and idempotency matter and you cannot afford crashes from bad LLM outputs.

## Known failure modes

- JSON is so severely truncated or corrupted that deterministic repair is impossible — returns an error
- Input is not JSON at all (e.g. plain text or binary) — returns a parse error
- Input exceeds size limits — may return a payload-too-large error
- Ambiguous schema structure where multiple valid repairs exist — may return best-effort result with a warning

## 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://domain-osint.agentdiet.dev/v1/llm-json-schema-healer)

## Output

A repaired, valid JSON object with syntax errors corrected — trailing commas removed, single quotes converted to double quotes, markdown fences stripped, and truncated structures closed — ready to be parsed and passed to the next step 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/domain-osint-agentdiet-dev-deterministic-a2a-broken-json-repair-85a6be01/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from domain-osint.agentdiet.dev](https://www.zero.xyz/host/domain-osint.agentdiet.dev/llms.txt)
