Skip to main content
Glama

CSV / JSON converter

csv_json
Read-onlyIdempotent

Converts CSV text to JSON or JSON to CSV (direction: csv-to-json or json-to-csv), for data passed inline. CSV must be comma-separated, with a header row and at least one data row; double-quoted fields may contain commas. Semicolon- or tab-separated input is not detected and comes back as a single column. JSON input must be an array of objects: the union of their keys becomes the CSV header and missing values are left empty. Returns result (the converted text), rows and cols. Max 500,000 characters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesThe CSV or JSON text to convert, matching the chosen direction.
directionYesEither 'csv-to-json' or 'json-to-csv'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / direction / description
      Previous value: -"Either \\\"csv-to-json\\\" or \\\"json-to-csv\\\"."New value: +"Either 'csv-to-json' or 'json-to-csv'."
  2. Changed2 schema fields changed
    • changedInput schema / properties / data / description
      Previous value: -""New value: +"The CSV or JSON text to convert, matching the chosen direction."
    • changedInput schema / properties / direction / description
      Previous value: -""New value: +"Either \\\"csv-to-json\\\" or \\\"json-to-csv\\\"."
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false. The description adds substantive operational context beyond them: the 500,000-character limit, the requirement for a header row and at least one data row, the single-column fallback for semicolon/tab input, and 'union of keys becomes header with missing values empty'. It does not, however, describe error behavior or how the limit is enforced (truncation vs rejection).

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?

Four compact sentences that are front-loaded with purpose and direction values, then constraints, then return shape, then limit. No filler; each clause carries actionable information.

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 2-param, read-only, no-output-schema tool, the description is nearly sufficient for correct invocation: it covers input syntax, direction, limits, and even the return fields. The only missing element is failure behavior (malformed JSON, oversized input), which keeps it from a 5.

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 baseline is 3. The description goes beyond it by specifying the exact permitted direction values and the data-format constraints that the schema does not (comma-separated, header row, min one data row, quoted fields, array-of-objects requirement). This is genuine added semantic value.

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?

States a specific bidirectional verb+resource: 'Converts CSV text to JSON or JSON to CSV'. It enumerates the allowed direction values and is clearly distinguishable from all siblings, none of which perform format conversion.

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?

The description clearly scopes the tool to inline data ('for data passed inline') and names the direction values that select each mode. There is no explicit statement of when NOT to use it or an alternative tool for file-based conversion, so it stops short of a 5.

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.