Skip to main content
Glama

CSV to JSON: convert CSV text into a JSON array of objects

csv_to_json
Read-only

Convert CSV (comma, semicolon, tab or pipe; delimiter detected automatically; quoted fields supported) to a JSON array of objects using the first row as keys. Numbers stay as text unless numbers=true. Use to load spreadsheet exports into an agent. Example: text=name,age Ada,36. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Input Schema

NameRequiredDescriptionDefault
textYesThe CSV text, first row is the header
numbersNotrue to turn numeric cells into numbers

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / numbers / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "boolean"
      +]
  2. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, non-destructive, non-idempotent), and the description adds genuinely new context: per-call pricing, the 25-free-call allowance, failed calls being free, and the warning that repeats are not free because each call is charged. That pricing/idempotency reinforcement goes beyond the structured fields.

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?

Conversion behavior and the example are front-loaded, and the pricing sentence is compact despite covering several facts. Slightly dense at the end, but every sentence carries 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?

With no output schema, the description correctly explains the return value (array of objects keyed by the header row) and covers input formats. It stops short of edge cases — ragged rows, malformed CSV, empty input — which would matter for an agent handling messy exports.

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 are already documented; the description's note that numbers stay text unless numbers=true largely restates the schema. It does add automatic delimiter detection and quoted-field handling, but those are behaviors rather than parameter semantics. Baseline 3 applies.

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 verb and resource (convert CSV to a JSON array of objects) plus the exact output shape — objects keyed by the first row. This clearly distinguishes it from siblings like json_to_csv, csv_to_markdown and html_table_to_json.

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?

It offers one concrete usage context ('load spreadsheet exports into an agent'), which is helpful, but never names an alternative or an exclusion — nothing tells the agent when to pick csv_to_markdown or html_table_to_json instead.

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.