Skip to main content
Glama

excel_rename_sheet

Rename an Excel sheet in a .xlsx file. Validates the new name and preserves cell contents.

Instructions

Rename a sheet in the workbook.

Cell contents are preserved across the rename (VAL-EXCEL-042). Renaming a sheet to its own name is a no-op (the file is still saved, but the sheet names are unchanged — VAL-EXCEL-041).

Args: path: Path to an existing .xlsx. old_name: Current name of the sheet to rename. new_name: Desired new name. Must be non-empty and free of Excel-forbidden characters. folder: Optional base folder for relative paths.

Returns: {"ok": True}.

Raises: OfficeMCPError: ERR_FILE_NOT_FOUND if the file is missing, ERR_SHEET_NOT_FOUND for an unknown old_name, ERR_INVALID_PARAMS when new_name is empty, contains forbidden characters, or already exists as another sheet, ERR_UNSUPPORTED_FMT for non-.xlsx extensions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
old_nameYes
new_nameYes
folderNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description carries full burden. It discloses that cell contents are preserved, renaming to the same name is a no-op, and the file is saved even then. It also enumerates all possible errors (file not found, sheet not found, invalid params) with specific error codes, providing comprehensive behavioral insight.

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?

The description is well-structured: a one-line summary followed by clearly labeled argument descriptions and a returns/raises section. Every sentence adds value, including the edge-case notes and error enumerations. There is no fluff.

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?

Given the tool's simplicity, the description is complete. It covers all parameters, return value, error conditions, and important behaviors (preserving cell contents, no-op case). With an output schema implied, the return format is explained sufficiently.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate. It does so exceptionally: for each parameter (path, old_name, new_name, folder), it adds meaningful details such as constraints (new_name must be non-empty and free of forbidden characters) and defaults. This goes far beyond the schema's bare type/title information.

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?

The description clearly states the tool renames a sheet in a workbook. The verb 'Rename' and resource 'sheet in the workbook' are specific, and the tool is easily distinguished from siblings like excel_create_sheet, excel_delete_sheet, or excel_list_sheets.

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?

The usage is implied: use this tool when you want to rename an existing sheet. However, there is no explicit mention of when to use this tool versus alternatives (e.g., create, delete, or list sheets), nor are there any exclusions or conditions provided.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gawirable/office-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server