Skip to main content
Glama

Convert CSV and JSON

convert_csv_json
Read-onlyIdempotent

Convert CSV to JSON or JSON to CSV. Supports comma, tab, semicolon, and pipe delimiters, an optional header, type inference, and dotted flattening. Inferred numbers that do not fit in a JavaScript number keep their digits.

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": "convert_csv_json"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes
headerNo
flattenNoUsed when converting JSON to CSV. Nested keys become dotted columns.
delimiterNoComma, tab, semicolon, pipe, or auto. Auto is a comma when writing CSV.auto
directionNocsv-to-json
inferTypesNoUsed when converting CSV to JSON.

Output Schema

NameRequiredDescriptionDefault
okYes
rowsYes
errorYes
outputYes
columnsYes
warningYes
delimiterYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint=false, so the safety profile is covered. The description adds genuinely non-obvious behavior: supported delimiters, dotted flattening for nested keys, type inference, and the precision rule that out-of-range inferred numbers keep their digits. It does not cover error behavior for malformed input or what the output structure looks like.

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?

Three short sentences, front-loaded with the core operation, then capability details, then a narrow precision caveat. No filler or redundancy.

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 six-parameter converter with an output schema, read-only annotations, and full schema available for downstream shape, this is close to sufficient. Gaps are minor: no mention of the direction default, input size limits, or failure modes on malformed CSV/JSON.

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 only 50%, and the description compensates by naming the delimiter set, the optional header, type inference, and JSON-to-CSV flattening, which map onto the undocumented or partially documented parameters. It still says nothing about the required 'text' payload (size limits, encoding) or that direction defaults to csv-to-json.

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?

States a specific bidirectional verb and resource: 'Convert CSV to JSON or JSON to CSV.' An agent immediately knows the transformation domain. It does not distinguish itself from the overlapping sibling convert_data_format, so sibling differentiation is absent.

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?

Usage is implied by the purpose statement rather than stated: an agent can infer it is the tool for CSV/JSON text transformation. There is no explicit when-to-use, when-not-to-use, or named alternative (e.g., convert_data_format or convert_json_to_types) despite those siblings existing.

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.