Skip to main content
Glama
adexltd

MCP Google Suite

by adexltd

sheets_create

Create a new Google Sheet with a specified title and optional sheet names. This tool generates spreadsheets for data organization and analysis within Google Workspace.

Instructions

Create a new Google Sheet

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesTitle of the spreadsheet
sheetsNoSheet names

Implementation Reference

  • The MCP tool handler for 'sheets_create' that extracts arguments, validates, and delegates to SheetsService.create_spreadsheet.
    async def _handle_sheets_create(
        self, context: GoogleWorkspaceContext, arguments: dict
    ) -> Dict[str, Any]:
        """Handle sheets create requests."""
        title = arguments.get("title")
        sheets = arguments.get("sheets", [])
    
        if not title:
            raise ValueError("Spreadsheet title is required")
    
        logger.debug(f"Creating spreadsheet - Title: {title}, Sheets: {sheets}")
        result = await context.sheets.create_spreadsheet(title=title, sheets=sheets)
        logger.debug(f"Spreadsheet created - ID: {result.get('spreadsheetId')}")
        return result
  • Defines the input schema, description, and name for the 'sheets_create' tool.
    types.Tool(
        name="sheets_create",
        description="Create a new Google Sheet",
        inputSchema={
            "type": "object",
            "properties": {
                "title": {"type": "string", "description": "Title of the spreadsheet"},
                "sheets": {
                    "type": "array",
                    "items": {"type": "string"},
                    "description": "Sheet names",
                },
            },
            "required": ["title"],
        },
    ),
  • Dynamically registers the 'sheets_create' handler in the tool registry based on the tool list.
    for tool in self._get_tools_list():
        handler_name = f"_handle_{tool.name}"
        if hasattr(self, handler_name):
            handler = getattr(self, handler_name)
            self._tool_registry[tool.name] = handler
            logger.debug(f"Registered handler for {tool.name}")
  • Core implementation that creates the Google Spreadsheet using the Sheets API v4.
    def create_spreadsheet(self, title: str, sheets: Optional[List[str]] = None) -> Dict[str, Any]:
        """Create a new Google Spreadsheet with optional sheets."""
        try:
            spreadsheet_body = {"properties": {"title": title}}
    
            if sheets:
                spreadsheet_body["sheets"] = [
                    {"properties": {"title": sheet_name}} for sheet_name in sheets
                ]
    
            spreadsheet = self.service.spreadsheets().create(body=spreadsheet_body).execute()
    
            return {"success": True, "spreadsheet": spreadsheet}
        except HttpError as error:
            return {"success": False, **self.handle_error(error)}

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.9/5.0
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 but only states the basic action. It doesn't mention permissions required, whether creation is reversible, rate limits, or what happens upon success/failure. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 a single, efficient sentence with zero waste. It's front-loaded with the core action and resource, making it immediately clear. Every word earns its place without redundancy or unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't address behavioral aspects like permissions or side effects, nor does it explain what the tool returns upon success. Given the complexity of creating a resource in Google Sheets, more context is needed for effective agent use.

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 documents both parameters ('title' and 'sheets'). The description doesn't add any meaning beyond what the schema provides, such as explaining the relationship between 'title' and 'sheets' or providing examples. Baseline 3 is appropriate when the schema does the heavy lifting.

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 action ('Create') and resource ('a new Google Sheet'), making the purpose immediately understandable. It doesn't distinguish from sibling tools like 'docs_create' or 'drive_create_folder', which would require mentioning it creates specifically spreadsheet files rather than documents or folders.

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 'docs_create' for documents or 'drive_create_folder' for folders. There's no mention of prerequisites, context, or exclusions, leaving the agent to infer usage from the tool name alone.

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