# Deterministic A2A Broken-JSON Repair & Schema Validator

> Deterministic A2A Broken-JSON Repair & Schema Validator is a paid API for AI agents from mcp-security.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) into valid, parseable JSON for use in multi-agent pipelines

## Facts

- Endpoint: GET https://mcp-security.agentdiet.dev/v1/json-normalizer?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Provider: mcp-security.agentdiet.dev
- Website: https://mcp-security.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/mcp-security-agentdiet-dev-deterministic-a2a-broken-json-repair-4270b4b8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_K60sYuAtso4Pn2pKZDo_g

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 mcp-security-agentdiet-dev-deterministic-a2a-broken-json-repair-4270b4b8
```

Example prompt: This LLM output keeps crashing my pipeline — can you repair this broken JSON for me: ```{"name": "Alice", "age": 30,}``` — it has a trailing comma and markdown fences that need to be stripped and fixed.

## When to prefer this

Choose this endpoint when your multi-agent or LLM pipeline frequently receives malformed, truncated, or markdown-wrapped JSON that breaks downstream parsers. It is specifically optimized for LLM output artifacts (trailing commas, single quotes, code fences) and offers deterministic repair rather than probabilistic generation, making it suitable for production pipelines requiring reliability. Prefer this over generic JSON libraries when the malformed input originates from LLM completions in A2A or MCP workflows.

## Known failure modes

- JSON too corrupted to deterministically repair — returns error or partial result
- Input is not JSON-like at all — unrecognized format
- Ambiguous truncation with multiple valid completions — may return best-guess repair
- Network or payment (x402) authentication failure
- Empty or missing raw_json parameter — validation error

## 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://mcp-security.agentdiet.dev/v1/json-normalizer)

## Output

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