Skip to main content
Glama
KitchenSink4AI

io.github.nometalalchemist/kitchensink4xl

Clear Range

clear_range
Destructive

Clears cell or range contents, formats, or both while preserving merges, conditional formatting, validations, comments, and hyperlinks. Includes automatic backup and safe verification.

Instructions

Clear a cell or range: what='contents' removes values and formulas, 'formats' resets styles to default, 'all' does both. Neither removes merges, conditional formats, validations, comments, or hyperlinks; those have their own manage tools. Addressed by a location object. A hazardous workbook refuses unless allow_loss is true. Auto-backup: prev/anchor slots in .ks4xl-backups (backup=false skips rotation); atomic verified save, restored on failed verify. Refuses while open in Excel.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
whatNocontents
sheetNo
backupNo
locationYes
allow_lossNo
verify_comNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2.0
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  2. Changed1 schema field changedv1.1.0
    • addedInput schema / properties / location / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "object"
      +  }
      +]
  3. First observedv1.0.0

TDQS

A4.4/5.0
Behavior5/5

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

The description discloses extensive behavior beyond the destructiveHint annotation: it explains the backup mechanism (auto-backup in .ks4xl-backups with rotation and skip flag), the atomic verified save with rollback, the safety guard for hazardous workbooks (allow_loss required), and the refusal while the file is open in Excel. This is far richer than the annotation's simple true flag and gives an agent a precise mental model of side effects.

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?

The description is packed with information but every sentence earns its place. It is front-loaded with the core purpose, then logically flows to exclusions, addressing, safety, backup, and failure conditions. There is no repetition of schema data and no filler, making it an exemplar of efficient technical writing.

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?

Given the tool's complexity (7 params, no output schema, destructive operation), the description covers the essential aspects: what it does, what it doesn't do, safety, backup, and one failure condition. It omits details on 'sheet' and 'verify_com' behavior, but those are optional with defaults, and the provided information is sufficient for correct invocation in most cases. It earns a strong score but not a perfect one.

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?

With schema description coverage at 0%, the description must carry parameter meaning. It explains 'what' (contents/formats/all), 'backup' (skips rotation when false), 'allow_loss' (needed for hazardous workbooks), and 'location' (addressed via a location object). However, it does not explain 'sheet' or 'verify_com' at all, leaving two parameters semantically opaque. Since it covers several but not all, a middle score is appropriate.

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 opens with a clear action and resource: 'Clear a cell or range' and immediately enumerates the three modes (contents/formats/all) with their exact effects. It also explicitly states what the tool does NOT clear (merges, conditional formats, etc.), which distinguishes it from sibling tools like set_merge and manage_hyperlink without needing to name them.

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?

The description gives strong contextual guidance: it points to other tools for the items it doesn't remove ('those have their own manage tools'), and it states the environment constraint ('Refuses while open in Excel'). It does not explicitly name a preferred alternative for clearing, but the limitation statements effectively tell an agent when not to use it. A minor gap is that it doesn't contrast with write_range or set_cell for zeroing cells, but it is otherwise clear.

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