Skip to main content
Glama

JSON to CSV

json_to_csv
Read-onlyIdempotent

Convert a JSON array of objects to CSV, using the union of all keys as columns and JSON-encoding nested values for tabular export.

Instructions

Convert a JSON array of objects to CSV. Columns are the union of all keys; nested values are JSON-encoded. (Same as IT-Tools /json-to-csv.)

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": {
      "json": "<json>"
    },
    "name": "json_to_csv"
  }
}

Input Schema

NameRequiredDescriptionDefault
jsonYes
delimiterNo,

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, closed-world), and the description adds genuine behavioral detail: columns are the union of all keys and nested values are JSON-encoded. That tells the agent how ragged/missing keys and nested structures are handled, which it could not have known from the annotations. It still omits quoting/escaping and header-row behavior.

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?

Two front-loaded sentences plus a short parenthetical, with no filler prose. The IT-Tools reference is mildly useful as an implementation pointer but earns less of its place than the behavioral sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple pure-function converter with no output schema, the agent still lacks the return type/format (presumably a CSV string), header-row behavior, and any mention of the delimiter option. What is present is accurate and relevant, but the definition is not fully self-sufficient for invoking both parameters correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description carries the full burden. It clarifies the 'json' input's expected shape (array of objects, nested values JSON-encoded), which is useful, but the 'delimiter' parameter is never mentioned despite being the only knob for output formatting. Half the parameters remain undocumented in both schema and description.

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 verb and resource ('Convert a JSON array of objects to CSV') and narrows the input shape to an array of objects, which distinguishes it in practice from siblings like json_yaml_convert. It does not explicitly contrast itself with those siblings, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance and no named alternative for adjacent tasks (e.g. json_format or json_yaml_convert). The only usage signal is the implied 'you have JSON, you want CSV' from the name, with the IT-Tools reference serving as a pointer rather than guidance.

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