Skip to main content
Glama

json_to_csv

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. Side effects: none on any outside system (it only reads or computes), but each successful call costs $0.001 in USDC on Base or another supported network, paid with x402, or the same amount in prepaid card credits when the request carries an API key from /credits. That payment is why the tool is not marked read-only or idempotent: repeating a call charges again. Failed calls are never charged.

Input Schema

TableJSON 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?

The description goes well beyond the annotations: it explains the per-call cost ($0.001 in USDC on Base via x402, or prepaid credits when an API key from /credits is present), and explicitly ties that cost to why readOnlyHint=false and idempotentHint=false (repeat calls charge again). It also states failed calls are never charged and that there are no external side effects.

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-loads the core conversion behavior and output shape, then usage, then the pricing/side-effect caveat. The payment paragraph is longer than most definitions carry, but each clause (cost amount, payment rails, why not read-only/idempotent, failed calls free) is load-bearing and not repeated elsewhere.

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 one-parameter converter with no output schema, the description fully covers input expectations, output format (header row, nested-as-JSON), typical use, and the non-obvious cost/idempotency behavior. Nothing an agent needs to invoke it correctly is missing.

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?

There is a single parameter with 100% schema description coverage, so the schema already documents 'text' as a JSON array of objects. The description restates that same type and adds only the nested-value serialization behavior, which is output semantics rather than parameter guidance; baseline 3 applies.

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+resource (convert JSON array of objects to CSV) and specifies the exact output contract: a header row built from all keys, with nested values written as JSON. This is precise enough that an agent can distinguish it from the inverse sibling csv_to_json without opening either schema.

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?

Provides a clear use context ('export API results to a spreadsheet'), which is enough to select the tool. It stops short of naming csv_to_json as the inverse alternative or stating any when-not conditions, so it sits below the explicit routing seen in top-tier definitions.

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