Skip to main content
Glama

Delete rows or columns

delete_rows_or_columns
Destructive

Delete rows or columns from an Excel sheet starting at a specified position, shifting remaining cells up or left. Check formulas, charts, and tables afterward; references are not updated.

Instructions

Delete rows or columns starting at position at, shifting the rest up or left.

Formulas, merged ranges, charts and tables that refer to shifted cells are not updated, so check them afterwards.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
atYes1-based row number, or 1-based column number (A=1).
axisYesWhether to act on rows or columns.
pathYesPath to an .xlsx, .xlsm, .xltx or .xltm file. Relative paths are resolved in the server's workbook directory when one is configured; otherwise use an absolute path.
countNoHow many rows or columns.
sheetYesWorksheet name, e.g. 'Sheet1'.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.1

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=false, but the description adds critical behavior not present in structured data: formulas, merged ranges, charts and tables referencing shifted cells are NOT updated. That is exactly the kind of side-effect disclosure an agent needs before a destructive structural edit.

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 sentences, both earning their place: sentence one defines the operation and its shifting mechanic, sentence two gives the essential post-condition check. Front-loaded with no filler.

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

Completeness5/5

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

For a destructive structural mutation with full annotation coverage and an output schema handling return values, the description supplies the one thing structured fields cannot: the dangling-reference caveat. Nothing an agent needs to invoke it safely is missing.

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%, and the schema itself explains 1-based indexing for `at`, the rows/columns enum for `axis`, and the default of 1 for `count`. The description restates the anchor parameter but adds no format or edge-case detail beyond the schema, so baseline 3 applies.

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+resource ('Delete rows or columns') plus the exact anchor ('starting at position `at`') and the resulting shift ('shifting the rest up or left'). An agent can immediately distinguish this from insert_rows_or_columns or clear_range.

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 verb and the warning to inspect dependent formulas afterwards, but there is no explicit when-to-use guidance or comparison against alternatives like insert_rows_or_columns (the inverse) or clear_range (which preserves structure). Adequate but with clear gaps.

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