Skip to main content
Glama

xml_to_json

Parse XML into an equivalent JSON tree with attributes and text preserved. Pure CPU, instant. Use to read SOAP, RSS or legacy feeds as JSON.

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

NameRequiredDescriptionDefault
xmlYesXML text to parse

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed2 schema fields changed
    • addedInput schema / properties / xml
      Added value: +{
      +  "description": "XML text to parse",
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "xml"
      +]
  4. Added

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden; 'Pure CPU, instant' usefully discloses that no network or auth is involved, and 'attributes and text preserved' hints at the conversion semantics. It does not say how malformed XML is handled or what the resulting tree structure looks like, which are the behaviors an agent most needs to know.

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

Conciseness5/5

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

Three short sentences, front-loaded with purpose, then cost profile, then usage context. No wasted words.

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

Completeness3/5

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

For a simple single-parameter converter with no output schema, the description should explain the shape of the returned tree and error behavior; it gestures at the shape ('attributes and text preserved') but leaves the output structure and failure modes unspecified.

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?

There is one parameter at 100% schema coverage, so the schema already documents it fully; the description adds no format, encoding, or size details beyond that, making the baseline 3 correct.

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

Purpose4/5

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

States a specific verb and resource ('Parse XML into an equivalent JSON tree') and the original naming makes the inverse of json_to_xml obvious even though no sibling is named. It is clear what the tool does, but it never explicitly differentiates itself from siblings like parse_rss_feed or json_to_xml.

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

Usage Guidelines3/5

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

'Use to read SOAP, RSS or legacy feeds as JSON' gives implied usage contexts, but offers no when-not guidance and does not mention the alternative parse_rss_feed or json_to_xml that an agent would choose between.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources