Skip to main content
Glama

Delete columns

delete_columns

Delete one or more worksheet columns starting at a 1-based column index and shift remaining columns left to keep data contiguous. Use clear_range instead when cells should be emptied without shifting.

Instructions

Delete columns starting at start_column; columns to the right move left. To empty cells without shifting use clear_range.

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

Input Schema

NameRequiredDescriptionDefault
pathNoFile path or preloaded name (list_configured_files). Omit if only one file is preloaded.
countNoHow many to insert or delete.
sheetYesSheet name (case-sensitive).
backupNoSave a .bak copy first. Default: XLSX_MCP_AUTO_BACKUP (true).
reasonNoWhy; kept in the change log (XLSX_MCP_CHANGE_LOG=true).
recalculateNoRecompute formulas with LibreOffice after saving. False: faster, formula results stay empty.
start_columnYes1-based column number (A=1, B=2, ...).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 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 / count / description
      Added value: +"How many to insert or delete."
    • 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 / recalculate / description
      Added value: +"Recompute formulas with LibreOffice after saving. False: faster, formula results stay empty."
    • addedInput schema / properties / sheet / description
      Added value: +"Sheet name (case-sensitive)."
    • addedInput schema / properties / start_column / description
      Added value: +"1-based column number (A=1, B=2, ...)."
  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

A4.2/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 does disclose the key side effect that remaining columns shift left, which annotations do not. It does not say the operation is irreversible, that no undo exists, or how the optional backup/change-log behavior interacts with a destructive delete — notable omissions for a data-destroying tool.

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 compact clauses with zero filler, and the core behavior is front-loaded ahead of the alternative pointer. Every phrase carries information.

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?

Output schema exists, so return values need no explanation, and all seven parameters are documented in the schema. The description covers behavior and the main alternative; it stops short of noting irreversibility or whether formula references in shifted columns are rewritten.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning by tying start_column to the shift direction and thereby clarifying what 'start' means operationally (everything to the right moves, not just the named column). It says nothing about count, but the schema documents it.

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?

States a specific verb and resource ('Delete columns') plus the scope ('starting at start_column') and the resulting shift ('columns to the right move left'). An agent can distinguish it from clear_range purely from this sentence, without opening either schema.

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?

Names an explicit alternative with the condition that selects it: 'To empty cells without shifting use clear_range.' That resolves the most likely sibling confusion (clearing vs. structural deletion), but there is no guidance on when to prefer insert/delete row tools or on preconditions such as backup.

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