Skip to main content
Glama

write_range

Write values and formulas into xlsx/csv files, fill formulas down columns, or append rows while preserving existing formatting, charts, sheets, and automatic backups.

Instructions

Write values and formulas into an xlsx (or csv), or fill a formula down a column. Only cell values change; existing formatting, other formulas, charts and sheets are preserved. A backup is made automatically (undo with backups). Appending rows to a CSV streams, so it is fast even for huge files.

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": {
      "path": "<path>"
    },
    "name": "write_range"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesFile path, relative to the root folder (or absolute inside it).
cellsNoIndividual cells, e.g. {'B2': 42, 'C2': '=B2*1.15'}.
sheetNoSheet name (or 0-based index). Default: first sheet.
appendNoAppend `values` as new rows after the last used row (ignores start_cell row).
createNoCreate the file/sheet if missing.
valuesNo2D list of rows. Strings starting with '=' become formulas, e.g. '=SUM(B2:B9)'.
dry_runNoPreview the change without saving.
fill_rangeNoWhere fill_formula goes, e.g. 'D2:D100', or 'D2:D' / 'D2' = down to the last used row.
start_cellNoTop-left cell for `values`.A1
parse_datesNoTurn ISO strings like '2024-05-01' into real Excel dates.
fill_formulaNoFormula for the FIRST cell of fill_range, e.g. '=B2*C2'; copied down/right with relative references adjusted (like dragging the fill handle).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.6/5.0
Behavior4/5

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

Beyond the annotations, the description discloses three genuinely useful behaviors: that non-cell content is preserved, that an automatic backup enables undo, and that appending to CSV streams for large files. It does not explain how the three input modes (cells, values, fill_formula) interact or what happens if more than one is supplied, which is the main residual gap for a mutation tool.

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?

Three sentences, front-loaded with the primary action, then guarantees, then the CSV performance note. Dense but each clause carries information an agent cannot get from the schema; nothing is redundant with the name or the annotations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter write tool with no output schema, the description covers safety and preservation but omits the mode-selection story (when to use cells vs values vs append vs fill_formula) and the return/report shape after a write. Annotations cover the safety profile, so the omission is not severe, but it leaves a real decision unexplained.

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%, so the schema already documents every parameter including the '=' formula convention and fill_range syntax. The description adds only marginal semantics (fill-down as the alternative to writing values) and does not clarify the mutual exclusivity of cells/values/append/fill_formula, so it sits at the baseline.

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?

The first sentence names the specific verb (write), the resource (values and formulas into an xlsx or csv), and a second mode (fill a formula down a column). The preservation clause ('only cell values change; existing formatting, other formulas, charts and sheets are preserved') implicitly separates it from format_range and from formula-editing siblings, though no sibling is named explicitly.

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 context is implied rather than stated: the backup/undo note and the CSV-append streaming note hint at safe production use and large-file appends. There is no explicit 'use this instead of X' routing, and no statement about prerequisites such as when dry_run should be preferred.

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