Skip to main content
Glama
anyrxo

Proton Drive MCP

by anyrxo

get_file_info

Retrieve details about Proton Drive files and folders, including metadata and properties, by specifying the file path.

Instructions

Get information about a file or folder

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the file or folder

Implementation Reference

  • The handler logic for the 'get_file_info' tool, which validates the path, retrieves file stats, formats the information, and returns it as JSON.
    case 'get_file_info': {
      const infoPath = validatePath(args?.path as string);
      
      try {
        const stats = await stat(infoPath);
        const relativePath = getRelativePath(infoPath);
        
        const info = {
          path: relativePath,
          name: basename(infoPath),
          type: stats.isDirectory() ? 'folder' : 'file',
          size: stats.size,
          sizeFormatted: formatBytes(stats.size),
          created: stats.birthtime.toISOString(),
          modified: stats.mtime.toISOString(),
          accessed: stats.atime.toISOString(),
        };
        
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(info, null, 2),
            },
          ],
        };
      } catch (error: any) {
        throw new McpError(
          ErrorCode.InternalError,
          `Cannot get file info: ${error.message}`
        );
      }
    }
  • The input schema definition for the 'get_file_info' tool, specifying a required 'path' parameter.
    inputSchema: {
      type: 'object',
      properties: {
        path: { 
          type: 'string', 
          description: 'Path to the file or folder' 
        },
      },
      required: ['path'],
    },
  • src/index.ts:205-218 (registration)
    The tool registration in the ListTools response, including name, description, and schema.
    {
      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'],
      },
    },
  • Helper function to format file size in human-readable bytes, used in get_file_info.
    function formatBytes(bytes: number): string {
      if (bytes === 0) return '0 Bytes';
      
      const k = 1024;
      const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
      const i = Math.floor(Math.log(bytes) / Math.log(k));
      
      return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
    }
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. It states the tool 'gets information,' which implies a read-only operation, but doesn't specify what type of information (e.g., metadata, permissions, size), whether it requires authentication, or if there are 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, clear sentence with zero wasted words. It's front-loaded with the core purpose and efficiently communicates the essential action without unnecessary elaboration, making it easy for an agent 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 lack of annotations and output schema, the description is incomplete for a tool that likely returns structured information. It doesn't hint at what information is retrieved (e.g., file size, type, timestamps) or how errors are handled, leaving the agent with insufficient context to use the tool effectively beyond basic invocation.

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. The description adds no additional meaning beyond what the schema provides, such as path format examples or constraints. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but doesn't detract either.

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 ('Get') and resource ('information about a file or folder'), making it easy to understand what it does. However, it doesn't explicitly differentiate from sibling tools like 'list_files' (which lists multiple files) or 'read_file' (which reads file contents), missing an opportunity for clearer sibling distinction.

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 siblings like 'list_files' for listing multiple files and 'read_file' for reading file contents, there's no indication of whether this tool is for metadata retrieval, existence checks, or other purposes, leaving the agent to guess based on context.

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