Skip to main content
Glama
anyrxo

Proton Drive MCP

by anyrxo

check_mount

Verify Proton Drive mount status and accessibility to enable file operations through the MCP server.

Instructions

Check if Proton Drive is mounted and accessible

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler for the 'check_mount' tool. It checks if the Proton Drive path exists using existsSync, stats the directory if present, and returns a JSON object with mount status, accessibility, path, and platform information.
    case 'check_mount': {
      const exists = existsSync(PROTON_DRIVE_PATH);
      let info: any = {
        mounted: exists,
        path: PROTON_DRIVE_PATH,
        platform: platform(),
      };
      
      if (exists) {
        try {
          const stats = await stat(PROTON_DRIVE_PATH);
          info.accessible = true;
          info.isDirectory = stats.isDirectory();
        } catch (e) {
          info.accessible = false;
          info.error = 'Cannot access Proton Drive directory';
        }
      } else {
        info.accessible = false;
        info.suggestion = 'Please ensure Proton Drive is installed and running';
      }
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(info, null, 2),
          },
        ],
      };
    }
  • Tool schema definition including name, description, and empty input schema (no parameters required). This is part of the tools list returned by listTools.
    {
      name: 'check_mount',
      description: 'Check if Proton Drive is mounted and accessible',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • src/index.ts:122-220 (registration)
    Registration of the listTools handler which includes 'check_mount' in the available tools list.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        {
          name: 'check_mount',
          description: 'Check if Proton Drive is mounted and accessible',
          inputSchema: {
            type: 'object',
            properties: {},
          },
        },
        {
          name: 'list_files',
          description: 'List files and folders in Proton Drive',
          inputSchema: {
            type: 'object',
            properties: {
              path: { 
                type: 'string', 
                description: 'Path relative to Proton Drive root (e.g., "Documents" or "Projects/2024")' 
              },
            },
          },
        },
        {
          name: 'read_file',
          description: 'Read a text file from Proton Drive',
          inputSchema: {
            type: 'object',
            properties: {
              path: { 
                type: 'string', 
                description: 'File path relative to Proton Drive root' 
              },
            },
            required: ['path'],
          },
        },
        {
          name: 'write_file',
          description: 'Write or create a file in Proton Drive',
          inputSchema: {
            type: 'object',
            properties: {
              path: { 
                type: 'string', 
                description: 'File path relative to Proton Drive root' 
              },
              content: { 
                type: 'string', 
                description: 'Text content to write to the file' 
              },
            },
            required: ['path', 'content'],
          },
        },
        {
          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'],
          },
        },
        {
          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'],
          },
        },
        {
          name: 'get_file_info',
          description: 'Get information about a file or folder',
          inputSchema: {
            type: 'object',
            properties: {
              path: { 
                type: 'string', 
                description: 'Path to the file or folder' 
              },
            },
            required: ['path'],
          },
        },
      ],
    }));
  • Constant definition for the Proton Drive path used by check_mount handler.
    const PROTON_DRIVE_PATH = getDefaultProtonPath();
  • Helper function to detect the default Proton Drive mount path across platforms (macOS, Windows, Linux). Used to set PROTON_DRIVE_PATH.
    function getDefaultProtonPath(): string {
      const home = homedir();
      const system = platform();
      
      // First check environment variable
      if (process.env.PROTON_DRIVE_PATH) {
        return process.env.PROTON_DRIVE_PATH;
      }
      
      if (system === 'darwin') {
        // macOS - check CloudStorage folder
        const cloudStorage = join(home, 'Library', 'CloudStorage');
        if (existsSync(cloudStorage)) {
          try {
            const dirs = readdirSync(cloudStorage);
            const protonDir = dirs.find(d => d.startsWith('ProtonDrive-'));
            if (protonDir) {
              return join(cloudStorage, protonDir);
            }
          } catch (e) {
            // Fall through to default
          }
        }
        // Fallback for macOS
        return join(home, 'Proton Drive');
      } else if (system === 'win32') {
        // Windows - check common locations
        const locations = [
          join(home, 'Proton Drive'),
          join(home, 'ProtonDrive'),
          join('C:', 'Proton Drive'),
          join(home, 'Documents', 'Proton Drive'),
        ];
        
        for (const loc of locations) {
          if (existsSync(loc)) {
            return loc;
          }
        }
        return locations[0]; // Default to first option
      } else {
        // Linux - check common locations
        const locations = [
          join(home, 'ProtonDrive'),
          join(home, 'Proton Drive'),
          join(home, 'Documents', 'ProtonDrive'),
          '/media/proton',
        ];
        
        for (const loc of locations) {
          if (existsSync(loc)) {
            return loc;
          }
        }
        return locations[0]; // Default to first option
      }
    }
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 tool checks if Proton Drive is 'mounted and accessible,' implying a read-only status check, but doesn't describe what 'accessible' means (e.g., permissions, network status), potential side effects, or response format. This is inadequate for a tool with zero annotation coverage.

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 with zero waste. It's appropriately sized and front-loaded, 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?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimal but incomplete. It lacks details on what 'mounted and accessible' entails, potential error conditions, or how results are returned, leaving gaps in understanding the tool's behavior and output.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, earning a high baseline score for not adding unnecessary information.

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 tool's purpose with a specific verb ('Check') and resource ('Proton Drive'), making it easy to understand what it does. However, it doesn't explicitly differentiate from sibling tools like 'get_file_info' which might also provide accessibility information, preventing a perfect 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 prerequisites (e.g., when mounting status is relevant), exclusions, or comparisons to siblings like 'list_files' that might indicate accessibility. This leaves usage context unclear.

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