Skip to main content
Glama

Delete rows

delete_rows

Deletes one or more rows from an Excel sheet beginning at a specified row, shifting lower rows up to close the gap.

Instructions

Delete rows starting at start_row; rows below move up. 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_row": "<start_row>"
    },
    "name": "delete_rows"
  }
}

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).
start_rowYes1-based row number.
recalculateNoRecompute formulas with LibreOffice after saving. False: faster, formula results stay empty.

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_row / description
      Added value: +"1-based row number."
  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.6/5.0
Behavior4/5

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

The only annotation is openWorldHint=false, so the description carries most of the behavioral burden, and it does disclose the key mutation side effect that row indices below shift upward. It does not mention irreversibility or that a .bak backup is made by default, but those are documented in the schema's backup/reason/recalculate descriptions, so the gap is modest rather than critical.

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 with zero filler; the primary operation and its effect come first, and the disambiguation clause follows. Nothing could be removed without losing 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?

For a destructive row-mutation tool with an output schema and fully documented parameters, the description covers the operation, its positional effect, and the main alternative. The one thing an agent might want—an explicit warning that the change is not undoable except via restore_backup—is absent, but it is a minor omission given the rich schema.

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, and the description adds real meaning beyond it by explaining that start_row is the anchor of a range and that everything below it shifts up. It does not explicitly tie the 'count' parameter to the deletion span, but the added range semantics still justify a step above baseline.

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 rows') plus the anchor parameter ('starting at start_row') and the resulting side effect ('rows below move up'). It also names the sibling clear_range as the contrasting operation, so an agent can distinguish the two without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Explicitly gives the alternative and the condition that selects it: 'To empty cells without shifting use clear_range.' That is a when-not plus a named sibling, leaving little to inference for the delete-vs-clear decision.

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