Skip to main content
Glama

export_csv

DestructiveIdempotent

Run a query and stream its full result table to a CSV file, returning only the file path, row count and byte size so the rows never enter the conversation.

Instructions

The CSV-only shortcut for export_result: run a query and write its complete table to a CSV file (RFC 4180, exact digits, formula-injection safe). Returns only the path, row count and byte size — the rows themselves never enter the conversation. The query must produce a table: use | pluck(…), | group(…) or | distinct. The file is streamed and published atomically, with the same 50 MB limit; an existing path is refused unless overwrite=true. Pass filePath to open and export an input file in one call, or docId to reuse an open document. For JSONL or nested values use export_result; for linked multi-table spreadsheets, convert.

Input Schema

NameRequiredDescriptionDefault
docIdNoA docId returned by load_doc.
queryYesA query producing rows or groups.
outPathYesWhere to write the CSV file.
filePathNoInput file to open now instead of supplying docId.
overwriteNoReplace an existing path atomically (default false).

Output Schema

NameRequiredDescriptionDefault
okYes
hintNo
toolYes
errorNo
evictedNo
structuredTruncatedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Adds substantial behavioral context beyond the annotations: returns only path, row count and byte size; rows never enter the conversation; file is streamed and published atomically; 50 MB limit; existing path refused unless overwrite=true. These details go well beyond the destructive/idempotent hints and clarify what the tool actually does.

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-loads the core purpose in the first sentence and then layers constraints, return behavior, and alternatives in a tight sequence. Despite covering several complex points, every sentence carries useful information.

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?

Complete for a complex export tool: it covers output behavior, atomicity, size limits, overwrite semantics, query constraints, and sibling alternatives. Output schema exists, but the description reinforces the key return contract rather than omitting it.

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 the baseline is 3. The description still adds meaning: filePath opens and exports an input file in one call, docId reuses an open document, and overwrite controls whether an existing path is replaced. It also explains the query shape required by the query parameter.

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: run a query and write its complete table to a CSV file. It explicitly positions itself as the CSV-only shortcut for export_result and distinguishes CSV from JSONL/nested exports and multi-table spreadsheets.

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

Usage Guidelines5/5

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

Gives clear when-to-use guidance: use this for CSV, use export_result for JSONL or nested values, and convert for linked multi-table spreadsheets. It also specifies that the query must produce a table and names the operators that do so.

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