Skip to main content
Glama

Rename sheet

rename_sheet

Rename a worksheet in an .xlsx file by specifying the current and new name. Use it to fix sheet labels; note that formulas referencing the old name are not updated and may break.

Instructions

Rename a sheet. Formulas in other sheets that use the old name are NOT updated and will break.

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": {
      "old_name": "<old_name>",
      "new_name": "<new_name>"
    },
    "name": "rename_sheet"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoFile path or preloaded name (list_configured_files). Omit if only one file is preloaded.
backupNoSave a .bak copy first. Default: XLSX_MCP_AUTO_BACKUP (true).
reasonNoWhy; kept in the change log (XLSX_MCP_CHANGE_LOG=true).
new_nameYesNew sheet name (1-31 chars, none of \ / ? * : [ ]).
old_nameYesCurrent sheet name.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 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 / new_name / description
      Added value: +"New sheet name (1-31 chars, none of \\ / ? * : [ ])."
    • addedInput schema / properties / old_name / description
      Added value: +"Current sheet name."
    • 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"
      +}
  2. Addedv0.3.0

TDQS

A3.8/5.0
Behavior4/5

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

With only openWorldHint=false in the annotations, the description carries the burden and delivers the single most important behavioral fact: formulas in other sheets referencing the old name are NOT rewritten and will break. That is real side-effect disclosure beyond structured fields. It omits other behavioral traits such as what happens on a duplicate/invalid name, and whether the change is reversible.

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 short sentences with zero waste: the action first, then the critical caveat. Nothing to trim, and the warning is prominent rather than buried.

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 and parameter docs are handled elsewhere, and the description supplies the one non-obvious risk the agent needs. It could still say whether a pre-existing target name causes failure and whether the operation is undoable or backed up by default, but for this moderately simple tool it is close to complete.

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 path, backup, reason, old_name, and new_name are all documented in the schema itself, including naming constraints. The description adds no additional parameter meaning, so the baseline 3 applies.

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?

A specific verb+resource ('Rename a sheet') that is unambiguous and naturally separable from siblings like copy_sheet, create_sheet, and delete_sheet. It stops short of explicitly naming a sibling or scope boundary, so it lands just below the top mark.

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 only implied: the agent can infer this is the tool for changing a sheet's name. There is no explicit when-to-use vs. alternatives guidance (e.g., when to create a new sheet instead of renaming) and no stated prerequisites such as the sheet existing or the path being required.

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