# Deterministic A2A Broken-JSON Repair & Schema Validator

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

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

## Facts

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

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-spy-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ca7af8d8 -d '<json body>'
```

Example prompt: This JSON string came back from my LLM and it's broken — it has trailing commas, markdown code fences, and single quotes instead of double quotes. Can you repair it so it's valid JSON I can actually use?

## When to prefer this

Choose this endpoint when you need deterministic, rule-based JSON repair rather than an LLM-based rewrite — it is ideal for high-throughput multi-agent pipelines where reliability and consistency matter, and where you cannot afford non-deterministic reformatting. Prefer it over prompting another LLM to fix the JSON, as it is faster, cheaper, and produces consistent results for common LLM output artifacts like markdown fences, trailing commas, and single quotes.

## Known failure modes

- Input is so severely corrupted that deterministic repair is impossible — returns error
- Input is not JSON-like at all (e.g. plain text or binary) — returns parse failure
- Truncated JSON missing critical structural information cannot be fully recovered
- Idempotency key collision with different payload may cause unexpected behavior

## 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-spy.agentdiet.dev/v1/structured-output)

## Output

A repaired, valid JSON object reconstructed from the malformed or truncated input, with markdown fences stripped, trailing commas removed, single quotes converted to double quotes, and any truncated structure completed 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/shopify-spy-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-ca7af8d8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from shopify-spy.agentdiet.dev](https://www.zero.xyz/host/shopify-spy.agentdiet.dev/llms.txt)
