Breaking-change diff between two JSON Schemas or OpenAPI documents, and whether cached calls still validate

$0.005 USDC per call · Developer and security · POST /api/v1/schema-compat · Id schema-compat

Compares an old and a new JSON Schema 2020-12 (or two OpenAPI 3.0/3.1 documents) and lists each change with its path, keyword, old and new value, whether it narrows or widens what is accepted, and whether it breaks clients: newly required properties, removed or retyped properties, removed enum values, tightened limits, additionalProperties flips, removed operations, removed or newly required parameters, removed media types and responses. Role request (default) treats narrowing as breaking; role response treats widening and removed required fields as breaking. You may also pass cached tool-call arguments: each is validated against the old and the new schema, so a call that worked before and fails now is reported with the failing JSON pointer. Changes it cannot prove either way (pattern rewrites, not/if/then, mixed oneOf edits) are reported as uncomparable and the status is unsupported rather than pass.

What you get

Catches the schema change that silently breaks every cached agent call. 400 operations and 50 cached calls per $0.005 call.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/schema-compat. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.

curl -i -X POST https://agents.writerslogic.com/api/v1/schema-compat \
  -H 'content-type: application/json' \
  -d '{"kind":"json-schema","before":{"type":"object","required":["id"],"properties":{"id":{"type":"integer"},"mode":{"enum":["fast","slow"]},"note":{"type":"string"}}},"after":{"type":"object","required":["id","region"],"properties":{"id":{"type":"integer"},"mode":{"enum":["fast"]},"note":{"type":"string","maxLength":10},"region":{"type":"string"}}},"calls":[{"name":"cached","arguments":{"id":1,"mode":"slow"}}]}'

Input

FieldTypeRequiredDescription
beforeanyyesThe old schema, or old OpenAPI document. Full JSON Schema 2020-12 (local $ref only).
afteranyyesThe new schema, or new OpenAPI document. Full JSON Schema 2020-12 (local $ref only).
kindstring; one of "json-schema", "openapi"yes
rolestring; one of "request", "response"nojson-schema only: request (default) or response; OpenAPI compares each side in its own role.
callsarray<object>; max 50 itemsno

Example request body

{
  "kind": "json-schema",
  "before": {
    "type": "object",
    "required": [
      "id"
    ],
    "properties": {
      "id": {
        "type": "integer"
      },
      "mode": {
        "enum": [
          "fast",
          "slow"
        ]
      },
      "note": {
        "type": "string"
      }
    }
  },
  "after": {
    "type": "object",
    "required": [
      "id",
      "region"
    ],
    "properties": {
      "id": {
        "type": "integer"
      },
      "mode": {
        "enum": [
          "fast"
        ]
      },
      "note": {
        "type": "string",
        "maxLength": 10
      },
      "region": {
        "type": "string"
      }
    }
  },
  "calls": [
    {
      "name": "cached",
      "arguments": {
        "id": 1,
        "mode": "slow"
      }
    }
  ]
}

Result

The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.

FieldTypeRequiredDescription
statusstring; one of "pass", "fail", "unknown", "unsupported"nopass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass.
changesarray<object>no
countsobjectno
callsarray<object>no
witnessesarray<object>no
versionsobjectnoEvery semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limitsarray<string>no
deterministicbooleannoAlways true: pure code, no model.

Pay and connect

Available through: x402 (USDC on Base), MCP. MCP clients reach it through the data-contract-kit package.

Machine-readable