Skip to main content
Glama
Jambozx

OnlineCyberTools MCP (280+ filterable tools)

webdev_xml_to_json

Read-onlyIdempotent

Convert XML documents into JSON objects, preserving nesting, attributes, text nodes, and repeated elements. Supports numeric and boolean coercion, attribute prefix, and namespace stripping.

Instructions

XML to JSON Converter. Convert an XML document into a JSON object, preserving element nesting, attributes (with a configurable prefix), text nodes, and repeated siblings (collapsed into arrays), with optional numeric and boolean type coercion and namespace stripping. Parsing is a local regex tokenizer that never resolves or fetches external entities or DTDs, so it is XXE-safe and fully offline. Use format_json afterward to re-pretty-print or minify the result, webdev_json_to_csv to flatten JSON into CSV, or webdev_xml_formatter to tidy XML without converting it. Read-only, non-destructive, contacts no external service, rate-limited to 30 requests per minute for anonymous callers. Returns the JSON string plus the parsed data object, an isValid flag, errors, and element/attribute statistics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xmlYesThe XML document to convert. Must be non-blank and have a single root element. Mismatched or unclosed tags produce an isValid false result with an error message.
prettyPrintNoIndent the JSON output with two spaces when true; emit compact single-line JSON when false.
preserveAttributesNoInclude element attributes in the output (each key prefixed by attributePrefix) when true; drop all attributes when false.
attributePrefixNoPrefix prepended to attribute names so they do not collide with child element keys.@
textNodeNameNoKey used to hold an element text value when that element also has attributes or child elements._text
removeEmptyNodesNoOmit elements whose converted value is empty (empty string, empty object, or null) when true.
numericConversionNoCoerce numeric-looking text values into JSON numbers when true; keep them as strings when false.
booleanConversionNoCoerce the literal text true and false into JSON booleans when true; keep them as strings when false.
ignoreNamespacesNoStrip namespace prefixes from element and attribute names (for example soap:Body becomes Body) when true.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
originalNoThe submitted XML, echoed back.
jsonNoThe JSON output as a string (indented or compact per prettyPrint).
dataNoThe parsed JSON value as a structured object (null when parsing failed).
isValidNoTrue when the XML parsed successfully and JSON was produced.
errorsNoParse or validation error messages (empty when isValid is true).
warningsNoNon-fatal warning messages.
statsNoCounts and metrics describing the converted document.
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, destructiveHint, idempotentHint. The description adds valuable behavior details: local regex tokenizer, no external entity resolution, offline operation, rate limits, and return structure (isValid flag, errors, statistics). No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single dense paragraph that covers multiple aspects efficiently. Every sentence adds value, but it could be more scannable with bullet points or shorter sentences. Still, it is not overly verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (9 parameters, output schema exists), the description covers all essential aspects: purpose, usage alternatives, behavior, constraints, and return values. The existence of an output schema reduces the need to explain return format, but the description still mentions it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description summarizes key parameters (prettyPrint, attributePrefix, etc.) but adds minimal extra meaning beyond schema descriptions. It does not explain parameter interactions or provide examples.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's verb ('Convert'), resource ('XML document'), and output ('JSON object'). It distinguishes from sibling tools like webdev_xml_formatter and webdev_json_to_csv by naming them explicitly and advising when to use each.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly tells when to use this tool (XML to JSON conversion) and when to use alternatives (format_json, webdev_json_to_csv, webdev_xml_formatter). It also describes important constraints: XXE-safe, offline, rate-limited.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Jambozx/onlinecybertools-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server