Skip to main content
Glama

write_cells

Write values or formulas into specific cells in an .xlsx file and recalculate the workbook to update results. Optionally create missing sheets and skip recalculation if needed.

Instructions

Write values and/or formulas into specific cells, then recalculate the workbook.

Set recalculate=False to skip the LibreOffice recompute (e.g. for structurally complex workbooks you don't want round-tripped).

Args: path: Path to the .xlsx file, or the name of a preloaded file. Omit if only one file is configured. sheet: Sheet name. cells: List of {"cell": "A1", "value": ...} or {"cell": "B1", "formula": "=A1*2"}. create_sheet_if_missing: Create the sheet first if it doesn't exist yet. recalculate: Run the LibreOffice recompute pass after saving.

Returns: Write result including errors_found — any Excel error values produced by recalculation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo
cellsYes
sheetYes
backupNo
recalculateNo
allow_external_formulasNo
create_sheet_if_missingNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.0
    • addedInput schema / properties / allow_external_formulas
      Added value: +{
      +  "default": false,
      +  "title": "Allow External Formulas",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / backup
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Backup"
      +}
  2. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It describes the recalculation side effect, the opt-out behavior, and reveals a return field (errors_found), which is valuable behavioral context. However, it does not mention auth, backup semantics, or whether writes are destructive/reversible.

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 purpose, then uses a structured Args/Returns layout. The recalculate conditional is called out early. Some duplication of schema parameter names is necessary given the 0% coverage, so it is appropriately sized with minor verbosity.

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 mutation tool with no annotations and partial parameter documentation, the description covers the key behavior (write + recalculate) and return behavior (errors_found). The gaps are the two undocumented boolean parameters, which leaves the definition slightly incomplete for its complexity.

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 description coverage is 0%, so the description must compensate. It documents path, sheet, cells (with format examples), create_sheet_if_missing, and recalculate. It omits backup and allow_external_formulas, so it does not fully cover all seven parameters.

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 (write values/formulas) and resource (specific cells) plus the recalculation behavior. It is clear what the tool does. It does not explicitly distinguish itself from siblings like append_rows or clear_range, which a stronger definition would call out.

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?

Provides a conditional usage hint: set recalculate=False for structurally complex workbooks. This implies when to use an argument but not when to choose write_cells over append_rows or query_sheet. Usage context is implied rather than explicit.

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