Skip to main content
Glama
basis1: Excel engine for AI agents (formulas, recalculation, audit)

basis1: Excel engine for AI agents (formulas, recalculation, audit)

Official

Rename sheet

rename_sheet
Idempotent

Rename a workbook sheet by its 0-based index and automatically rewrite formulas, named ranges, and validations that reference it so calculated results stay unchanged.

Instructions

Rename a sheet in a session's workbook, found by its 0-based index (see the sheets list from create_session or inspect_model). Formulas, named ranges and validations that reference the sheet are rewritten to the new name, so results don't change; use it rather than add_sheet when you only need a different title. Excel's rules apply: 1-31 characters, none of : \ / ? * [ ], no leading or trailing apostrophe, unique ignoring case; a name that breaks them, or an index past the last sheet, fails with bad_request. Returns {sheet_index, previous_name, sheet_name}.

Input Schema

NameRequiredDescriptionDefault
nameYesNew display name for the sheet
session_idYesSession ID returned by create_session (list_sessions shows the open ones)
sheet_indexYes0-based index of the sheet to rename

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.2
    • changedInput schema / properties / session_id / description
      Previous value: -"Session ID"New value: +"Session ID returned by create_session (list_sessions shows the open ones)"
  2. First observedv0.3.1

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses the side effect that formulas, named ranges and validations referencing the sheet are rewritten (consistent with destructiveHint=false), enumerates the validation rules, and names the failure mode (bad_request) for bad names or out-of-range indices.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Information-dense and front-loaded, with the core action first and validation/return details after. The validation-rule clause is long but each clause carries actionable content, so little is wasted.

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?

With no output schema, the description supplies the return shape ({sheet_index, previous_name, sheet_name}) plus error behavior, and the reference-rewriting note covers the main behavioral surprise of a rename. Nothing needed to call it correctly is missing.

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 already 100%, so the baseline is 3. The description still adds real meaning: it confirms the index is 0-based against the sheets list and spells out the character/length/uniqueness rules for the name that the schema does not encode.

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 ('Rename a sheet in a session's workbook') and pins the addressing scheme (0-based index). It is immediately distinguishable from add_sheet, which the description explicitly calls out.

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?

Gives an explicit alternative and the condition that selects this tool: 'use it rather than add_sheet when you only need a different title.' It also routes the agent to create_session or inspect_model to obtain the sheet index, so there is no guesswork about inputs.

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