Skip to main content
Glama

Clear range

clear_range
Destructive

Clear values, formatting, or rules from a cell range without moving cells. Conditional formats and data validation can be targeted separately.

Instructions

Clear a range's values, formatting and/or rules; cells do not move.

Rules covering more than the range keep the rest.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
clearNo'formats' includes conditional formats; 'rules': conditional formats and data validation only.contents
rangeYes
sheetYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changedv2.0.0
    • changedInput schema / properties / clear / description
      Previous value: -"Clear values, formatting, or both."New value: +"'formats' includes conditional formats; 'rules': conditional formats and data validation only."
    • changedInput schema / properties / clear / enum
      Previous value: -[
      -  "contents",
      -  "formats",
      -  "all"
      -]New value: +[
      +  "contents",
      +  "formats",
      +  "rules",
      +  "all"
      +]
    • removedInput schema / properties / clear / title
      Removed value: -"Clear"
    • 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"
    • removedInput schema / properties / range / description
      Removed value: -"A cell or rectangular range in A1 notation, e.g. 'A1:D20'."
    • removedInput schema / properties / range / title
      Removed value: -"Range"
    • removedInput schema / properties / sheet / description
      Removed value: -"Worksheet name, e.g. 'Sheet1'."
    • removedInput schema / properties / sheet / title
      Removed value: -"Sheet"
    • removedInput schema / title
      Removed value: -"clear_rangeArguments"
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "title": "Result",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "clear_rangeOutput",
      -  "type": "object"
      -}New value: +null
  2. Addedv1.1.1

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is covered. The description adds genuinely non-obvious behavior beyond them: existing cells are preserved in place, and rules that extend past the cleared range survive with their remainder intact. It does not mention reversibility or authentication, keeping it short of a 5.

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 compact sentences, zero filler, with the core action and its key constraint ('cells do not move') front-loaded before the edge-case rule about partial rules.

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, non-idempotent mutation with no output schema, the description covers the essential non-obvious behaviors: non-structural clearing and rule remnants. It omits whether the clear is undoable and how 'all' interacts with the other scopes, leaving a small gap.

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 only 25%, but the description partially compensates by naming the three clearable categories (values, formatting, rules) that correspond to the enum values. It does not explain path/sheet/range argument forms, and the enum semantics are documented in the schema itself, so no more than a baseline-plus score is warranted.

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?

States a specific verb (clear) and resource (a range's values, formatting and/or rules) and immediately distinguishes the operation from structural deletion with 'cells do not move', which separates it from siblings like delete_rows_or_columns. An agent can tell what this does without opening the schema.

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 'cells do not move' clause implies this is the right tool when the sheet structure must be preserved, but it never names an alternative (e.g. delete_rows_or_columns, transform_range) or states an explicit when-not condition. Usage is inferable rather than spelled out.

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