Make a CSV file
make_csv_fileUse 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
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | 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. | |
| columns | Yes | Header names in order, such as ["name","city","note"]. | |
| filename | No | File name in letters and digits, such as contacts; .csv is added. | |
| excel_bom | No | Start the file with a UTF-8 byte order mark so Excel opens accents correctly. Default false. | |
| escape_formulas | No | Prefix text cells that start with = + - or @ with an apostrophe so a spreadsheet shows them as text. Default false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | No | Number of data rows, not counting the header. | |
| bytes | No | Size of the downloadable file in bytes, with the byte order mark when excel_bom is true. | |
| notes | Yes | Facts the user should know, such as how long the link works. | |
| status | Yes | ok when the file was made; invalid when the input needs a fix (see message). | |
| message | No | What to fix in the input when status is invalid. | |
| csv_text | No | The CSV text (RFC 4180, CRLF line ends) when status is ok, without the byte order mark. | |
| filename | No | Name the download link saves the file as, such as calendar.ics. | |
| expires_at | Yes | When the link stops working (ISO 8601 UTC). | |
| download_url | Yes | Link that works for 24 hours, or null when no link could be made. |