Skip to main content
Glama
anyrxo

Proton Drive MCP

by anyrxo

create_folder

Create new folders in Proton Drive to organize files and documents. Specify the folder path to establish directory structure for better file management.

Instructions

Create a new folder in Proton Drive

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFolder path relative to Proton Drive root

Implementation Reference

  • Handler for the 'create_folder' tool. Validates the path using validatePath helper, creates the folder using mkdir (recursive), and returns success message or throws error.
    case 'create_folder': {
      const folderPath = validatePath(args?.path as string);
      
      try {
        await mkdir(folderPath, { recursive: true });
        
        return {
          content: [
            {
              type: 'text',
              text: `Successfully created folder: ${getRelativePath(folderPath)}`,
            },
          ],
        };
      } catch (error: any) {
        throw new McpError(
          ErrorCode.InternalError,
          `Cannot create folder: ${error.message}`
        );
      }
    }
  • src/index.ts:191-204 (registration)
    Registration of the 'create_folder' tool in the ListTools response, including description and input schema requiring a 'path' parameter.
    {
      name: 'create_folder',
      description: 'Create a new folder in Proton Drive',
      inputSchema: {
        type: 'object',
        properties: {
          path: { 
            type: 'string', 
            description: 'Folder path relative to Proton Drive root' 
          },
        },
        required: ['path'],
      },
    },
  • Input schema for the 'create_folder' tool: object with required 'path' string.
    inputSchema: {
      type: 'object',
      properties: {
        path: { 
          type: 'string', 
          description: 'Folder path relative to Proton Drive root' 
        },
      },
      required: ['path'],
    },
  • validatePath helper function used by create_folder to secure and resolve the relative folder path to absolute path within Proton Drive.
    function validatePath(relativePath: string): string {
      // Handle empty path
      if (!relativePath) {
        return PROTON_DRIVE_PATH;
      }
      
      // Clean the path - remove leading slashes and normalize
      const cleaned = relativePath
        .split(/[/\\]+/)
        .filter(Boolean)
        .join(sep);
      
      const fullPath = resolve(PROTON_DRIVE_PATH, cleaned);
      
      // Security check - ensure we're still within Proton Drive
      if (!fullPath.startsWith(PROTON_DRIVE_PATH)) {
        throw new Error('Invalid path: Access denied outside Proton Drive');
      }
      
      return fullPath;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Create' implies a mutation operation, the description doesn't specify permissions required, whether the operation is idempotent, what happens if the folder already exists, or any rate limits. This leaves significant gaps in understanding the tool's behavior.

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 directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to understand at a glance.

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 simple creation tool with one parameter and no output schema, the description is minimally adequate. However, without annotations or output details, it lacks information about behavioral aspects like error handling or return values, which could be important for mutation operations.

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 clearly documented as 'Folder path relative to Proton Drive root.' The description doesn't add any additional meaning beyond what the schema provides, such as path format examples or constraints, so it meets the baseline for high schema coverage.

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 a new folder') and target resource ('in Proton Drive'), providing a specific verb+resource combination. However, it doesn't differentiate this tool from potential sibling alternatives like 'write_file' or 'check_mount' that might also create folders, leaving room for 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. With sibling tools like 'write_file' (which might create files) and 'delete_file' (which might remove folders), there's no indication of when folder creation is appropriate versus other operations, nor any mention of prerequisites or constraints.

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