# 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 truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash.

## Facts

- Endpoint: GET https://company-enrich.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: 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-f99d733d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZFGcQGF7tyT7AAB2NJw_Q

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

Example prompt: This JSON came back from the LLM with trailing commas and markdown fences and it's crashing my pipeline — can you repair it and give me back a valid JSON object? Here's the raw string: ```{"name": "Acme", "revenue": 5000000,}```

## When to prefer this

Choose this endpoint when you need fast, deterministic (non-ML) JSON repair for LLM outputs in automated pipelines, especially when reliability and reproducibility matter more than heuristic guessing. Best suited for common LLM syntax errors like trailing commas, markdown wrappers, and single quotes rather than deeply corrupted or semantically invalid JSON.

## Known failure modes

- Input JSON is so severely malformed that deterministic repair is impossible — returns error indicating unrecoverable structure
- Empty or null raw_json input returns a 400 validation error
- Extremely large JSON strings may time out or hit size limits
- JSON with ambiguous structure (e.g. deeply nested truncation) may be repaired incorrectly without schema context

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

## Output

A repaired, valid JSON object with all common LLM output defects corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed where possible.

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