Skip to main content
Glama
xlsx-mcp-server
by knorq-ai

clear_cells

Clear values from a specified cell range in an Excel sheet while keeping existing formatting. Use it to remove data without losing styles, borders, or layout.

Instructions

Clear cell values in a range (keeps formatting).

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": {
      "file_path": "<file_path>",
      "sheet": "<sheet>",
      "range": "<range>"
    },
    "name": "clear_cells"
  }
}

Input Schema

NameRequiredDescriptionDefault
rangeYesRange to clear (e.g. 'A1:C10')
sheetYesSheet name or 1-based index
file_pathYesAbsolute path to the .xlsx file

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.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 carries the full burden. It does disclose one important behavioral trait — that formatting survives the clear — but says nothing about whether the operation is destructive/undoable, how formulas are handled, or whether the file must exist and be writable.

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?

A single short sentence with the operation front-loaded and the most decision-relevant caveat (formatting preserved) attached immediately. Nothing is wasted and nothing is buried.

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 simple three-parameter mutation with a fully described schema and no output schema, the essentials are covered, but a destructive operation with zero annotations should say more about irreversibility, formula handling, or error behavior to be complete.

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 description coverage is 100%, with file_path, sheet (name or 1-based index), and range all documented in the schema, so the baseline is 3. The description adds no additional parameter meaning such as range syntax variants or sheet-index edge cases.

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?

Names a specific verb ('Clear') and resource ('cell values in a range') and adds the key qualifier that formatting is preserved. An agent can distinguish this from a plain write with empty values, though no sibling is named explicitly to sharpen the contrast with tools like write_cells or delete_rows.

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?

The parenthetical '(keeps formatting)' implies when to prefer this over overwriting cells with blanks, but the description never states that condition directly nor mentions any prerequisites or exclusions. Usage is inferable rather than stated.

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