{"id":"json-schema-output-validate","version":"1.0.0","description":"Validate JSON (e.g. LLM output) against a Draft 2020-12 schema subset; returns spec output units with JSON Pointers.","supported_operations":["validate llm structured output against draft 2020-12 json schema","check model json response matches a 2020-12 schema","json schema 2020-12 basic output with keyword and instance locations","find which fields of generated json break the schema","validate json with local $ref and $defs schema","flag or basic output format json schema validation","בדיקת פלט JSON של מודל מול סכמת JSON 2020-12"],"unsupported_operations":["pattern, patternProperties, propertyNames, contains, if/then/else, dependent*, unevaluated* keywords (unsupported_input)","remote, relative or anchor $ref and embedded $id resources (only \"#...\" JSON Pointer references)","format assertion (format is an annotation and is ignored, as in the 2020-12 default vocabulary)","repairing or coercing the instance","detailed and verbose output structures"],"semantics":["Supported keywords: $schema (root, must be the 2020-12 meta-schema URI), $id (root only), $defs, $ref (\"#\" + RFC 6901 fragment, same document), allOf, anyOf, oneOf, not, type, enum, const, multipleOf, maximum, exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, required, properties, additionalProperties, maxProperties, minProperties, prefixItems, items, maxItems, minItems, uniqueItems. Ignored annotations: title, description, default, examples, deprecated, readOnly, writeOnly, format, $comment, contentEncoding, contentMediaType. Any other keyword is unsupported_input; a malformed keyword value is invalid_input with details.schema_location.","output_format is \"basic\" when omitted. \"flag\" returns only {valid} and stops at the first failure (core 12.4.1). \"basic\" returns {valid, truncated, errors}: a flat pre-order list of output units (core 12.4.2) after the 12.4.3 condensation rules (applicator nodes without failures are dropped, a node with one child is replaced by it); branch units have kind \"branch\", failing assertions kind \"assertion\" with keyword and params.","keyword_location is the dynamic RFC 6901 path through the schema and includes $ref; instance_location is the RFC 6901 path in the instance; absolute_keyword_location is present only when the root has an absolute-URI $id and the path crossed a $ref, as <$id>#<RFC 6901 fragment of the dereferenced location>.","Keyword order inside each schema object is fixed: $ref, allOf, anyOf, oneOf, not, type, enum, const, multipleOf, maximum, exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, required (listed order), properties and additionalProperties (instance member names ascending by UTF-16 code units), maxProperties, minProperties, prefixItems and items (ascending index), maxItems, minItems, uniqueItems. Schema object key order never changes results.","anyOf, oneOf and not report one assertion unit (params branch_count, passing_count) without branch details. A false subschema is reported under the keyword that applied it (properties/additionalProperties with params.property, items/prefixItems/allOf with params.index, $ref) or as false_schema at the root.","type integer matches any number with a zero fractional part; string lengths count Unicode code points; enum, const and uniqueItems use JSON equality (key order ignored, 1 and 1.0 equal); multipleOf is exact on the shortest round-trip decimal of each number; uniqueItems params.indexes is the first equal pair by lowest second index.","Work: 1 unit per subschema application plus 1 per object member scanned by properties/additionalProperties, per array element scanned by prefixItems/items or uniqueItems, and per required name; more than 20000 units, more than 64 nested applications, input over 65536 bytes or deeper than 32 levels is limit_exceeded. At most 100 assertion units are reported; truncated is true when more failures existed."],"limits":{"max_input_bytes":65536,"max_json_depth":32,"max_evaluation_depth":64,"max_evaluation_work":20000,"max_errors":100,"max_output_bytes":262144},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["schema","instance"],"properties":{"schema":{"description":"JSON Schema 2020-12 document (object or boolean) within the supported subset"},"instance":{"description":"Any JSON value to validate, for example parsed LLM output"},"output_format":{"type":"string","enum":["basic","flag"]}}},"output_schema":{"type":"object","additionalProperties":false,"required":["valid"],"properties":{"valid":{"type":"boolean"},"truncated":{"type":"boolean"},"errors":{"type":"array","maxItems":199,"items":{"type":"object","additionalProperties":false,"required":["kind","keyword_location","instance_location"],"properties":{"kind":{"type":"string","enum":["assertion","branch"]},"keyword_location":{"type":"string"},"absolute_keyword_location":{"type":"string"},"instance_location":{"type":"string"},"keyword":{"type":"string","enum":["type","enum","const","multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","required","maxProperties","minProperties","maxItems","minItems","uniqueItems","anyOf","oneOf","not","properties","additionalProperties","prefixItems","items","allOf","$ref","false_schema"]},"params":{"type":"object","additionalProperties":false,"properties":{"expected":{"type":"array","items":{"type":"string","enum":["array","boolean","integer","null","number","object","string"]}},"actual":{"type":"string","enum":["array","boolean","integer","null","number","object","string"]},"limit":{"type":"number"},"count":{"type":"integer","minimum":0},"property":{"type":"string"},"index":{"type":"integer","minimum":0},"indexes":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"integer","minimum":0}},"branch_count":{"type":"integer","minimum":1},"passing_count":{"type":"integer","minimum":0}}}}}}}},"examples":[{"input":{"schema":{"type":"object","required":["name","age"],"properties":{"name":{"type":"string"},"age":{"type":"integer","minimum":0}},"additionalProperties":false},"instance":{"name":"Ada","age":-1,"extra":true}},"output":{"valid":false,"truncated":false,"errors":[{"kind":"branch","keyword_location":"","instance_location":""},{"kind":"assertion","keyword_location":"/properties/age/minimum","instance_location":"/age","keyword":"minimum","params":{"limit":0}},{"kind":"assertion","keyword_location":"/additionalProperties","instance_location":"/extra","keyword":"additionalProperties","params":{"property":"extra"}}]}},{"input":{"schema":{"type":"array","items":{"type":"string"}},"instance":["a",2],"output_format":"flag"},"output":{"valid":false}}],"execute_url":"/v1/tools/json-schema-output-validate/versions/1.0.0/execute"}