Skip to main content
Glama
anyrxo

Proton Drive MCP

by anyrxo

delete_file

Remove files or folders from Proton Drive storage by specifying their path to manage storage space and organize content.

Instructions

Delete a file or folder from Proton Drive

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to delete relative to Proton Drive root

Implementation Reference

  • Handler for the 'delete_file' tool. Validates the input path using validatePath, determines if it's a file or directory using stat, deletes using rm (recursive for directories) or unlink (for files), and returns a success message or throws an MCP error on failure.
    case 'delete_file': {
      const deletePath = validatePath(args?.path as string);
      
      try {
        const stats = await stat(deletePath);
        
        if (stats.isDirectory()) {
          await rm(deletePath, { recursive: true, force: true });
        } else {
          await unlink(deletePath);
        }
        
        return {
          content: [
            {
              type: 'text',
              text: `Successfully deleted: ${getRelativePath(deletePath)}`,
            },
          ],
        };
      } catch (error: any) {
        throw new McpError(
          ErrorCode.InternalError,
          `Cannot delete: ${error.message}`
        );
      }
    }
  • src/index.ts:177-190 (registration)
    Registration of the 'delete_file' tool in the ListTools response, including its name, description, and input schema requiring a 'path' parameter.
    {
      name: 'delete_file',
      description: 'Delete a file or folder from Proton Drive',
      inputSchema: {
        type: 'object',
        properties: {
          path: { 
            type: 'string', 
            description: 'Path to delete relative to Proton Drive root' 
          },
        },
        required: ['path'],
      },
    },
  • Input schema for the 'delete_file' tool, defining an object with a required 'path' string property.
      inputSchema: {
        type: 'object',
        properties: {
          path: { 
            type: 'string', 
            description: 'Path to delete relative to Proton Drive root' 
          },
        },
        required: ['path'],
      },
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Delete') but does not cover critical traits like whether deletion is permanent or reversible, permission requirements, error handling, or rate limits. This leaves significant gaps for a destructive operation.

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 front-loads the core action ('Delete a file or folder') and specifies the resource context ('from Proton Drive'). It has zero waste, making it highly concise and well-structured for quick understanding.

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?

Given the tool's destructive nature, lack of annotations, and no output schema, the description is incomplete. It fails to address behavioral aspects like safety warnings, return values, or error conditions, which are crucial for a deletion tool. This leaves the agent with insufficient context for reliable 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?

The input schema has 100% description coverage, with the 'path' parameter fully documented. The description adds no additional meaning beyond what the schema provides, such as path format examples or deletion scope details. Baseline 3 is appropriate since the schema does the heavy lifting.

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 ('Delete') and resource ('a file or folder from Proton Drive'), distinguishing it from sibling tools like 'create_folder', 'read_file', or 'write_file'. It precisely communicates the tool's function without ambiguity.

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, such as distinguishing it from 'write_file' for overwriting or 'create_folder' for removal. It lacks context about prerequisites, like verifying existence with 'get_file_info' first, or exclusions, making it minimally helpful for decision-making.

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/anyrxo/proton-drive-mcp'

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