# Deterministic A2A Broken-JSON Repair & Schema Validator

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

Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash.

## Facts

- Endpoint: POST https://shopify-intel.agentdiet.dev/v1/repair?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-23
- Activations on Zero: 0
- Provider: shopify-intel.agentdiet.dev
- Website: https://shopify-intel.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/shopify-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-bbf5541c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fWvaqDtrpknbI0vbk9ZHT

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 shopify-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-bbf5541c -d '<json body>'
```

Example prompt: This JSON from my LLM has trailing commas and markdown fences and keeps crashing my pipeline — can you repair it so it's valid? Here's the raw string: ```{"name": "Alice", "age": 30,}```

## When to prefer this

Choose this endpoint when your multi-agent or LLM pipeline produces JSON that is syntactically broken — trailing commas, single quotes, markdown code fences, or truncation — and you need a deterministic (not generative) repair that won't hallucinate new content. Prefer this over writing custom regex parsers or using a general-purpose LLM to reformat JSON, as it is purpose-built, cheap ($0.002/call), and supports idempotent retries via Idempotency-Key header.

## Known failure modes

- Input JSON too severely truncated or corrupted to deterministically repair — returns error or best-effort partial result
- Non-JSON input string provided — may return error indicating input is not repairable as JSON
- Payment not included or invalid — returns HTTP 402 requiring x402 USDC payment
- Network timeout or service unavailability — returns 5xx error

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

## Output

A JSON object containing the repaired, valid JSON output. The malformed, truncated, or markdown-wrapped input string is returned as a properly parsed and schema-valid JSON value that downstream agents or systems can safely consume.

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