Skip to main content
Glama

Excel Write Cell

excel_write_cell
Destructive

Writes a value to a specific cell in an Excel file. Numeric-looking value strings are written as numbers only when they round-trip exactly; otherwise they stay text. A value that starts with = is written as a formula (e.g. "=SUM(B2:B3)"), computed when the file is opened; start it with an apostrophe to keep it as text. A formula that reaches outside the file or runs code (WEBSERVICE, IMAGE, HYPERLINK, STOCKHISTORY, TRANSLATE, COPILOT, PY, CUBE…, CALL, REGISTER, EXEC, IMPORT…, RTD, DDE or a |, or a reference to another workbook by name, path or URL) is refused and nothing is written. Address the cell either with cell in A1 notation (e.g. "B2") or with row+column as 1-based integers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowNoRow number (1-based) — use with `column`, or use `cell` instead
cellNoCell in A1 notation, e.g. "B2" (alternative to row+column)
pathYesPath to the .xlsx file
valueYesValue to write
columnNoColumn number (1-based) — use with `row`, or use `cell` instead
confirmNoMust be true to modify
sheet_nameNoSheet name (default: first sheet). Matched without case. A name that no sheet has is an error listing the available ones — it never falls back to the first sheet.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
colYesColumn that was written (1-based)
rowYesRow that was written (1-based)
sheetNoSheet the value actually landed in
valueYesValue written to the cell
writtenYesTrue when the cell was written

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / sheet_name / description
      Previous value: -"Sheet name (default: first sheet)"New value: +"Sheet name (default: first sheet). Matched without case. A name that no sheet has is an error listing the available ones — it never falls back to the first sheet."
    • addedOutput schema / properties / sheet
      Added value: +{
      +  "description": "Sheet the value actually landed in",
      +  "type": "string"
      +}
  2. Changed2 schema fields changed
    • changedInput schema / properties / sheet_name / description
      Previous value: -"Sheet name (default: first sheet). Matched without case. A name that no sheet has is an error listing the available ones — it never falls back to the first sheet."New value: +"Sheet name (default: first sheet)"
    • removedOutput schema / properties / sheet
      Removed value: -{
      -  "description": "Sheet the value actually landed in",
      -  "type": "string"
      -}
  3. Changed2 schema fields changed
    • changedInput schema / properties / sheet_name / description
      Previous value: -"Sheet name (default: first sheet)"New value: +"Sheet name (default: first sheet). Matched without case. A name that no sheet has is an error listing the available ones — it never falls back to the first sheet."
    • addedOutput schema / properties / sheet
      Added value: +{
      +  "description": "Sheet the value actually landed in",
      +  "type": "string"
      +}
  4. Changed4 schema fields changed
    • addedInput schema / properties / cell
      Added value: +{
      +  "description": "Cell in A1 notation, e.g. \"B2\" (alternative to row+column)",
      +  "type": "string"
      +}
    • changedInput schema / properties / column / description
      Previous value: -"Column number (1-based)"New value: +"Column number (1-based) — use with `row`, or use `cell` instead"
    • changedInput schema / properties / row / description
      Previous value: -"Row number (1-based)"New value: +"Row number (1-based) — use with `column`, or use `cell` instead"
    • changedInput schema / required
      Previous value: -[
      -  "path",
      -  "row",
      -  "column",
      -  "value"
      -]New value: +[
      +  "path",
      +  "value"
      +]
  5. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the description doesn't need to restate safety. It does add genuine behavioral context beyond that: numeric strings are only coerced when they round-trip exactly, formulas are deferred until the file opens, and a long enumerated set of out-of-file/code-executing formulas is refused with nothing written. It notably omits the `confirm: true` gate and doesn't say existing cell contents are overwritten.

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-loaded with purpose, then value rules, then rejection rules, then addressing -- a sensible order. The middle sentence is very dense (the long list of refused functions) but every clause carries operative information an agent needs to avoid a rejected write.

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?

An output schema exists, so return values needn't be described, and the addressing, coercion, formula and refusal semantics are all covered. The gap is the `confirm: true` precondition for a destructive write and the fact that the target cell's prior contents are replaced, neither of which appears in the description.

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 the baseline is 3; the description earns a bump by adding semantics the schema cannot express -- `=` prefix meaning formula, apostrophe prefix forcing text, and the interaction between `cell` and `row`+`column` as alternatives. It adds nothing for `path`, `sheet_name`, or `confirm`, but those are adequately documented in the schema.

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 ('Writes a value to a specific cell in an Excel file') and the description immediately scopes the operation further with value-coercion and formula rules. An agent can distinguish this write tool from the sibling excel_read and excel_create without opening 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 Guidelines3/5

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

The description explains how to use the tool well (A1 vs row+column addressing, `=` for formulas, apostrophe to force text), but never states when to choose this over excel_create, excel_read, or file_write, and gives no exclusions. Usage is implied by the write-a-cell framing rather than stated as guidance.

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.

Resources