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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "columns": "<columns>",
      "rows": "<rows>"
    },
    "name": "make_csv_file"
  }
}

Input 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

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.7/5.0
Behavior4/5

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

Annotations only declare the generic write profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=false); the description goes well beyond with hard limits (2,000 rows, 100 columns), a 24-hour download link and its expiry, and the failure mode ("status invalid with a message naming the row and cell"). What it doesn't cover is whether repeated calls produce different links or overwrite files — relevant given idempotentHint=false — which keeps it just below the top.

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?

The trigger condition is front-loaded, and the remainder is organized under explicit labels ("Input tips:", "Example:", "Not for:", "Errors:"). It is dense but every clause carries a constraint, limit, or exclusion.

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 5-parameter write tool this covers the practical gaps: input shape with a worked example, size limits, optional flags with selection rationale, return contents, and error semantics. With an output schema present, the return summary is a bonus rather than a necessity.

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 still adds decision guidance the schema lacks, notably when to set excel_bom ("true when the user opens it in Excel and the text has accents"). The row/cell-count tips and escape_formulas wording largely restate schema text, so the gain is real but modest.

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?

The description opens with a specific verb and resource ("make a new CSV file from a table") and immediately bounds the scope with "Not for: opening, reading, editing or adding up an existing spreadsheet or .xlsx file; it only writes a new CSV." That boundary alone lets an agent separate this from any spreadsheet-reading or editing tool without inspecting the 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?

It gives concrete trigger phrases ("put this table in a CSV", "export this list as CSV for Excel") plus an explicit exclusion list for when not to use it. Nothing about selection 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.