# Deterministic A2A Broken-JSON Repair & Schema Validator

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

Repairs malformed, truncated, or markdown-wrapped JSON strings from LLM outputs so multi-agent pipelines can continue without crashing.

## Facts

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

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 company-enrich-agentdiet-dev-deterministic-a2a-broken-json-repair-7510e5c1
```

Example prompt: This JSON from my LLM keeps crashing my pipeline — can you fix it? Here it is: ```json {"name": "Acme", "revenue": 5000000, } ``` It has trailing commas and markdown fences.

## When to prefer this

Choose this endpoint when you need deterministic, rule-based JSON repair rather than LLM-based guessing — especially in production multi-agent pipelines where consistency and low latency matter. Ideal when JSON is malformed due to known LLM output artifacts (trailing commas, markdown fences, single quotes, truncation) rather than semantic errors. Prefer it over manual parsing workarounds when reliability and auditability are required.

## Known failure modes

- Input is so severely malformed that deterministic repair is impossible — returns an error or best-effort partial result
- Input string is empty or not JSON-like at all — likely returns a validation error
- Extremely long truncated JSON may be irrecoverable if key structural context is missing
- Rate limiting or payment failure (HTTP 402) if x402 USDC payment is not included

## 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://company-enrich.agentdiet.dev/v1/repair)

## Output

A repaired, valid JSON object derived from the malformed input, with issues such as trailing commas, markdown code fences, single quotes, and truncation resolved deterministically.

## 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/company-enrich-agentdiet-dev-deterministic-a2a-broken-json-repair-7510e5c1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from company-enrich.agentdiet.dev](https://www.zero.xyz/host/company-enrich.agentdiet.dev/llms.txt)
