Skip to main content
Glama

convert_data

Read-onlyIdempotent

utilpeek: Convert data between JSON, YAML, CSV, TOML and XML. To check JSON against a schema use validate_json. Returns converted text. XML groups children by tag and joins text by default. For XML to JSON, set preserve_xml_order: true to keep text and child elements in order. Optional: delimiter, indent, preserve_xml_order.. CSV skips one leading BOM; values stay strings. Dates: ISO strings or native TOML dates. XML DTDs and entities are refused. YAML aliases are bounded; the loader can collapse equivalent keys. Parsed in an isolated, resource-limited child process without network; input over its limits is a 422 (not charged). Typically under 1 s, up to a few seconds for 1 MB. Price: USD 0.001. Free: 10 utilpeek calls per IP per UTC day. The submitted text is never logged or stored. Docs: https://tanod.dev/learn/convert-data-formats-api.html

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": {
      "input": "<input>",
      "from": "<from>",
      "to": "<to>"
    },
    "name": "convert_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesOutput format.
fromYesInput format.
inputYesDocument, up to 1 MB UTF-8.
indentNoJSON indent; 0 for compact.
delimiterNoCSV delimiter.,
preserve_xml_orderNoKeep text and child order (XML to JSON only).

Output Schema

NameRequiredDescriptionDefault
toNo
fromNo
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
outputNo
sourceNo
output_bytesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / delimiter / description
      Previous value: -"CSV delimiter (input and output)."New value: +"CSV delimiter."
    • changedInput schema / properties / from / description
      Previous value: -"Input format: json, yaml, csv, toml or xml."New value: +"Input format."
    • changedInput schema / properties / indent / description
      Previous value: -"JSON output indentation (0 = compact, default 2)."New value: +"JSON indent; 0 for compact."
    • changedInput schema / properties / input / description
      Previous value: -"The document as a string (at most 1 MB UTF-8)."New value: +"Document, up to 1 MB UTF-8."
    • addedInput schema / properties / preserve_xml_order
      Added value: +{
      +  "default": false,
      +  "description": "Keep text and child order (XML to JSON only).",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / to / description
      Previous value: -"Output format: json, yaml, csv or toml."New value: +"Output format."
  2. Changed7 schema fields changed
    • removedInput schema / properties / delimiter / title
      Removed value: -"Delimiter"
    • removedInput schema / properties / from / title
      Removed value: -"From"
    • removedInput schema / properties / indent / title
      Removed value: -"Indent"
    • removedInput schema / properties / input / title
      Removed value: -"Input"
    • removedInput schema / properties / to / title
      Removed value: -"To"
    • removedInput schema / title
      Removed value: -"convert_dataArguments"
    • removedOutput schema / properties / source / properties
      Removed value: -{
      -  "library": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "license": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  }
      -}
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "error": {
      +      "description": "Only on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object."
      +    },
      +    "from": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "output": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "output_bytes": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "source": {
      +      "properties": {
      +        "library": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "license": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "to": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  4. Added

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety is covered structurally; the description nonetheless adds real operational context: an isolated, network-less, resource-limited child process, a 422 on oversized input that is "not charged", typical latency, and that input is never logged or stored. That is solid added value, but the pricing and free-tier sentences are commercial rather than behavioral, keeping it from the top of the scale.

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?

Purpose and the sibling alternative are front-loaded in the first sentence, and most sentences carry usable facts (BOM handling, DTD/entity refusal, YAML alias bounds, input limits). It is somewhat overloaded with pricing/marketing detail and contains a sloppy fragment ("Optional: `delimiter`, `indent`, `preserve_xml_order`..") with a stray double period.

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?

For a six-parameter converter the definition covers limits (1 MB, min 1), failure mode (422, not charged), latency expectations, security posture, and format-specific edge cases (XML DTDs/entities refused, CSV BOM, YAML aliases). An output schema exists, so the brief "Returns converted text" is sufficient rather than a gap.

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 all six parameters are already documented in-schema and the baseline is 3. The description does add genuine meaning beyond the schema for XML ordering/grouping behavior and for value typing ("CSV ... values stay strings", "Dates: ISO strings or native TOML dates"), but `delimiter`, `indent`, and `preserve_xml_order` are only listed by name rather than explained.

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 data between JSON, YAML, CSV, TOML and XML" gives a specific verb and explicit resource set, and it names validate_json as the sibling for schema checking. The one flaw is fidelity: XML is listed as a conversion target alongside the others, yet the `to` enum only allows json/yaml/csv/toml, so an agent skimming the first sentence could attempt an unsupported output format.

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 routes the agent away from this tool when the goal is schema checking ("To check JSON against a schema use validate_json"), which is clear alternative-selection guidance. It stops short of a general when-to-use statement or when-not-to-use conditions beyond that single sibling.

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