schema-repair
Repair a JSON value toward a schema using only the coercions the caller declares — Validates a JSON value against a caller-supplied JSON Schema 2020-12 and applies only the coercions you list (for example string-to-integer for "42", trim-strings, enum-case, apply-defaults, drop-additional) when each one strictly reduces the number of schema errors. Every change is returned with its JSON pointer, the rule, the old and new value; every error that remains is returned with its exact
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"schema": "<schema>",
"value": "<value>",
"coercions": "<coercions>"
},
"name": "schema-repair"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | The JSON value to repair. | |
| schema | Yes | The schema the value must satisfy. Full JSON Schema 2020-12 (local $ref only). | |
| coercions | Yes | Coercions you allow. Empty means validate only. |