xml_to_json
XML to JSON where the conversion rules are PRINTED IN THE RESPONSE (every other converter takes six decisions silently). attributes=@name, mixed text=#text, empty=null, repeated siblings=array, and force_array pins a path to array at cardinality 1 β the one-item bug that passes tests with three fixtures and throws in production with one. Namespace prefixes kept raw; DTD refused by name (no XXE surface ever); coerce=true converts only unambiguous numbers β 00713 stays a string, because it is an identifier. Free under 32 KB (π‘).
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": {
"xml": "<xml>"
},
"name": "xml_to_json"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml | Yes | document text | |
| coerce | No | ||
| force_array | No | slash paths, e.g. "catalog/book" β always arrays |