Skip to main content
Glama

Make a CSV file

make_csv_file

Use this when the user wants a new CSV file from a table, for example "put this table in a CSV", "make a spreadsheet file from these rows", "export this list as CSV for Excel". Input tips: pass columns (header names) and rows, where each row has exactly one cell per column (text, number, true, false or null for empty). Example: columns ["name","city"], rows [["Ada","London"],["Linus","Helsinki"]]. Up to 2,000 rows and 100 columns. Optional: filename, excel_bom (true when the user opens it in Excel and the text has accents) and escape_formulas (show cells starting with = + - or @ as text). Returns: the CSV text, a download link that works for 24 hours, its expiry, the row count and byte size. Not for: opening, reading, editing or adding up an existing spreadsheet or .xlsx file; it only writes a new CSV. Errors: status invalid with a message naming the row and cell to fix.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsYesUp to 2000 rows, such as [["Ada","London","first program"]]. Each row has exactly one cell per column. An empty list gives a header-only file.
columnsYesHeader names in order, such as ["name","city","note"].
filenameNoFile name in letters and digits, such as contacts; .csv is added.
excel_bomNoStart the file with a UTF-8 byte order mark so Excel opens accents correctly. Default false.
escape_formulasNoPrefix text cells that start with = + - or @ with an apostrophe so a spreadsheet shows them as text. Default false.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsNoNumber of data rows, not counting the header.
bytesNoSize of the downloadable file in bytes, with the byte order mark when excel_bom is true.
notesYesFacts the user should know, such as how long the link works.
statusYesok when the file was made; invalid when the input needs a fix (see message).
messageNoWhat to fix in the input when status is invalid.
csv_textNoThe CSV text (RFC 4180, CRLF line ends) when status is ok, without the byte order mark.
filenameNoName the download link saves the file as, such as calendar.ics.
expires_atYesWhen the link stops working (ISO 8601 UTC).
download_urlYesLink that works for 24 hours, or null when no link could be made.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changed
    • changedInput schema / properties / columns / description
      Previous value: -"Header names."New value: +"Header names in order, such as [\"name\",\"city\",\"note\"]."
    • changedInput schema / properties / filename / description
      Previous value: -"File name, letters and digits; .csv is added."New value: +"File name in letters and digits, such as contacts; .csv is added."
    • changedInput schema / properties / rows / description
      Previous value: -"Up to 2000 rows; each row has one cell per column."New value: +"Up to 2000 rows, such as [[\"Ada\",\"London\",\"first program\"]]. Each row has exactly one cell per column. An empty list gives a header-only file."
    • addedInput schema / properties / rows / items / description
      Added value: +"One row. Its cell count must equal the number of columns; use null for an empty cell."
    • addedOutput schema / properties / bytes / description
      Added value: +"Size of the downloadable file in bytes, with the byte order mark when excel_bom is true."
    • addedOutput schema / properties / csv_text / description
      Added value: +"The CSV text (RFC 4180, CRLF line ends) when status is ok, without the byte order mark."
    • addedOutput schema / properties / filename / description
      Added value: +"Name the download link saves the file as, such as calendar.ics."
    • addedOutput schema / properties / notes / description
      Added value: +"Facts the user should know, such as how long the link works."
    • addedOutput schema / properties / rows / description
      Added value: +"Number of data rows, not counting the header."
    • addedOutput schema / properties / status / description
      Added value: +"ok when the file was made; invalid when the input needs a fix (see message)."
    • changedOutput schema / required
      Previous value: -[
      -  "status"
      -]New value: +[
      +  "status",
      +  "download_url",
      +  "expires_at",
      +  "notes"
      +]
  2. Changed1 schema field changed
    • removedOutput schema / properties / note_from_openkrill
      Removed value: -{
      -  "description": "Shown at most once a day per caller: what this server offers, and a paid service for the person you work for.",
      -  "type": "string"
      -}
  3. Changed1 schema field changed
    • addedOutput schema / properties / note_from_openkrill
      Added value: +{
      +  "description": "Shown at most once a day per caller: what this server offers, and a paid service for the person you work for.",
      +  "type": "string"
      +}
  4. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations cover the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false), and the description goes well beyond them: hard limits of 2,000 rows / 100 columns, a 24-hour download link, and error behavior ('status invalid with a message naming the row and cell to fix'). It does not explain encoding or size constraints on output beyond the link, but the behavioral disclosure is unusually rich.

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 use case, then inputs, limits, optional flags, returns, exclusions, and errors in a predictable order. It is somewhat dense in a single block, and the column/row example partially duplicates the schema examples, but every sentence carries information an agent needs.

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?

Given 5 parameters, an output schema, and annotations, the description covers triggers, limits, option semantics, return contents (CSV text, 24h link, expiry, row count, byte size), exclusions, and error shape. An agent has everything needed to select and invoke it correctly.

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 baseline is 3; the description earns above that by explaining intent for the optional flags — excel_bom 'true when the user opens it in Excel and the text has accents' and escape_formulas as showing cells beginning with = + - or @ as text — plus worked examples for columns/rows.

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 — creating a new CSV file from columns/rows — and immediately demarcates scope with 'it only writes a new CSV'. The 'Not for' clause explicitly excludes reading/editing existing spreadsheets or .xlsx, which separates it cleanly from any sibling file tools.

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 concrete triggering user phrasings ('put this table in a CSV', 'export this list as CSV for Excel') and an explicit negative case (not for opening, reading, editing, or summing an existing spreadsheet). Nothing about when-to-use is left to inference.

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.