Skip to main content
Glama

Write range

write_range
Destructive

Write values into Excel cells from a starting cell, overwriting existing data and ignoring sheet protection; supports numbers, text, booleans, dates, formulas, and hyperlinks.

Instructions

Write values into cells, overwriting them, whatever the sheet's protection.

Numbers, booleans and null (empties the cell) are stored as given. A string is text (even '00123'), except '=SUM(B2:B9)' is a formula (network, program or other-workbook references are rejected) and '2026-01-31' or '2026-01-31T09:30:00' a date. Formulas returning several values spill as in Excel; blocked lists those with data in the way. links make hyperlinks (http, https, mailto, places in the workbook).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
atYesTop-left cell.
pathYes
rowsYesRows of values, written from `at`.
linksNoCells of the block to make hyperlinks.
sheetYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changedv2.0.0
    • addedInput schema / $defs
      Added value: +{
      +  "Link": {
      +    "properties": {
      +      "cell": {
      +        "description": "A cell of the block, e.g. 'B2'.",
      +        "type": "string"
      +      },
      +      "target": {
      +        "description": "'https://...', 'mailto:...', or in this workbook \"#'Sheet 2'!A1\" or '#DefinedName'.",
      +        "type": "string"
      +      },
      +      "tooltip": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "cell",
      +      "target"
      +    ],
      +    "type": "object"
      +  }
      +}
    • addedInput schema / properties / at
      Added value: +{
      +  "description": "Top-left cell.",
      +  "type": "string"
      +}
    • addedInput schema / properties / links
      Added value: +{
      +  "description": "Cells of the block to make hyperlinks.",
      +  "items": {
      +    "$ref": "#/$defs/Link"
      +  },
      +  "type": "array"
      +}
    • removedInput schema / properties / path / description
      Removed value: -"Path to an .xlsx, .xlsm, .xltx or .xltm file. Relative paths are resolved in the server's workbook directory when one is configured; otherwise use an absolute path."
    • removedInput schema / properties / path / title
      Removed value: -"Path"
    • changedInput schema / properties / rows / description
      Previous value: -"Rows of values written right and down from start_cell."New value: +"Rows of values, written from `at`."
    • changedInput schema / properties / rows / items / items / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / rows / title
      Removed value: -"Rows"
    • removedInput schema / properties / sheet / description
      Removed value: -"Worksheet name, e.g. 'Sheet1'."
    • removedInput schema / properties / sheet / title
      Removed value: -"Sheet"
    • removedInput schema / properties / start_cell
      Removed value: -{
      -  "description": "A single cell in A1 notation, e.g. 'B2'.",
      -  "title": "Start Cell",
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "path",
      -  "sheet",
      -  "start_cell",
      -  "rows"
      -]New value: +[
      +  "path",
      +  "sheet",
      +  "at",
      +  "rows"
      +]
    • removedInput schema / title
      Removed value: -"write_rangeArguments"
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "cells_written": {
      -      "title": "Cells Written",
      -      "type": "integer"
      -    },
      -    "range": {
      -      "title": "Range",
      -      "type": "string"
      -    },
      -    "sheet": {
      -      "title": "Sheet",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "sheet",
      -    "range",
      -    "cells_written"
      -  ],
      -  "title": "WriteResult",
      -  "type": "object"
      -}New value: +null
  2. Addedv1.1.1

TDQS

A3.8/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and readOnlyHint=false, but the description adds critical context beyond them: it overwrites cells and ignores sheet protection. It also explains type coercion, formula detection/rejection, date parsing, formula spilling, blocked cells, and hyperlink creation. This is rich behavioral disclosure.

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 in the first sentence, then details type and link behavior. Every sentence is relevant to correct invocation, though the type-handling paragraph is dense and could be slightly more structured. No fluff.

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 write tool with no output schema, the description gives enough to call it correctly: overwrite behavior, protection bypass, value typing, formula rules, and link handling. It mentions the `blocked` return field lightly. Missing auth/permissions and path/sheet semantics, but annotations cover safety.

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 60%, and the description adds substantial meaning for the rows and links parameters: numbers/booleans/null stored as given, strings treated as text, formulas detected from '=', dates parsed from ISO strings, and links creating hyperlinks. It does not describe path or sheet, but those are schema gaps rather than description gaps.

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?

States a specific verb and resource: writes values into cells, overwriting them. It clearly separates from read_range, clear_range, and format_range. It does not explicitly differentiate from other write/modify siblings like replace_cells or transform_range, so not quite a 5.

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?

Gives no explicit when-to-use guidance or alternatives. It notes it overwrites and ignores protection, which implies a use case, but an agent must infer when to choose this over replace_cells, transform_range, or copy_range. Missing routing makes this a significant gap.

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