# 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/malformed-json-healer?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-04659dc9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UNn1ivVIjq77VS0jQnbde

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-04659dc9
```

Example prompt: This JSON from our LLM has trailing commas and is wrapped in markdown fences so it keeps crashing our pipeline — can you repair it and give me back clean, valid JSON? Here it is: ```json {"name": "Alice", "score": 42, } ```

## When to prefer this

Choose this endpoint when you have LLM-generated or AI-produced JSON that is slightly malformed (trailing commas, markdown fences, single quotes, minor truncation) and need a deterministic, cheap fix before passing it to a downstream parser. Ideal for multi-agent pipelines where one agent's output feeds another. Prefer this over writing custom parsing logic when the malformations follow common LLM output patterns. Not suitable for completely unstructured text or deeply corrupted data that requires semantic reconstruction.

## Known failure modes

- Input is so severely malformed it cannot be deterministically repaired without guessing intent — returns error or best-effort partial repair
- Input string is empty or not JSON-like at all — returns validation error
- Ambiguous truncation point where multiple valid completions exist — may return an error or one possible repair
- Network timeout or service unavailability — returns HTTP 5xx

## 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/malformed-json-healer)

## Output

A repaired, valid JSON object with all malformations corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for downstream parsing without errors.

## 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-04659dc9/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)
