Skip to main content
Glama

CSV to JSON

csv_to_json
Read-onlyIdempotent

Converts CSV/TSV data from text or a file into pretty-printed JSON objects or arrays while detecting delimiters, reading headers, and typing numbers, booleans, and nulls.

Instructions

Convert CSV/TSV to JSON with an RFC 4180 parser (quoted fields, "" escapes, line breaks inside quotes, CR/LF/CRLF, BOM). Detects the delimiter (comma, semicolon, tab, pipe), uses the first row as headers (blank → column_N, duplicates → name_2), and can type values (numbers, true/false, null; long digit strings like IDs stay strings). Output: array of objects or array of arrays, pretty-printed. Give "text" or a file "path". Web version: https://s3eidat.github.io/csv-json/

Input Schema

NameRequiredDescriptionDefault
pathNoOr: a path to a CSV/TSV file (UTF-8; use this for big inputs).
textNoThe CSV as inline text.
shapeNo"objects" (one object per row) or "arrays" (rows as arrays).objects
typesNoTurn numbers, true/false and empty/null into JSON types (default true).
headerNoFirst row is a header (default true).
outputNoOptional: also write the result to this file path (or folder ending in "/"). The result text is then left out of the reply. Results over 1,000,000 characters are always written to a file.
delimiterNoDelimiter: "auto" (detect), ",", ";", "tab" or "|".auto

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/local-only, so the description is not carrying the safety burden. It still adds real behavior detail beyond them: RFC 4180 handling, delimiter detection, header dedup naming (name_2), numeric typing with ID-string preservation, and a 1,000,000-character threshold that silently redirects output to a file. The one gap is that output-file overwrite behavior is only sketched in the schema, not the description.

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?

A single dense paragraph that front-loads the core capability and parsing guarantees, with no filler sentences. It is information-rich but somewhat packed; the web-version URL at the end is mildly extraneous for an agent caller.

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 7-parameter, zero-required tool with no output schema, the description covers input sourcing, delimiter/header/typing behavior, and the shape of the returned array. It is nearly complete, with only the file-overwrite/side-effect semantics of the 'output' parameter left to the schema text.

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, but the description adds meaning the schema doesn't: blank headers become column_N, duplicate headers become name_2, long digit strings stay strings under typing, and 'objects' vs 'arrays' is framed as the output shape. This is genuine added semantics rather than restatement.

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+resource ('Convert CSV/TSV to JSON') and immediately scopes the parser behavior, which cleanly separates it from the sibling json_to_csv. An agent can identify the direction of conversion and the supported input formats 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 Guidelines4/5

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

Gives concrete input-mode guidance ('Give "text" or a file "path"') and notes the file path route is for big inputs. It does not explicitly contrast against json_to_csv or ai_csv_profile, so routing between siblings is left partly to inference, but the intended use context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools