Skip to main content
Glama

json_to_xml

Convert a JSON object or array into well-formed XML with configurable root and item names. Pure CPU, instant.

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": {
      "json": "<json>"
    },
    "name": "json_to_xml"
  }
}

Input Schema

NameRequiredDescriptionDefault
jsonYesJSON text to convert
rootNoRoot element name

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed3 schema fields changed
    • addedInput schema / properties / json
      Added value: +{
      +  "description": "JSON text to convert",
      +  "type": "string"
      +}
    • addedInput schema / properties / root
      Added value: +{
      +  "description": "Root element name",
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "json"
      +]
  4. Added

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the burden and does deliver real value: "Pure CPU, instant" tells the agent there is no network dependency, no side effects, and negligible latency. It stops short of stating error behavior for malformed JSON, whether output is a string, or how escaping is handled.

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?

Two short sentences, front-loaded with the core transformation and followed by the performance/behavior note. Nothing is redundant or padded.

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

Completeness4/5

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

For a simple two-parameter, side-effect-free utility with no output schema and no annotations, the description covers what the tool does and its cost profile. The minor gap is that the nature of the returned XML (string form, handling of arrays/attributes) is left to inference.

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 both parameters (json, root) are already documented, making 3 the baseline. The description's "configurable root and item names" adds a hint about customization but references an "item name" that has no corresponding declared property in the schema, leaving that capability ambiguous.

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?

"Convert a JSON object or array into well-formed XML" gives a specific verb and target format, and the mention of configurable root/item names indicates output shaping. The reverse-direction sibling (xml_to_json) is distinguishable by the tool name and description, though the description never names alternatives explicitly.

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?

Usage is only implied by the conversion framing; there is no explicit "use when you need X instead of Y" and no mention of when the xml_to_json counterpart should be preferred. "Pure CPU, instant" hints at a cheap local transform but is not stated as a selection criterion.

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