Skip to main content
Glama
marekrost

mcp-server-spreadsheet

delete_sheet

Remove a specific sheet from a spreadsheet file to delete its data permanently. Works with .xlsx and .ods formats.

Instructions

Delete a sheet by name from the workbook.

All data in the sheet is permanently removed. Not supported for CSV files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesPath to the spreadsheet file
nameYesName of the sheet to delete

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The MCP tool handler for 'delete_sheet', which loads the workbook, deletes the sheet using the backend's delete_sheet method, saves the changes, and returns a confirmation string.
    def delete_sheet(
        file: Annotated[str, Field(description="Path to the spreadsheet file")],
        name: Annotated[str, Field(description="Name of the sheet to delete")],
    ) -> str:
        """Delete a sheet by name from the workbook.
    
        All data in the sheet is permanently removed. Not supported for CSV files.
        """
        wb = load_workbook(file)
        wb.delete_sheet(name)
        wb.save(file)
        return f"Deleted sheet {name!r}"
Behavior4/5

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

With no annotations provided, the description carries full burden. It discloses critical behavioral traits: data is 'permanently removed' (destructive nature) and 'Not supported for CSV files' (limitation). However, it doesn't mention permissions needed, error conditions, or what happens if the sheet doesn't exist.

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?

Three concise sentences with zero waste: first states purpose, second clarifies destructiveness, third specifies limitation. Each sentence earns its place by adding crucial information not obvious from the tool name alone.

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 this is a destructive operation with no annotations but an output schema exists, the description covers key aspects: purpose, permanent deletion, and CSV limitation. However, it could better address error scenarios or confirmations. The output schema reduces need for return value explanation.

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 parameters are well-documented in the schema. The description adds minimal value beyond schema, only implying that 'name' refers to a sheet name. Baseline 3 is appropriate when schema does the heavy lifting.

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 clearly states the action ('Delete') and target resource ('a sheet by name from the workbook'), distinguishing it from sibling tools like delete_rows, delete_columns, or rename_sheet. It's specific about what gets removed and from where.

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 implies usage by specifying 'by name' and mentioning CSV file exclusion, but doesn't explicitly state when to use this versus alternatives like clear_range or delete_rows. No prerequisites or comparison to siblings are provided.

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/marekrost/mcp-server-spreadsheet'

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