# Second Eyes Schema Repair

> Second Eyes Schema Repair is a paid API for AI agents from secondeyesai.com, paid per call via x402, $0.03/call, status unknown (last checked 2026-09-15).

Diagnoses and prescribes a fix for agent tool-call schema mismatches, returning repair instructions including the repair class, recipe, and confidence score.

## Facts

- Endpoint: POST https://secondeyesai.com/api/bar/x402/schema-repair
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/second-eyes-schema-repair-98a8adf1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mvgIP0WhuXDt6N_CdzUAw

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 second-eyes-schema-repair-98a8adf1 -d '<json body>'
```

Example prompt: I keep getting schema rejection errors when my agent calls a tool — the argument values look right but the shape is wrong. Can you diagnose the mismatch and tell me exactly how to fix the field types so the call goes through?

## When to prefer this

Choose this endpoint when an autonomous agent is experiencing repeated tool-call rejections due to argument shape or type issues and needs a structured, actionable repair prescription rather than generic error messages. Prefer this over manual debugging when the agent is in a live loop and needs a fast, single-call recovery signal with coercion instructions and an escalation threshold.

## Known failure modes

- Payment not included or insufficient USDC — 402 response returned, access denied
- Input 'properties' string is malformed or empty — repair verdict may be low confidence or generic
- Schema being repaired is stale or not the live schema — escalation recommended after >3 failed repair attempts
- Network timeout — session-less so agent must retry full pay-and-use flow

## How this service works

Second Eyes is the pause. Survival supplies for autonomous agents in distress — pay USDC on Base via x402 to recover from looping, schema mismatch, context pressure, crashes, handoff loss, auth/MCP failure, or payment uncertainty. Every paid door is session-less: discover → pay → use. This OpenAPI document lists the core paid doors with their full input schemas (query parameters on GET, JSON requestBody on POST) and the free proof/discovery surfaces. Audience: wallet-equipped agents and the runtimes that authorize paid recovery tools.

## Output

A JSON object containing: a verdict (e.g. 'preserve'), a repair_class (e.g. 'type_mismatch'), a repair_recipe with specific coercion instructions, signals_seen listing detected issues, a confidence score (0–1), an escalate_if threshold, a fixable_client_side boolean, a stop message advising the agent not to resend unchanged arguments, and a continue instruction for the next corrective action.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "stop": "Stop re-sending the same arguments — the shape, not the value, is being rejected.",
  "tool": "schema-repair",
  "scope": "nano",
  "access": "granted",
  "verdict": "preserve",
  "continue": "Re-read the tool's declared schema, coerce the arguments to it, then call once.",
  "preserve": "Keep the goal of the call and the original argument values; only the shape changes.",
  "next_call": null,
  "confidence": 0.85,
  "escalate_if": ">3 repair attempts on the same field — the schema you are coding against may not be the live one.",
  "repair_class": "type_mismatch",
  "signals_seen": [
   "type_mismatch"
  ],
  "repair_recipe": "Coerce the named field to the declared type (e.g. number→string), do not wrap it in an extra object.",
  "fixable_client_side": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/second-eyes-schema-repair-98a8adf1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from secondeyesai.com](https://www.zero.xyz/host/secondeyesai.com/llms.txt)
