Skip to main content
Glama
ZatesloFL

Google Workspace MCP Server

by ZatesloFL

create_sheet

Add a new sheet to a Google spreadsheet by specifying the user email, spreadsheet ID, and sheet name. Confirm successful creation with a message.

Instructions

Creates a new sheet within an existing spreadsheet.

Args: user_google_email (str): The user's Google email address. Required. spreadsheet_id (str): The ID of the spreadsheet. Required. sheet_name (str): The name of the new sheet. Required.

Returns: str: Confirmation message of the successful sheet creation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sheet_nameYes
spreadsheet_idYes
user_google_emailYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The core handler function for the 'create_sheet' MCP tool. It uses the Google Sheets API to add a new sheet to an existing spreadsheet via batchUpdate request. Includes logging, error handling, and authentication decorators.
    @server.tool()
    @handle_http_errors("create_sheet", service_type="sheets")
    @require_google_service("sheets", "sheets_write")
    async def create_sheet(
        service,
        user_google_email: str,
        spreadsheet_id: str,
        sheet_name: str,
    ) -> str:
        """
        Creates a new sheet within an existing spreadsheet.
    
        Args:
            user_google_email (str): The user's Google email address. Required.
            spreadsheet_id (str): The ID of the spreadsheet. Required.
            sheet_name (str): The name of the new sheet. Required.
    
        Returns:
            str: Confirmation message of the successful sheet creation.
        """
        logger.info(f"[create_sheet] Invoked. Email: '{user_google_email}', Spreadsheet: {spreadsheet_id}, Sheet: {sheet_name}")
    
        request_body = {
            "requests": [
                {
                    "addSheet": {
                        "properties": {
                            "title": sheet_name
                        }
                    }
                }
            ]
        }
    
        response = await asyncio.to_thread(
            service.spreadsheets()
            .batchUpdate(spreadsheetId=spreadsheet_id, body=request_body)
            .execute
        )
    
        sheet_id = response["replies"][0]["addSheet"]["properties"]["sheetId"]
    
        text_output = (
            f"Successfully created sheet '{sheet_name}' (ID: {sheet_id}) in spreadsheet {spreadsheet_id} for {user_google_email}."
        )
    
        logger.info(f"Successfully created sheet for {user_google_email}. Sheet ID: {sheet_id}")
        return text_output
  • Registers and exposes the 'create_sheet' tool by importing it from sheets_tools.py and including it in __all__, making it available when the gsheets package is imported.
    from .sheets_tools import (
        list_spreadsheets,
        get_spreadsheet_info,
        read_sheet_values,
        modify_sheet_values,
        create_spreadsheet,
        create_sheet,
    )
    
    __all__ = [
        "list_spreadsheets",
        "get_spreadsheet_info", 
        "read_sheet_values",
        "modify_sheet_values",
        "create_spreadsheet",
        "create_sheet",
    ]
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'creates' (implying a write/mutation operation) and returns a confirmation message, but lacks details on permissions required (e.g., edit access to the spreadsheet), error conditions (e.g., invalid spreadsheet ID), rate limits, or whether the operation is idempotent. For a mutation tool with zero annotation coverage, this is insufficient.

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 and front-loaded: the first sentence states the purpose clearly, followed by organized sections for arguments and returns. Every sentence earns its place—no fluff or redundancy. It's appropriately sized for a tool with three parameters.

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?

Given the tool's moderate complexity (3 parameters, mutation operation), no annotations, and an output schema (implied by 'Returns' section), the description is partially complete. It covers the purpose and parameters well but lacks behavioral context (e.g., permissions, errors) and doesn't fully explain the return value beyond 'confirmation message' (though the output schema might detail this). For a mutation tool, more disclosure is needed.

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?

The description includes an 'Args' section that documents all three parameters with names and types, adding significant value beyond the input schema (which has 0% description coverage). It clarifies that 'user_google_email' is the user's Google email, 'spreadsheet_id' is the ID of the spreadsheet, and 'sheet_name' is the name of the new sheet, all required. This compensates well for the schema's lack of descriptions.

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?

The description clearly states the tool's purpose: 'Creates a new sheet within an existing spreadsheet.' It specifies the verb ('creates'), resource ('new sheet'), and context ('within an existing spreadsheet'). However, it doesn't explicitly differentiate from sibling tools like 'create_spreadsheet' (which creates entire spreadsheets) or 'modify_sheet_values' (which modifies existing sheets), though the context implies it's for adding sheets to existing spreadsheets.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing spreadsheet), exclusions, or comparisons to sibling tools like 'create_spreadsheet' (for new spreadsheets) or 'modify_sheet_values' (for editing sheets). The agent must infer usage from the purpose alone.

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/ZatesloFL/google_workspace_mcp'

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