# Deterministic A2A Broken-JSON Repair & Schema Validator

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

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

## Facts

- Endpoint: GET https://mesh.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: mesh.agentdiet.dev
- Website: https://mesh.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/mesh-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-66113549
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5VaMelD6ofN7SKuRoe6CJ

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 mesh-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-66113549
```

Example prompt: This JSON came back from the LLM with trailing commas and markdown fences — can you repair it so it's valid and parseable: ```json { 'name': 'Alice', 'score': 42, } ```?

## When to prefer this

Choose this endpoint when your multi-agent pipeline receives malformed or partially truncated JSON from an LLM and you need a deterministic, rules-based repair rather than asking the LLM to rewrite it. Ideal when you cannot afford another LLM call, need consistent output, or want to handle common LLM formatting artifacts (markdown fences, trailing commas, single quotes) automatically without custom regex code.

## Known failure modes

- Input JSON too severely truncated or corrupted to repair — returns an error or best-effort partial object
- Ambiguous structure that cannot be deterministically resolved — may return a best-guess or failure response
- Input is not JSON-like at all (e.g. plain prose) — endpoint may return an error
- Network or payment (x402) authentication failure — HTTP 402 or 5xx response

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

## Output

A repaired, schema-valid JSON object derived from the malformed input, with common LLM formatting artifacts (trailing commas, markdown code fences, single quotes, truncations) corrected deterministically so the output can be safely parsed downstream.

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