# Deterministic A2A Broken-JSON Repair & Schema Validator

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

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

## Facts

- Endpoint: GET https://sec-intel.agentdiet.dev/v1/json-validator?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Provider: sec-intel.agentdiet.dev
- Website: https://sec-intel.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/sec-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-31baff7b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AMRir53RtRYzIK1SslWig

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 sec-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-31baff7b
```

Example prompt: The LLM output I got back has trailing commas, single quotes, and a markdown code fence wrapping the JSON — can you repair it into valid JSON so I can pass it to the next step? Here's the raw string: ```{'name': 'Alice', 'age': 30,}```

## When to prefer this

Choose this endpoint when an LLM or agent in your pipeline has returned broken, truncated, or markdown-wrapped JSON that must be repaired before downstream processing. It is purpose-built for multi-agent and MCP pipeline reliability, offering deterministic (not probabilistic) repair rather than asking another LLM to re-generate the output. Prefer it over a general-purpose LLM re-call when you need low latency, low cost, and predictable behavior at $0.002 per call.

## Known failure modes

- Input JSON is too severely truncated or corrupted to recover — returns an error or best-effort partial result
- Input contains nested markdown with ambiguous structure — repair heuristics may produce unexpected results
- Extremely large JSON strings may exceed query parameter length limits when sent via GET
- Ambiguous single-quote vs apostrophe usage in string values may cause incorrect repair

## 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://sec-intel.agentdiet.dev/v1/json-validator)

## Output

A repaired, valid JSON object derived from the input malformed string, with syntax issues such as trailing commas, single quotes, markdown code fences, and truncation resolved deterministically. The response is a JSON object containing the fixed output 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/sec-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-31baff7b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from sec-intel.agentdiet.dev](https://www.zero.xyz/host/sec-intel.agentdiet.dev/llms.txt)
