Skip to main content
Glama

Export CSV

export_csv
Destructive

Save an Excel worksheet range as CSV/TSV, including formula results, with controls for delimiter, encoding, formatting, overwrite, and formula escaping.

Instructions

Export a range (formula results) as a CSV file, like Save As CSV.

Text starting with = + - @ gets a ' prefix unless escape_formulas is false.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
rangeNoe.g. 'A1:D20'. Default: the used range.
sheetYes
csv_pathYes.csv or .tsv file, located like workbooks.
encodingNo'utf-8-sig' adds a BOM, which Excel needs for UTF-8.utf-8
delimiterNocomma
formattedNoApply number formats, as Excel shows cells; else raw values.
overwriteNoReplace an existing file (else an error).
escape_formulasNoPrefix text starting with = + - @ with ' so Excel does not run it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.2.1

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is covered. The description earns credit by disclosing a non-obvious behavior beyond the annotations: text beginning with = + - @ is prefixed with ' unless escape_formulas is false. It still doesn't elaborate on overwrite/destruction behavior, keeping it short of a 5.

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?

Two tight sentences with zero waste; the core purpose is front-loaded and the formula-escaping caveat follows. Nothing extraneous.

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?

For a 9-parameter, destructive, no-output-schema tool, the description covers the core action and one surprising behavior, and the file-writing nature is implied by 'CSV file'. It could say more about overwriting and the required path/sheet/csv_path trio, but the schema covers those, so gaps are minor.

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?

Schema description coverage is 67% (6 of 9 parameters), so the schema does most of the work. The description's formula-escaping sentence merely restates what the escape_formulas schema description already says, adding little new meaning for any parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Export) and resource (a range as a CSV file), plus the 'like Save As CSV' analogy that pins down the operation. It implicitly contrasts with export_workbook by scoping to a range, but never names the sibling, so differentiation is left to inference.

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?

Usage is only implied: the agent can infer you call this when you want a range written to CSV. There is no explicit when-to-use guidance, no statement of when to prefer export_workbook, import_csv, or write_range, and no prerequisites.

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