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

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

## Facts

- Endpoint: POST https://mcp-security.agentdiet.dev/v1/json-normalizer?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-11-20
- 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-d99e89f9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_he0N8UqZBr5h7uKlLYP_3

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

Example prompt: This LLM response came back with broken JSON — trailing commas, single quotes, and markdown backtick fences wrapping it. Can you run it through the JSON normalizer to fix it so my pipeline doesn't crash? Here's the raw string: ```{'name': 'Alice', 'age': 30,}```

## When to prefer this

Choose this endpoint when your multi-agent pipeline receives JSON from LLM outputs that may contain markdown fences, trailing commas, single quotes, or truncation artifacts. It is purpose-built for deterministic (not generative) repair, making it reliable for production pipelines where correctness is required. Prefer this over manual string manipulation or regex hacks when you need a robust, consistent fix for LLM-generated JSON before passing it to typed parsers or downstream agents.

## Known failure modes

- Input JSON too severely corrupted to deterministically repair — returns error with description of what could not be fixed
- Empty or non-JSON input string — returns validation error
- Network timeout or service unavailability — HTTP 5xx response
- Payment required but not provided — HTTP 402 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://mcp-security.agentdiet.dev/v1/json-normalizer)

## Output

Returns a JSON object containing the repaired, standards-compliant JSON parsed from the malformed input, suitable for direct downstream consumption without further sanitization.

## 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-d99e89f9/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)
