Skip to main content
Glama
andresfrei

Google Drive MCP Server

by andresfrei

remove_drive

Remove a Google Drive account from the configuration by providing the drive ID to disconnect access.

Instructions

Remove a Google Drive account from the configuration

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
driveIdYesID of the drive to remove

Implementation Reference

  • The asynchronous handler function that executes the remove_drive tool logic: destructures driveId, calls drivesConfigLoader.removeDrive(driveId), and returns a structured response with success message.
    handler: async (params: { driveId: string }) => {
      const { driveId } = params;
      drivesConfigLoader.removeDrive(driveId);
      const output = {
        success: true,
        message: `Drive "${driveId}" removed successfully`,
      };
    
      return {
        content: [{ type: "text" as const, text: `✅ ${output.message}` }],
        structuredContent: output,
      };
    },
  • Input and output schema definitions for the remove_drive tool using Zod, specifying driveId as string input and success boolean + message string output.
    config: {
      title: "Remove Google Drive Account",
      description: "Remove a Google Drive account from the configuration",
      inputSchema: {
        driveId: z.string().describe("ID of the drive to remove"),
      },
      outputSchema: {
        success: z.boolean(),
        message: z.string(),
      },
    },
  • Dynamic registration of all imported tools (including remove_drive) to the MCP server by iterating over Object.values(tools) and calling server.registerTool for each.
    // Registro automático de todas las tools
    const toolList = Object.values(tools);
    toolList.forEach((tool) => {
      server.registerTool(tool.name, tool.config as any, tool.handler as any);
    });
  • Re-export of the removeDriveTool from its implementation file, allowing central import in server.ts.
    export { removeDriveTool } from "@/mcp/tools/remove-drive.js";
  • Underlying helper method in DrivesConfigLoader that removes the drive from the config by deleting the entry, saving the config, and logging.
    removeDrive(driveId: string) {
      const config = this.getConfig();
    
      if (!config.drives[driveId]) {
        throw new Error(`Drive "${driveId}" not found`);
      }
    
      delete config.drives[driveId];
      this.saveConfig(config);
    
      logger.info(`Removed drive: ${driveId}`);
    }
Behavior2/5

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

With no annotations, the description carries full burden but only states the action without behavioral details. It doesn't disclose if removal is destructive, reversible, requires specific permissions, affects associated data, or has side effects like rate limits, which is inadequate for a mutation tool.

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, direct sentence with zero wasted words, front-loading the core action and resource. It's appropriately sized for a simple tool, making it easy to parse quickly.

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 destructive mutation tool with no annotations and no output schema, the description is incomplete. It lacks critical context like what 'remove' entails (e.g., permanent deletion, configuration update), success/failure behavior, or error handling, leaving significant gaps for agent understanding.

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 the 'driveId' parameter fully. The description adds no additional meaning beyond implying the parameter identifies the drive to remove, meeting the baseline for high schema coverage without extra value.

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 ('Remove') and resource ('Google Drive account from the configuration'), making the tool's purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'add_drive' beyond the obvious verb contrast, missing explicit scope or relationship context.

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?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing drive), exclusions, or how it relates to siblings like 'list_drives' for selection or 'add_drive' for reversal, leaving usage context implied at best.

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/andresfrei/mcp-google-drive-server'

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