Skip to main content
Glama

JSON to CSV, array to table: convert a JSON array of objects into CSV

json_to_csv
Read-only

Convert a JSON array of objects to CSV with a header row built from all keys. Nested values are written as JSON. Use to export API results to a spreadsheet. Example: text=[{"name":"Ada","age":36},{"name":"Alan","age":41}]. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Input Schema

NameRequiredDescriptionDefault
textYesA JSON array of objects

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover read-only, non-destructive, non-idempotent, open-world, but the description adds the non-obvious parts: per-call billing ($0.01 via x402/card key, first 25 free, failed calls free) and that repeats are not free, which operationalizes idempotentHint=false. It still omits edge behavior such as empty arrays, objects with disjoint keys, or CSV quoting/escaping.

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?

Front-loaded with the transformation and output shape, then usage, then a compact concrete example, then cost caveats. Every sentence carries information the agent needs.

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?

With no output schema, the description must convey the return format, and it does (header row from all keys, nested values as JSON) while also flagging the pricing model. Missing detail on uneven keys/delimiter escaping is the only real gap for a single-parameter tool.

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 3 applies, but the description adds real meaning: the input must be an array of objects and the header row is the union of all keys, with nested values serialized as JSON. The worked example with two records makes the expected input concrete.

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 and both resource types ('Convert a JSON array of objects to CSV') plus the output shape ('header row built from all keys'). This clearly separates it from the reverse sibling csv_to_json and the other json_* tools.

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?

'Use to export API results to a spreadsheet' gives a concrete triggering scenario. It does not name the inverse tool (csv_to_json) or state when not to use it, so it stops short of full routing guidance.

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.