Skip to main content
Glama

write_range

Writes values, formulas, and number formats into a specified range in a live workbook, overwriting existing cell content.

Instructions

Write values and/or formulas into a range of the live workbook. Accepts a 2D array (rows x columns) or a single scalar that fills the whole range. Formulas are set separately from values. Also supports setting the number format. Content in the target range is overwritten.

Input Schema

NameRequiredDescriptionDefault
rangeYesA1 range address, e.g. "A1:C10".
valuesNo2D array of values, or a single scalar broadcast across the range.
formulasNo2D array of formula strings (e.g. "=SUM(A1:A10)"), or a single formula broadcast across the range.
sheetNameNoWorksheet name. Defaults to the active worksheet.
workbookIdNoTarget workbook ID from list_workbooks. Optional when only one workbook is connected.
numberFormatNoNumber format string (e.g. "0.00", "#,##0", "dd/mm/yyyy"), 2D array or single broadcast.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description usefully discloses that this mutates the live workbook and overwrites existing content. It does not cover permissions, undo/atomicity, return behavior, or precedence when both values and formulas are supplied.

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?

Five short sentences, front-loaded with the action and immediately covering input shape and the destructive overwrite. No filler or redundant background.

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 a mutation tool with no annotations and no output schema, it covers the core action, accepted input shapes, and overwrite behavior. It still omits important invocation details such as whether values and formulas conflict, dimension-mismatch behavior, and what is returned.

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 coverage is 100%, so the schema already documents all six parameters, including broadcast semantics for values, formulas, and numberFormat. The description restates those semantics but adds little parameter-specific meaning beyond the schema.

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: write values/formulas into a range of the live workbook. It distinguishes itself from adjacent tools like format_range or clear_range by focusing on writing values and formulas, but it never explicitly names or contrasts with those siblings.

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 operation and the overwrite warning, but there is no explicit when-to-use guidance or routing to alternatives such as read_range, format_range, or clear_range.

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