Validate, format and convert JSON or YAML
validate_json_yamlValidates JSON (RFC 8259) or YAML 1.2 and reports errors with line and column. When valid, returns the document pretty-printed, or converted between JSON and YAML, plus its depth and key count. Format is detected automatically unless given. Duplicate YAML keys are errors. Up to 200 KB; nothing is stored.
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": {
"text": "<text>"
},
"name": "validate_json_yaml"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The JSON or YAML document. | |
| format | No | 'json', 'yaml' or 'auto' (default). | |
| convert_to | No | Optional output format: 'json' or 'yaml'. |