Skip to main content
Glama

util_xml_json

Read-only

XML to JSON converter — Convert XML (RSS/Atom feeds, SOAP responses, sitemaps, config files) to clean JSON offline: attributes as @name, mixed text as #text, repeated child elements become arrays, CDATA kept as text, entities decoded, comments/processing instructions/DOCTYPE skipped; tolerant of unclosed tags (reported as warnings). Pass xml= (text) or url= (fetches the XML document, max 1 MB). Options: attrs=false drops attributes, strip_ns=true removes namespace prefixes. Returns json, root name and stats (elements, attributes, depth). Price: $0.002 USDC (Base, via x402).

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": "util_xml_json"
  }
}

Input Schema

NameRequiredDescriptionDefault
xmlYesXML text, e.g. <note><to>Ann</to><to>Bob</to></note> (or use url= instead)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (readOnly, non-destructive, openWorld), it discloses the conversion semantics in detail: attributes become @name, mixed text becomes #text, repeated children become arrays, CDATA preserved, entities decoded, comments/PIs/DOCTYPE dropped, and malformed tags degrade to warnings. It also surfaces operational constraints annotations cannot carry — the 1 MB fetch cap and the $0.002 USDC x402 payment requirement.

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?

Content is front-loaded: purpose first, then conversion rules, then input modes, then options, then return shape and price. It is dense and largely non-redundant, though the conversion-rules clause is a long semicolon chain that is harder to scan than a short bulleted listing would be.

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?

There is no output schema, and the description compensates by naming the return payload (json plus root name and stats for elements, attributes, depth). Combined with the documented options, error-tolerance behavior, and payment/cost note, an agent has everything needed to call it and interpret the result.

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

Parameters4/5

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

Schema coverage is 100% for the single documented xml parameter, so the baseline is a 3; the description earns above that by documenting options absent from the schema (attrs=false, strip_ns=true) and the url= input path, which the schema does not expose at all. The example format for xml is also given in prose.

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 opens with a specific verb and resource ('XML to JSON converter') and enumerates concrete input classes (RSS/Atom feeds, SOAP, sitemaps, configs), which distinguishes it clearly from siblings like util_convert or util_csv. An agent can decide whether this tool applies without opening the schema.

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

Usage Guidelines4/5

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

It states the two invocation modes explicitly — pass xml= for raw text or url= to fetch a document (max 1 MB) — which is clear operational guidance. It does not name an alternative tool or an exclusion case, so it stops short of full when/when-not routing.

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