ag_json_validate
Validate a JSON instance against a JSON Schema (draft 2020-12).
Validates any JSON value against a caller-supplied JSON Schema and returns structured errors (path + message), capped at 50. Use before passing data across an agent boundary.
Deterministic, fixture-verified, free for guests (rate-limited; pass your Guild api_key to use your member budget). Returns the result plus a Guild-signed provenance envelope.
payload MUST match this JSON Schema:
{"type": "object", "properties": {"instance": {}, "schema": {"type": "object"}}, "required": ["instance", "schema"], "additionalProperties": false}
Output schema: {"type": "object", "properties": {"valid": {"type": "boolean"}, "errors": {"type": "array"}, "error_count": {"type": "integer"}}, "required": ["valid", "errors", "error_count"], "additionalProperties": false}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api_key | No | ||
| payload | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||