# 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/schema-repair?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-584efd42
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JaK5VkESR5DRsR-gao97w

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-584efd42
```

Example prompt: The JSON my LLM just returned has trailing commas and is wrapped in markdown code fences — can you repair it so it's valid JSON I can parse? Here's the raw output: ```json {"name": "Alice", "age": 30,} ```

## When to prefer this

Choose this endpoint when your multi-agent pipeline receives malformed, truncated, or LLM-generated JSON that fails standard JSON.parse() — especially when you need deterministic, reproducible fixes (not probabilistic LLM re-generation) and need to handle common LLM artifacts like markdown fences, trailing commas, and single-quoted keys at low per-call cost ($0.002).

## Known failure modes

- Input JSON is so severely corrupted that deterministic repair is impossible — returns error indicating unrecoverable malformation
- Input string is empty or too short to infer structure
- JSON structure is ambiguous after repair and multiple valid interpretations exist
- Rate limiting or payment failure for x402 micropayment

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

## Output

Returns a repaired, schema-valid JSON object with the fixed JSON string, ready for programmatic consumption by downstream agents or pipeline steps

## 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-584efd42/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)
