One valid and one invalid example for each constraint in a JSON Schema
Walks a caller-supplied JSON Schema 2020-12 and, for every constraint keyword (type, enum, const, minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, minLength, maxLength, pattern, format, minItems, maxItems, uniqueItems, required, minProperties, maxProperties, additionalProperties false, dependentRequired), returns the JSON pointer of the constraint, an example that satisfies it and a boundary example that violates it. Every pair is verified by running both examples through the interpreter against a schema holding only that constraint, so each valid example passes and each invalid example fails exactly that rule. For agents that need test inputs or few-shot examples for a tool schema. Constraints inside combinators are included; $ref targets are visited under $defs. Constraints it cannot build a verified pair for (exotic patterns, huge limits) are listed as unresolved, never guessed.
What you get
Boundary examples (limit-1, limit, limit+1) for up to 100 constraints per $0.005 call, each machine-verified.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/schema-witness. 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-witness \
-H 'content-type: application/json' \
-d '{"schema":{"type":"object","required":["name","age"],"properties":{"name":{"type":"string","minLength":2,"maxLength":5},"age":{"type":"integer","minimum":0,"maximum":150}},"additionalProperties":false}}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
schema | any | yes | The schema to generate examples for. Full JSON Schema 2020-12 (local $ref only). |
maxConstraints | integer; 1..100 | no | Stop after this many constraints (default 100). |
Example request body
{
"schema": {
"type": "object",
"required": [
"name",
"age"
],
"properties": {
"name": {
"type": "string",
"minLength": 2,
"maxLength": 5
},
"age": {
"type": "integer",
"minimum": 0,
"maximum": 150
}
},
"additionalProperties": false
}
}
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.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: 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. |
pairs | array<object> | no | |
unresolved | array<object> | no | |
constraintCount | integer | no | |
truncated | boolean | no | |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always 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
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent