Skip to main content
Glama

Agent Data Tools: Utilities

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 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

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

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. First observed

TDQS

A4.1/5.0
Behavior4/5

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

The annotations already cover safety (readOnlyHint true, destructive false, openWorld false) and non-idempotency, so the description only had to add context; it adds real context, namely per-call billing through x402 USDC or a card key, the first 10 calls being free, and failed calls being free, along with the explicit 'reads or computes only and changes nothing' claim. This is useful beyond the annotations, though it says nothing about error behavior or output limits.

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?

It is well front-loaded, with capability, delimiter handling, and output shape stated first, then a usage note and an example. Pricing and credits details are relevant but make the final sentence dense, and the inline example is slightly malformed and truncated.

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?

This is a simple two-parameter tool, and it covers the input shape, the output shape (an array of objects keyed by the header row), and the billing or side-effect profile. Information about error behavior and edge cases, such as empty input or duplicate headers, is missing, but that is a small gap.

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 the description only has to document the parameters already in the schema, and it does mention the header-row assumption and the numbers=true behavior. However, that restates the schema's own text about numeric conversion and the default of leaving numbers as text, so it adds little meaning and leaves the accepted string or number forms for 'numbers' unexplained.

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?

It names a specific verb and resource ('Convert CSV ... to a JSON array of objects') and spells out the scope: supported delimiters with auto-detection, quoted fields, and the first row as keys. That is enough for an agent to tell it apart from siblings such as json_to_csv or csv_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 Guidelines4/5

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

It gives a clear use context ('Use to load spreadsheet exports into an agent') and a concrete example, so the agent knows when to reach for it. It stops short of explicitly naming an alternative, such as json_to_csv for the opposite direction, or of stating when not to use it.

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.

Resources