Skip to main content
Glama
taylorwilsdon

Google Workspace MCP Server - Control Gmail, Calendar, Docs, Sheets, Slides, Chat, Forms & Drive

create_spreadsheet

Generate a new Google Spreadsheet with specified title and optional sheet names. Input user Google email and receive details like ID and URL of the created spreadsheet.

Instructions

Creates a new Google Spreadsheet.

Args:
    user_google_email (str): The user's Google email address. Required.
    title (str): The title of the new spreadsheet. Required.
    sheet_names (Optional[List[str]]): List of sheet names to create. If not provided, creates one sheet with default name.

Returns:
    str: Information about the newly created spreadsheet including ID and URL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serviceYes
sheet_namesNo
titleYes
user_google_emailYes

Implementation Reference

  • The core handler function decorated with @server.tool() that implements the create_spreadsheet MCP tool using Google Sheets API to create a new spreadsheet with given title and optional sheets.
    @server.tool()
    @handle_http_errors("create_spreadsheet", service_type="sheets")
    @require_google_service("sheets", "sheets_write")
    async def create_spreadsheet(
        service,
        user_google_email: str,
        title: str,
        sheet_names: Optional[List[str]] = None,
    ) -> str:
        """
        Creates a new Google Spreadsheet.
    
        Args:
            user_google_email (str): The user's Google email address. Required.
            title (str): The title of the new spreadsheet. Required.
            sheet_names (Optional[List[str]]): List of sheet names to create. If not provided, creates one sheet with default name.
    
        Returns:
            str: Information about the newly created spreadsheet including ID and URL.
        """
        logger.info(f"[create_spreadsheet] Invoked. Email: '{user_google_email}', Title: {title}")
    
        spreadsheet_body = {
            "properties": {
                "title": title
            }
        }
    
        if sheet_names:
            spreadsheet_body["sheets"] = [
                {"properties": {"title": sheet_name}} for sheet_name in sheet_names
            ]
    
        spreadsheet = await asyncio.to_thread(
            service.spreadsheets().create(body=spreadsheet_body).execute
        )
    
        spreadsheet_id = spreadsheet.get("spreadsheetId")
        spreadsheet_url = spreadsheet.get("spreadsheetUrl")
    
        text_output = (
            f"Successfully created spreadsheet '{title}' for {user_google_email}. "
            f"ID: {spreadsheet_id} | URL: {spreadsheet_url}"
        )
    
        logger.info(f"Successfully created spreadsheet for {user_google_email}. ID: {spreadsheet_id}")
        return text_output
  • Registers the create_spreadsheet tool by importing and including it in __all__ for module-level exposure.
    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?

With no annotations provided, the description carries full burden for behavioral disclosure. While it states this is a creation operation, it doesn't mention permission requirements, whether this creates files in a specific location, rate limits, or what happens on failure. The return value description is minimal and doesn't specify format or error handling.

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?

The description is well-structured with clear sections for Args and Returns. It's appropriately sized with no redundant information. The first sentence states the core purpose clearly, though the parameter documentation could be slightly more concise.

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?

For a creation tool with no annotations and no output schema, the description provides basic purpose and parameter information but lacks important context. It doesn't explain authentication requirements, where the spreadsheet is created (user's drive, shared drive), error conditions, or detailed return format. The undocumented 'service' parameter is a significant gap.

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?

With 0% schema description coverage, the description provides meaningful context for all parameters. It explains user_google_email identifies the user, title names the spreadsheet, and sheet_names creates specific sheets with default behavior. The only gap is the undocumented 'service' parameter which appears in the schema but isn't mentioned in the description.

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 ('Creates a new Google Spreadsheet') and identifies the resource being created. It distinguishes this from sibling tools like create_doc or create_form by specifying it creates spreadsheets, not other document types.

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 like create_sheet or modify_sheet_values. It doesn't mention prerequisites, authentication requirements, or any context about when this creation operation is appropriate versus other spreadsheet-related tools.

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

Related 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/taylorwilsdon/google_workspace_mcp'

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