Skip to main content
Glama

Write rows

sheet_write

Write rows to Excel (XLSX), CSV, TSV, or JSON files by creating a new file, appending, or overwriting existing data. Returns file details like row and column counts, byte size, and column names.

Instructions

Call this tool to write rows to an excel (xlsx) or csv/tsv/json file. Returns the rows, columns, byte size and column names of the file written.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYesnew_file writes a brand new file and refuses to clobber an existing one; append adds the rows under the existing data; overwrite replaces the file contents
pathYesSource file for append/overwrite, or the intended file for new_file (~ is expanded)
rowsYesArray of objects, whose keys become the headers, or an array of arrays with the header row first
sheetNoSheet to write; default is the first sheet of the source, or "Sheet1" for a new file. Other sheets of an existing workbook are kept unchanged
out_pathNoWhere to write; default is a new file next to the source for new_file, or the source itself for append/overwrite. The output format follows this extension: .xlsx, .csv, .tsv or .json. An extension is required

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.20.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries more burden, and it does disclose the write side effect and the return payload (rows, columns, byte size, column names). However, it does not describe clobbering behavior, preservation of other sheets, or failure conditions; these are left mostly to the schema's mode descriptions rather than the tool description.

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?

A single sentence with no filler, front-loading the primary action and the key return information. Every part of the sentence contributes to understanding the tool's purpose and output.

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?

The schema is rich enough to cover the parameters, and the description fills the missing return-value information plus file-type scope. It could also mention mode side effects or route to sibling tools, but the essential invocation context is present.

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 100%, and the mode, path, rows, sheet, and out_path are all explained in the schema. The description itself adds no parameter-level nuance, so it meets the baseline but does not exceed it.

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 names a specific action ('write rows') and a concrete resource ('an excel (xlsx) or csv/tsv/json file'), and it also states what the tool returns. This clearly separates it from read/query/find siblings by the write verb.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The opening 'Call this tool to write rows...' is a direct instruction but not usage guidance. It does not mention when to choose this over sheet_read, sheet_query, or sheet_convert, nor does it explain prerequisites or when append vs overwrite vs new_file should be selected.

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

Install Server

Other Tools