# WritersLogic Schema Witness — JSON Schema Constraint Example Generator

> WritersLogic Schema Witness — JSON Schema Constraint Example Generator is a paid API for AI agents from agents.writerslogic.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-19).

Walks a JSON Schema 2020-12 and returns verified valid/invalid example pairs for every constraint keyword found, with each pair confirmed by running against a constraint-isolated interpreter

## Facts

- Endpoint: POST https://agents.writerslogic.com/api/v1/schema-witness?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/writerslogic-schema-witness-json-schema-constraint-example-generator-626a598d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YQLTzKcUeq8HRvJR_2-IL

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 writerslogic-schema-witness-json-schema-constraint-example-generator-626a598d -d '<json body>'
```

Example prompt: Walk my tool schema and generate a verified valid example and a boundary-violating example for every constraint keyword you find — here's the schema: {"type":"object","properties":{"age":{"type":"integer","minimum":0,"maximum":150}},"required":["age"]} — stop after 50 constraints.

## When to prefer this

Choose this endpoint when you need machine-verified, constraint-isolated test examples for a JSON Schema 2020-12 — particularly when building test suites for API validation, generating few-shot examples for LLM tool calls, or auditing which constraints in a schema are actually enforceable. It is superior to ad-hoc example generation because every pair is verified by running through an interpreter, so you never get a 'valid' example that actually fails or an 'invalid' example that accidentally passes. Prefer it over manual test-case writing or generic LLM completion when correctness of boundary cases is required.

## Known failure modes

- Schema contains only $ref to external URIs — only local $ref/$defs are supported, remote refs will fail or be unresolved
- maxConstraints limit reached before all constraints are processed — remaining constraints are not returned
- Exotic regex patterns with complex lookaheads cannot produce a verified violation pair and are listed as unresolved
- Extremely large minimum/maximum values may be unresolvable due to boundary example generation limits
- Malformed JSON Schema input returns a parse or validation error
- Schema has no recognized constraint keywords — returns empty results with no pairs

## How this service works

Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.

## Output

A list of constraint records, each containing: the JSON pointer to the constraint location in the schema, the constraint keyword, a valid example that satisfies the constraint (confirmed to pass), and a boundary-invalid example that violates exactly that constraint (confirmed to fail). Constraints for which a verified pair could not be constructed (exotic patterns, enormous limits) are returned separately as unresolved entries with no guessed values.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "schema": {
   "description": "The schema to generate examples for. Full JSON Schema 2020-12 (local $ref only)."
  },
  "maxConstraints": {
   "type": "integer",
   "maximum": 100,
   "minimum": 1,
   "description": "Stop after this many constraints (default 100)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/writerslogic-schema-witness-json-schema-constraint-example-generator-626a598d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.writerslogic.com](https://www.zero.xyz/host/agents.writerslogic.com/llms.txt)
