Skip to main content
Glama
marekrost

mcp-server-spreadsheet

add_sheet

Add a new sheet to a spreadsheet workbook, specifying name and position, with auto-generated options available.

Instructions

Add a new sheet to the workbook.

Returns the name of the newly created sheet. Not supported for CSV files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesPath to the spreadsheet file
nameNoName for the new sheet. Auto-generated if omitted.
positionNo1-based position to insert the sheet. Appended at the end if omitted.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The 'add_sheet' tool adds a new sheet to a workbook. It uses 'load_workbook' to load the file, 'wb.create_sheet' to add the sheet with a given title and index, and saves the changes.
    @mcp.tool()
    def add_sheet(
        file: Annotated[str, Field(description="Path to the spreadsheet file")],
        name: Annotated[str | None, Field(description="Name for the new sheet. Auto-generated if omitted.")] = None,
        position: Annotated[int | None, Field(description="1-based position to insert the sheet. Appended at the end if omitted.")] = None,
    ) -> str:
        """Add a new sheet to the workbook.
    
        Returns the name of the newly created sheet. Not supported for CSV files.
        """
        wb = load_workbook(file)
        ws = wb.create_sheet(title=name, index=position if position is None else position - 1)
        wb.save(file)
        return ws.title
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: it's a write operation (implied by 'Add'), returns the new sheet name, and has a specific limitation ('Not supported for CSV files'). It doesn't mention permissions, rate limits, or error conditions, but covers the essential mutation nature and constraints well.

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 extremely concise and front-loaded: the first sentence states the core purpose, the second explains the return value, and the third provides a critical limitation. Every sentence earns its place with no wasted words, making it easy for an agent to parse quickly.

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 that there's an output schema (which covers return values), no annotations, and 100% schema coverage for parameters, the description is complete enough. It covers the tool's purpose, key behavior (returns sheet name), and a major constraint (CSV limitation), which is sufficient for an agent to understand when and how to use this tool effectively.

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 the schema already fully documents all three parameters (file, name, position). The description doesn't add any parameter-specific details beyond what's in the schema, such as file format requirements or name constraints. The baseline of 3 is appropriate when the schema handles parameter documentation completely.

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 specific action ('Add a new sheet') and target resource ('to the workbook'), distinguishing it from sibling tools like 'copy_sheet', 'delete_sheet', or 'rename_sheet'. It precisely defines the operation without being tautological.

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

Usage Guidelines4/5

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

The description provides clear context by stating 'Not supported for CSV files', which helps the agent know when NOT to use this tool. However, it doesn't explicitly mention alternatives or compare it to similar tools like 'copy_sheet' or 'create_workbook_file' for creating new sheets in different contexts.

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/marekrost/mcp-server-spreadsheet'

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