{"uid":"cap_YQLTzKcUeq8HRvJR_2-IL","slug":"writerslogic-schema-witness-json-schema-constraint-example-generator-626a598d","name":"WritersLogic Schema Witness — JSON Schema Constraint Example Generator","description":"Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.","url":"https://agents.writerslogic.com/api/v1/schema-witness?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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)."}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_wERM_Zez_5CbaSfbw4z0t","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Auto-generate schema test suite","prompt":"I have a JSON Schema for my API request body and I need a verified valid example plus a boundary-failing example for every constraint in it — minimum, maximum, pattern, required, everything. Here's the schema: {\"type\":\"object\",\"properties\":{\"email\":{\"type\":\"string\",\"format\":\"email\"},\"score\":{\"type\":\"number\",\"minimum\":0,\"maximum\":100}},\"required\":[\"email\",\"score\"]}"},{"title":"Few-shot examples for LLM tool schema","prompt":"I'm building a few-shot prompt for an LLM tool call and I need a passing and a failing example for each constraint in my tool's input schema so the model learns the boundaries — can you run the schema through and give me verified pairs? Schema: {\"type\":\"object\",\"properties\":{\"count\":{\"type\":\"integer\",\"minimum\":1,\"multipleOf\":5}},\"required\":[\"count\"]}"},{"title":"Catch unverifiable exotic constraints","prompt":"Run this complex schema through the constraint witness and tell me which constraints you could build verified pairs for and which ones you had to leave as unresolved — I especially want to know if any regex patterns or large numeric limits couldn't be handled. Schema: {\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"string\",\"pattern\":\"^(?=.*[A-Z])(?=.*\\\\d).{8,}$\"},\"qty\":{\"type\":\"integer\",\"maximum\":999999999}}}"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T06:38:17.418Z","isFirstParty":false,"canonicalSlug":"writerslogic-schema-witness-json-schema-constraint-example-generator-626a598d"}