Skip to main content
Glama

Delete sheet

delete_sheet

Delete a worksheet and all of its contents from an Excel file, with a safeguard that refuses removal when it is the only remaining sheet.

Instructions

Delete a sheet and everything on it. Refused when it is the only sheet.

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>"
    },
    "name": "delete_sheet"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoFile path or preloaded name (list_configured_files). Omit if only one file is preloaded.
sheetYesSheet to delete.
backupNoSave a .bak copy first. Default: XLSX_MCP_AUTO_BACKUP (true).
reasonNoWhy; kept in the change log (XLSX_MCP_CHANGE_LOG=true).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 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 / 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 to delete."
  2. Changed1 schema field changedv0.3.0
    • addedInput schema / properties / backup
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Backup"
      +}
  3. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations only supply openWorldHint=false, so the description carries most of the behavioral burden. It usefully discloses the destructive scope ('everything on it') and the single-sheet refusal guard, but says nothing about irreversibility or how a deletion can be undone (the schema mentions backup, and restore_backup exists as a sibling, but the description does not connect them).

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 short sentences, front-loaded with the action and scope, followed by the failure condition. Nothing is wasted and no sentence needs trimming.

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 all four parameters are schema-documented, so the description only needs to convey purpose, destruction scope, and failure modes, which it largely does. The remaining gap is recovery context: whether the deletion is reversible and how backup/restore_backup relate to it.

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%, so path, sheet, backup, and reason are already documented in the schema, including the backup default tied to XLSX_MCP_AUTO_BACKUP. The description adds no additional meaning about these parameters, so the baseline of 3 applies.

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?

The description states a specific verb ('Delete') and resource ('a sheet') and distinguishes itself from row/column deletion siblings by naming the whole sheet as the unit. It falls short of a 5 only because it does not explicitly contrast itself with siblings like clear_range, which empties rather than removes a sheet.

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?

Usage is implied by the tool name and the one guard condition ('Refused when it is the only sheet'), which tells the agent when the call will fail. It gives no guidance on alternatives, such as clearing a range instead of removing the sheet entirely, or on when a delete is preferable to copy/rename.

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