Skip to main content
Glama

export_result

DestructiveIdempotent

Write query results straight to a local CSV or JSONL file without passing rows through the conversation. Returns only path, row count, byte size, and completion status.

Instructions

Write every query match to a local file without sending the data through the conversation. JSONL accepts bare filtered matches and preserves nested values; CSV requires | pluck(…), | group(…) or | distinct. The response contains only format, path, exact row count, byte size and complete=true. Exports refuse rather than silently truncate when the 50 MB output safety limit would be exceeded. Output is streamed to a temporary file and published atomically; 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. export_csv is this tool fixed to CSV. Use convert for linked multi-table spreadsheets, and run_query when a bounded answer in the conversation is enough.

Input Schema

NameRequiredDescriptionDefault
docIdNoA docId returned by load_doc.
queryYesA path/predicate query, optionally with a table-producing pipe.
formatYesOutput format.
outPathYesWhere to write the result 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.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false. The description goes beyond them in useful ways: the 50 MB safety limit causes refusal rather than silent truncation, output is streamed to a temp file and published atomically, and an existing path is refused unless overwrite=true. That said, it does not mention permissions, whether the temp file location is configurable, or the cost/time profile of large exports, so it adds context but not a full behavioral picture for an idempotent-but-destructive write.

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?

Dense and front-loaded: the core promise lands in sentence one, then format rules, response guarantee, safety limit, atomicity, then sibling routing. Every sentence carries distinct information, though the enumeration of response fields ('format, path, exact row count, byte size, complete=true') partly duplicates the output schema and the paragraph is longer than strictly needed.

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 6-parameter write tool with a real output schema, the description covers what matters: which input mode to use, format-specific query constraints, overwrite behavior, failure mode at the size limit, and when to pick a sibling instead. Nothing an agent needs in order 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.

Parameters4/5

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

Schema coverage is 100%, so the baseline would be 3. The description earns above baseline by explaining the format/query coupling (JSONL takes bare filtered matches and preserves nesting; CSV requires a table-producing pipe) and the filePath-vs-docId trade-off ('open and export an input file in one call' vs 'reuse an open document'), which the schema one-liners do not convey.

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?

Opens with a specific verb+resource+distinguishing property: 'Write every query match to a local file without sending the data through the conversation.' It then explicitly separates this tool from export_csv ('this tool fixed to CSV'), convert, and run_query, so an agent can route correctly without opening any schema.

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 explicit alternatives with selection conditions: convert for linked multi-table spreadsheets, run_query when a bounded in-conversation answer suffices, export_csv for the CSV-fixed variant. It also states the format precondition for CSV (requires `| pluck(…)`, `| group(…)` or `| distinct`), which tells the agent when this call would fail.

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