Skip to main content
Glama

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.7/5.0
Behavior5/5

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

The description goes well beyond the annotations by disclosing parser limitations (semicolon/tab input is not detected), required CSV structure, JSON-to-CSV key union behavior, missing-value handling, the returned fields, and the 500,000-character limit. This is rich, actionable behavioral context.

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?

The description is compact and front-loaded with the primary purpose, followed by necessary format constraints and return information. Every sentence adds value, and there is no redundant repetition of the schema.

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 two-parameter conversion tool with no output schema, the description covers input requirements, both conversion directions, parsing edge cases, return values, and size limits. An agent has everything needed to select and invoke the tool correctly.

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?

The schema already covers both parameters at 100%, so the baseline is 3. The description adds meaningful constraints and format details for both 'direction' values and for the 'data' parameter, such as the need for a header row and the array-of-objects requirement for JSON.

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 the exact operation ('Converts CSV text to JSON or JSON to CSV'), the direction parameter values, and the inline-data scope. This is specific enough for an agent to know exactly what the tool does and to distinguish it from unrelated sibling utilities.

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 states that data must be passed inline and defines the accepted CSV and JSON shapes. It does not explicitly name alternative tools, but it provides enough context about when to use this tool and what input formats are required.

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.