# 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 can process them without crashing.

## Facts

- Endpoint: GET https://sec-intel.agentdiet.dev/v1/structured-output?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-bd7d3204
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jLM1EZhSha0TiZy45wQ1g

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-bd7d3204
```

Example prompt: The LLM just returned this broken JSON with trailing commas and markdown fences — can you repair it so it's valid: ```{"name": "Alice", "scores": [10, 20,], }```?

## When to prefer this

Choose this endpoint when your multi-agent pipeline receives LLM-generated JSON that fails standard parsing due to common syntax errors like trailing commas, markdown wrapping, single quotes, or truncation. It is purpose-built for agent-to-agent workflows where structured output reliability is critical and you need deterministic (not AI-based) repair rather than asking a model to re-generate the output.

## Known failure modes

- Input JSON too severely truncated to infer structure — returns error or best-effort partial repair
- Input is not JSON at all (e.g. plain text or binary) — may return validation error
- Ambiguous repair cases where multiple valid completions exist — deterministic repair may choose one interpretation
- Empty or null raw_json input — returns 400 or validation error
- Extremely large JSON payloads may hit size limits

## 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/structured-output)

## Output

A repaired, valid JSON object with all syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for downstream processing in agent pipelines.

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