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, including one built as text inside INDIRECT or ADDRESS) 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

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
confirmNoIgnored; kept for older clients.
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

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. Changed1 schema field changed
    • changedInput schema / properties / confirm / description
      Previous value: -"Must be true to modify"New value: +"Ignored; kept for older clients."
  2. 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"
      +}
  3. 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"
      -}
  4. 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"
      +}
  5. 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"
      +]
  6. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint=false/destructiveHint=true annotations: it discloses numeric coercion rules, formula evaluation timing, an exhaustive list of refused dangerous formulas, and the key side-effect guarantee that "nothing is written" on refusal. It also clarifies that sheet_name never silently falls back to the first sheet.

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-loads the core action and the addressing rule, then layers in value-coercion rules. The long parenthetical enumeration of refused formula functions is dense but each item carries real refusal information; trimming it would lose behavioral specificity.

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?

For a destructive single-cell write with an output schema, the description covers the risky behaviors and parameter addressing thoroughly. It leaves open edge cases like a missing file at `path` or whether a nonexistent sheet is created, but nothing essential to a correct call is absent.

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?

With 100% schema coverage the baseline is 3, but the description adds real semantics: what `value` means for numbers, formulas, and apostrophe-prefixed text, plus the either/or relationship between `cell` and `row`+`column`. It does not touch `confirm` (documented in schema as ignored) or `path` requirements.

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"), which cleanly separates it from excel_read, excel_create, and non-Excel writers like word_append. The scope (single cell) is unambiguous.

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 is implied by the write-a-cell scope and the two addressing modes, but the description never says when to prefer this over alternatives such as excel_create or when to read first with excel_read. No explicit when-not guidance is given.

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