Skip to main content
Glama

Delete Worksheet

delete_worksheet
Destructive

Remove a worksheet from an already-open Excel workbook by specifying the workbook and sheet name. Excel blocks deletion of the last visible sheet to keep at least one sheet available.

Instructions

Delete a worksheet from an open workbook.

Args: workbook: Workbook name or path (None = active workbook). name: Sheet to delete (required).

Returns: JSON confirmation. Excel will refuse to delete a workbook's only remaining visible sheet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
workbookNo
Behavior4/5

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

The destructiveHint annotation already signals mutation, and the description adds meaningful behavioral detail: Excel will refuse to delete a workbook's only remaining visible sheet, and the tool returns a JSON confirmation. This goes beyond annotation coverage, though it does not discuss reversibility or error cases.

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 compact and well organized with Args and Returns sections. It front-loads the purpose and includes only essential behavioral caveats, with no redundant fluff.

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 simple destructive two-parameter tool with no output schema, the description covers parameter semantics, the active-workbook default, the required sheet, and the important last-visible-sheet refusal. The return value is only described as 'JSON confirmation' without a shape, and error behavior is not detailed, but these are minor gaps for this tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides only parameter names and defaults, but the description fully explains both parameters: workbook is a name or path with None meaning the active workbook, and name is the required sheet to delete. This compensates strongly for the 0% schema description coverage.

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 specific verb and resource: 'Delete a worksheet from an open workbook.' This clearly distinguishes it from sibling deletion tools like delete_table, delete_chart, delete_columns, and delete_named_range, which target different object types.

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 description gives context (operates on an open workbook, targets a specified sheet) and implicitly indicates when to use this tool. However, it does not explicitly contrast it with alternatives or state when not to use it, such as preferring delete_table for table structures or clear_range for cell contents.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/trustypangolin/excel-mcp-live'

If you have feedback or need assistance with the MCP directory API, please join our Discord server