Skip to main content
Glama

CSV to XML API - convert CSV or TSV into validated XML 1.0

csv_to_xml
Read-onlyIdempotent

Convert CSV or TSV text, or a base64 file, into clean, validated XML 1.0. Finds the separator (comma, semicolon, tab, pipe) and the encoding (UTF-8, UTF-16, Windows-1252, Windows-1251), turns column names into valid XML names (spaces, symbols, leading digits and duplicates fixed), writes columns as child elements or attributes, and handles empty cells as empty tags, omitted, or xsi:nil. Pretty or minified. Deterministic, 0 AI, nothing stored. Free: 5 calls/day per IP. Paid: Radar API key (from €15/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.001/call via x402 at https://radarbg.com/x402/csv-to-xml.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "csv": "Order ID;Customer;Total (EUR)\nA-100;Atlas Garage;146,00\nA-101;Müller & Söhne;54,40",
      "rowName": "order",
      "rootName": "orders"
    },
    "name": "csv_to_xml"
  }
}

Input Schema

NameRequiredDescriptionDefault
csvNoCSV or TSV text to convert (empty = built-in sample orders table)
formatNoPretty-printed or single-line minified XMLpretty
indentNoSpaces per level when format=pretty2
rowNameNoElement name for each CSV rowrow
fileNameNoOptional file name, e.g. orders.csv
rootNameNoRoot XML element namerows
columnsAsNoWrite each column as a child element or as an attribute of the rowelements
delimiterNoColumn separator; auto finds it from the first rowsauto
hasHeaderNoFirst row holds the column names (false = columns are named col_1, col_2 ...)
emptyCellsNoEmpty cells: empty tag, left out, or xsi:nil='true' (elements only)empty
fileContentNoOptional base64-encoded .csv / .tsv / .txt file (max 5 MB), used instead of csv
xmlDeclarationNoInclude <?xml version='1.0' encoding='UTF-8'?> header

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Well beyond the annotations: the description discloses automatic delimiter and encoding detection with the exact supported sets, XML-name sanitization of headers, empty-cell modes, determinism, that nothing is stored, and concrete rate-limit/auth terms (5 calls/day per IP, X-API-Key, x402 per-call pricing). These are exactly the operational facts an agent needs before calling.

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?

Capability is front-loaded and most of the text is dense with real information. The pricing/auth block is long and appended as a run-on with URLs, which is useful but crowds the paragraph and slightly blurs the core purpose.

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 12-parameter tool with no output schema, the description covers invocation behavior, input affordances, auth and limits thoroughly. What it lacks is any statement of the return shape (a single XML string vs. a download) or error behavior for malformed CSV, which would matter for a zero-required-parameter endpoint.

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%, so the baseline is 3; the description earns above that by explaining behaviors the enum labels alone don't convey — how separator and encoding are auto-detected, how column names are repaired (spaces, symbols, leading digits, duplicates), and that nil mode is elements-only. It does not touch fileName, xmlDeclaration or hasHeader, which keeps it from a 5.

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 names a specific verb and both source and target formats (CSV/TSV text or base64 file into validated XML 1.0), and the surrounding detail makes clear this is not json_to_xml, xml_to_json or csv_to_vcard. An agent can select this tool 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 Guidelines3/5

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

Usage is implied by the conversion framing and the free-tier/paid-tier access explanation tells an agent what credentials or payment path are needed. However, there is no explicit 'use this instead of X' routing to the near siblings (csv_to_vcard, json_to_xml, data_convert), so alternative selection is left to inference.

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