Skip to main content
Glama
adexltd

MCP Google Suite

by adexltd

drive_create_folder

Create a new folder in Google Drive to organize files and documents. Specify the folder name and optional parent folder ID.

Instructions

Create a new folder in Google Drive

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the folder
parent_idNoID of parent folder

Implementation Reference

  • Handler function for drive_create_folder tool that validates input, calls DriveService.create_folder, and returns the result.
    async def _handle_drive_create_folder(
        self, context: GoogleWorkspaceContext, arguments: dict
    ) -> Dict[str, Any]:
        """Handle drive create folder requests."""
        name = arguments.get("name")
        parent_id = arguments.get("parent_id")
    
        if not name:
            raise ValueError("Folder name is required")
    
        logger.debug(f"Creating folder - Name: {name}, Parent: {parent_id or 'root'}")
        result = await context.drive.create_folder(name=name, parent_id=parent_id)
        logger.debug(f"Folder created - ID: {result.get('id')}")
        return result
  • Schema definition for the drive_create_folder tool, specifying input parameters and requirements.
    types.Tool(
        name="drive_create_folder",
        description="Create a new folder in Google Drive",
        inputSchema={
            "type": "object",
            "properties": {
                "name": {"type": "string", "description": "Name of the folder"},
                "parent_id": {"type": "string", "description": "ID of parent folder"},
            },
            "required": ["name"],
        },
    ),
  • DriveService method that performs the actual Google Drive API call to create a folder.
    def create_folder(self, name: str, parent_id: Optional[str] = None) -> Dict[str, Any]:
        """Create a new folder in Google Drive."""
        try:
            file_metadata = {"name": name, "mimeType": "application/vnd.google-apps.folder"}
    
            if parent_id:
                file_metadata["parents"] = [parent_id]
    
            folder = (
                self.service.files()
                .create(body=file_metadata, fields="id, name, webViewLink")
                .execute()
            )
    
            return {"success": True, "folder": folder}
        except HttpError as error:
            return {"success": False, **self.handle_error(error)}
  • Registers the handler for drive_create_folder (and other tools) in the tool registry used by call_tool.
    # Register tool handlers
    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}")
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. It states this is a creation operation but doesn't mention permission requirements, whether the parent folder must exist, what happens on duplicate names, or any rate limits. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 that states the core purpose without any wasted words. It's appropriately sized for a simple creation tool and gets straight to the point with no 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 explain what happens on success (returns folder ID? metadata?), error conditions, or behavioral constraints. Given the complexity of a Drive folder creation operation, more context about permissions, naming rules, or parent folder requirements would be helpful.

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?

The schema description coverage is 100%, with both parameters clearly documented in the schema. The description adds no additional parameter information beyond what the schema already provides. According to guidelines, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description.

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 ('new folder in Google Drive'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'docs_create' or 'sheets_create' which also create resources in Google Workspace, so it doesn't reach the highest score.

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 sibling tools like 'drive_search_files' for finding existing folders or explain when folder creation is appropriate versus document/spreadsheet creation. No usage context or exclusions are provided.

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/adexltd/mcp-google-suite'

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