Skip to main content
Glama

Clear range

clear_range
Idempotent

Empty values, formulas, and optional formatting in an Excel cell range while keeping rows and columns intact. Use it to reset selected cells without deleting or shifting spreadsheet structure.

Instructions

Empty the cells in a range (values and/or formatting). Rows and columns stay in place.

To remove rows or columns and shift the rest, use delete_rows or delete_columns.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sheet": "<sheet>",
      "cell_range": "<cell_range>"
    },
    "name": "clear_range"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoFile path or preloaded name (list_configured_files). Omit if only one file is preloaded.
sheetYesSheet name (case-sensitive).
backupNoSave a .bak copy first. Default: XLSX_MCP_AUTO_BACKUP (true).
reasonNoWhy; kept in the change log (XLSX_MCP_CHANGE_LOG=true).
cell_rangeYesA1-style range, e.g. "A1:D10".
clear_stylesNoReset formatting to the Normal style.
clear_valuesNoRemove values and formulas.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.4.0
    • addedInput schema / properties / backup / description
      Added value: +"Save a .bak copy first. Default: XLSX_MCP_AUTO_BACKUP (true)."
    • addedInput schema / properties / cell_range / description
      Added value: +"A1-style range, e.g. \"A1:D10\"."
    • addedInput schema / properties / clear_styles / description
      Added value: +"Reset formatting to the Normal style."
    • addedInput schema / properties / clear_values / description
      Added value: +"Remove values and formulas."
    • addedInput schema / properties / path / description
      Added value: +"File path or preloaded name (list_configured_files). Omit if only one file is preloaded."
    • addedInput schema / properties / reason
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Why; kept in the change log (XLSX_MCP_CHANGE_LOG=true).",
      +  "title": "Reason"
      +}
    • addedInput schema / properties / sheet / description
      Added value: +"Sheet name (case-sensitive)."
  2. Addedv0.3.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only supply idempotentHint and openWorldHint=false; the description adds the key behavioral fact that rows and columns stay in place and only cell contents are emptied. It does not state whether the operation is recoverable or that a .bak backup happens by default, though the backup parameter description covers the latter.

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?

Two sentences, no filler, with the core semantics front-loaded and the sibling routing placed after the scope statement. Every clause carries information an agent needs.

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 and the input schema fully documents parameters, so the description only needed to cover purpose, structural behavior, and routing — all of which it does. The remaining gap is a note on reversibility or the backup side effect for a destructive-ish operation.

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 all seven parameters are already documented in the schema. The description's "values and/or formatting" loosely maps to clear_values and clear_styles but adds no format, default, or interaction detail beyond the schema; baseline 3 applies.

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?

The description names a specific verb and resource ("Empty the cells in a range") and immediately bounds the scope ("values and/or formatting"). It also explicitly distinguishes itself from delete_rows/delete_columns, so an agent can tell what this tool is and is not without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

It gives an explicit when-not rule: if you need rows or columns removed and the rest shifted, use delete_rows or delete_columns instead. What's missing is guidance on the case an agent is most likely to confuse — clearing content versus clearing formatting — which is only implicit in the parenthetical "values and/or formatting."

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