Skip to main content
Glama
marekrost

mcp-server-spreadsheet

delete_columns

Remove specified columns from spreadsheet files to clean data or restructure layouts, shifting remaining columns left automatically.

Instructions

Delete one or more columns, shifting remaining columns left.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesPath to the spreadsheet file
columnYes1-based index of the first column to delete (e.g. 1 = A, 2 = B)
countNoNumber of consecutive columns to delete starting from column
sheetNoSheet name. Defaults to the first sheet if omitted.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The delete_columns tool implementation, which loads the spreadsheet, resolves the sheet, deletes the specified range of columns, saves the file, and returns a confirmation message.
    @mcp.tool()
    def delete_columns(
        file: Annotated[str, Field(description="Path to the spreadsheet file")],
        column: Annotated[int, Field(description="1-based index of the first column to delete (e.g. 1 = A, 2 = B)")],
        count: Annotated[int, Field(description="Number of consecutive columns to delete starting from column")] = 1,
        sheet: Annotated[str | None, Field(description="Sheet name. Defaults to the first sheet if omitted.")] = None,
    ) -> str:
        """Delete one or more columns, shifting remaining columns left."""
        wb = load_workbook(file)
        ws = _resolve_sheet(wb, sheet)
        ws.delete_cols(column, count)
        wb.save(file)
        return f"Deleted {count} columns at column {column}"
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the destructive action ('Delete') and the shifting effect, but lacks details on permissions required, whether changes are reversible, error handling (e.g., invalid column indices), or response format. This is inadequate for a mutation tool with zero annotation coverage.

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 a single, efficient sentence that front-loads the core action and includes a key behavioral detail (shifting columns left). There is no wasted verbiage, making it highly concise and well-structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that there is an output schema (which handles return values), no annotations, and high schema coverage, the description is minimally complete. However, as a destructive mutation tool, it should provide more context on safety, prerequisites, or error conditions to be fully helpful, leaving some gaps in contextual understanding.

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 the schema fully documents all parameters. The description does not add any parameter-specific details beyond what the schema provides, such as explaining interactions between 'column' and 'count' or constraints on values. Baseline score of 3 is appropriate when the schema handles parameter documentation.

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 one or more columns') and the resource ('columns'), with specific behavioral detail about shifting remaining columns left. It distinguishes from sibling tools like 'delete_rows' by focusing on columns rather than rows, and from 'delete_sheet' by targeting columns within 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 Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives is provided. It does not mention prerequisites, such as needing an existing spreadsheet file, or compare to similar tools like 'clear_range' or 'delete_rows'. Usage is implied through the description but not explicitly stated.

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