JSON Schema validation, inference, and coercion. Validates data against schemas, infers schemas from example data, and coerces values to match target types. Pure JVM operations.
| Name: | schema |
| Class: | covia.adapter.SchemaAdapter |
This adapter provides 5 MCP tool(s) for AI agent integration:
| Tool Name | Description |
|---|---|
| schema_check | Check whether a JSON Schema is structurally valid (well-formed). Validates type values and property/items structure. Does not reject unknown annotation keywords (per JSON Schema spec). |
| schema_infer | Infer a JSON Schema from an example value. Produces the tightest schema that accepts the given value. Useful for schema discovery and documentation. |
| schema_coerce | Coerce a value to match a schema where possible. Handles common type mismatches: string-to-number, string-to-boolean, etc. Returns the original value if no coercion is possible. |
| schema_validate | Validate a value against a JSON Schema. Returns {valid: true} if the value conforms, or {valid: false, error: '...'} with the first violation found. |
| schema_validate_all | Validate a value against a JSON Schema and return all violations (not just the first). Returns {valid: true/false, errors: [...]}. |