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

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

## Facts

- Endpoint: POST https://mesh.agentdiet.dev/v1/schema-repair?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-11-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-6c669e5a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4qUIiOrdZP81HEb7xfN0f

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-6c669e5a -d '<json body>'
```

Example prompt: The JSON output from the last LLM step has trailing commas and markdown code fences around it and won't parse — can you run it through the broken-JSON repair service and give me back a clean, valid JSON object?

## When to prefer this

Choose this endpoint when your multi-agent or LLM pipeline produces JSON that fails to parse due to common LLM artifacts like trailing commas, markdown code fences, single-quoted keys, or truncated output. Ideal for agentic workflows where downstream steps require strictly valid JSON and you need a cheap, deterministic fix layer rather than a full re-generation call.

## Known failure modes

- Input JSON is so malformed it cannot be deterministically repaired — returns an error or partial result
- Empty or null raw_json input triggers validation error
- Extremely large payloads may hit size limits
- JSON with ambiguous or irrecoverably missing structure may yield incorrect repairs

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

## Output

Returns a JSON object containing the repaired and validated JSON output, with malformed syntax (trailing commas, markdown fences, single quotes, truncated structures) corrected into a valid, parseable JSON object ready for downstream consumption.

## 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-6c669e5a/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)
