data 1 credit · ~$0.015 <5ms
Schema Conformance
POST /v1/validate/schema The gate an agent calls to prove its own (or a tool's) structured output matches the contract before acting on it. A dependency-free JSON Schema validator (Draft-07 subset) that returns every error with a precise JSON path — types, required fields, enums, numeric ranges, string patterns and formats, array/object constraints, and oneOf/anyOf/allOf/not.
Capabilities
- ✓ Draft-07 subset: type, required, enum, const, ranges, pattern, format
- ✓ Arrays (tuple + single), uniqueItems, additionalProperties
- ✓ oneOf / anyOf / allOf / not and local $ref
- ✓ Per-error JSON paths; depth + size guards
- ✓ Deterministic and offline, with a SHA-256 certificate
Use cases
- → Gate an LLM's structured / tool-call output before acting
- → Validate API request/response payloads in agent pipelines
- → Enforce a data contract without shipping ajv
- → Catch malformed JSON before it hits downstream systems
example
curl -X POST https://api.agent-toolbox.ai/v1/validate/schema \
-H "Content-Type: application/json" \
-d '{"schema": {"type": "object", "required": ["name"]}, "data": {"age": 30}}' response shape
{
"verdict": "PASS" | "FLAG" | "BLOCK",
// tool-specific findings…
"certificate": "sha256:..."
}