Skip to main content
Glama

CSV to JSON

csv_to_json
Read-onlyIdempotent

Convert CSV to JSON with a strict RFC 4180 parser: quoted fields, escaped quotes, embedded newlines, CRLF, BOM. Auto-detects the delimiter (comma, semicolon, tab, pipe) or takes one; uses the first row as keys by default (or returns arrays), and optionally infers numbers, booleans and empty-as-null. Pass CSV text or a URL to fetch (max 2 MB, 10,000 rows returned; truncation is flagged). Deterministic, no AI.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "csv_to_json"
  }
}

Input Schema

NameRequiredDescriptionDefault
csvNoCSV text (provide csv OR url)
urlNoPublic URL of a CSV file to fetch instead
headerNoTreat the first row as column names and return objects (default true); false returns arrays
maxRowsNoMaximum data rows to return, up to 10,000 (default 10,000)
delimiterNoField delimiter: ',', ';', '|', or 'tab' (default auto-detect)
inferTypesNoConvert numbers, true/false, and empty cells to null (default true); false keeps every value a string
skipEmptyLinesNoDrop blank lines (default true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior5/5

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

Annotations already declare this a pure, idempotent, non-destructive read, and the description adds substantial context beyond them: the 2 MB fetch cap, the 10,000-row return limit with truncation being flagged, and the deterministic, no-AI execution model. Those operational limits and the truncation signal are exactly the behavioral facts an agent cannot get from the annotations.

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?

Front-loaded with the core operation, then progressively narrower detail on parsing behavior, input options, and limits; there is little waste. The middle sentence is dense and packs several independent options together, which slightly hurts scanability, but no sentence is filler.

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 seven-parameter conversion tool with no output schema, the description covers input modes, output shape (objects vs arrays), type coercion, size limits, and truncation reporting. The remaining gap is error behavior — what happens with malformed CSV or a non-CSV URL — and whether the response is a JSON string or object, neither of which is stated.

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 seven parameters are already documented with defaults and meanings; the description largely restates them (delimiter list, header default, type inference, empty-as-null). It adds minor value by tying maxRows to the 10,000-row cap and by noting the URL fetch ceiling, but does not go beyond the schema in any meaningful way. Baseline 3 applies.

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?

A specific verb+resource ("Convert CSV to JSON") plus concrete scope details: RFC 4180 quoting, delimiter auto-detection, header-row handling, and type inference. The purpose is unmistakable and no sibling in the catalog competes with it, though the description never explicitly differentiates itself from conversion-adjacent siblings like structured_data_extract or url_to_markdown.

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?

"Pass CSV text or a URL to fetch" tells the agent how to feed input, and the defaults imply expected usage. But there is no explicit when-to-use/when-not guidance, no mention of failure conditions (invalid CSV, non-CSV content at a URL), and no comparison to any sibling tool that also ingests URLs.

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.