Skip to main content
Glama

Agent Data Tools: Utilities

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

Input Schema

NameRequiredDescriptionDefault
textYesA JSON array of objects

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already mark it read-only and non-destructive, but the description adds material context beyond them: nested values are emitted as JSON, failures are free, and each call is billed so repeats are not free — which explains the idempotentHint=false charging behavior. This is genuinely useful behavioral detail.

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?

Front-loaded with the core conversion semantics, then pricing and safety notes. Some pricing detail is verbose, but each sentence carries information an agent would otherwise lack.

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

Completeness5/5

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

For a single-parameter transformation with no output schema, the description covers input format, output format, nested-value handling, and cost/safety implications. Nothing essential is missing.

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?

Only one parameter, already 100% covered by the schema as 'A JSON array of objects'. The description still adds value with a concrete input example showing the expected array-of-objects shape.

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 resource ('Convert a JSON array of objects to CSV') and specifies the output shape (header row from all keys, nested values as JSON). Its direction is unambiguous against siblings like csv_to_json.

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?

Gives a use case ('export API results to a spreadsheet') but no explicit when-not-to-use guidance or named alternative such as csv_to_json for the reverse direction. Usage is implied rather than routed.

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