# Agent Contract Guard: JSON Schema Breaking Change Check

> Agent Contract Guard: JSON Schema Breaking Change Check is a paid API for AI agents from agentguard.weatherriskapi.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-17).

Compares two JSON schemas to detect breaking changes and compatibility issues that could break API clients or AI agent tool contracts before deployment.

## Facts

- Endpoint: POST https://agentguard.weatherriskapi.com/v1/schema/diff?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-contract-guard-json-schema-breaking-change-check-ca798ef1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8C1wZDuju5qSLfllknlNE

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 agent-contract-guard-json-schema-breaking-change-check-ca798ef1 -d '<json body>'
```

Example prompt: Check whether my schema update introduces any breaking changes — here's the old schema and the new one with the 'age' field added as required; tell me what changed and whether it would break existing clients.

## When to prefer this

Choose this endpoint when you need to programmatically detect whether a JSON schema change is backward-compatible before deploying an API update, publishing a new MCP tool definition, or releasing a new agent capability. It is especially valuable in CI/CD pipelines, agent orchestration systems, and API versioning workflows where breaking changes must be caught before clients or agents adopt the new contract.

## Known failure modes

- Invalid or malformed JSON schema input returns a validation error
- Missing old_schema or new_schema fields causes a 400 bad request
- Schemas with circular references may cause unexpected behavior
- Very large or deeply nested schemas may increase response latency
- Payment failure (x402) returns a 402 response before processing begins

## How this service works

Compare old and new JSON schemas to detect compatibility issues and schema drift, validate API and MCP tool contract changes, and identify updates that could break clients before deployment or agent adoption.

## Output

Returns a list of detected changes between the two schemas, each annotated with the change kind (e.g. property_added, required_added), the JSON path affected, a human-readable message, and whether the change is breaking. Also returns aggregate counts of total changes and breaking changes, plus a top-level boolean indicating whether any breaking change was detected.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "new_schema": {
   "type": "object"
  },
  "old_schema": {
   "type": "object"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "changes": [
   {
    "kind": "property_added",
    "path": "$.properties.age",
    "after": {
     "type": "number"
    },
    "message": "Property 'age' was added",
    "breaking": false
   },
   {
    "kind": "required_added",
    "path": "$.required.age",
    "after": "age",
    "message": "Required field 'age' was added",
    "breaking": true
   }
  ],
  "breaking": true,
  "change_count": 2,
  "breaking_count": 1
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-contract-guard-json-schema-breaking-change-check-ca798ef1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentguard.weatherriskapi.com](https://www.zero.xyz/host/agentguard.weatherriskapi.com/llms.txt)
