Skip to main content
Glama

Insert rows

insert_rows

Add one or more blank rows before a specified row in an Excel sheet, shifting existing rows down and preserving workbook structure.

Instructions

Insert blank rows before start_row; rows below move down.

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": "insert_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

B3.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description does add real behavioral context beyond them by disclosing the side effect that existing rows shift down and that inserted rows are blank. It stays silent on other notable behavior such as reference/formula adjustment and the default backup snapshot, which the schema fields carry instead.

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?

A single sentence with the action, the placement anchor, and the downstream effect, in that order. Nothing is redundant or padded.

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?

With an output schema present and full parameter documentation, the description need not explain return values, and its core statement is sufficient to call the tool. However, for a mutation that shifts cell positions it omits whether relative references and formulas in moved rows are rewritten, which is the main risk an agent would want flagged.

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 resolves a genuine ambiguity in start_row: the schema only says '1-based row number' while the description specifies that new rows land before that anchor. It says nothing about count, backup, or recalculate, but those are fully documented in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Insert blank rows') plus the exact anchor ('before start_row'), so the operation is unambiguous. It does not explicitly differentiate itself from siblings like append_rows or insert_columns, which is the only thing keeping it from a 5.

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?

There is no when-to-use or when-not-to-use guidance: nothing tells the agent to prefer this over append_rows for end-of-sheet additions, or to use delete_rows for removal. The agent must infer choice purely from the tool name.

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