Skip to main content
Glama
pickstar-2002

MinIO Storage MCP

download_file

Download files from MinIO storage buckets to local systems by specifying bucket name, object name, and save path for data retrieval and storage management.

Instructions

从存储桶下载文件

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucketNameYes存储桶名称
objectNameYes对象名称
filePathYes本地保存路径

Implementation Reference

  • Core handler function that performs the file download from MinIO bucket to local path using fGetObject.
    async downloadFile(bucketName: string, objectName: string, filePath: string): Promise<void> {
      this.ensureConnected();
      
      const dir = path.dirname(filePath);
      if (!fs.existsSync(dir)) {
        fs.mkdirSync(dir, { recursive: true });
      }
    
      await this.client!.fGetObject(bucketName, objectName, filePath);
    }
  • src/index.ts:149-161 (registration)
    Tool registration in ListToolsRequestHandler, defining name, description, and input schema.
    {
      name: 'download_file',
      description: '从存储桶下载文件',
      inputSchema: {
        type: 'object',
        properties: {
          bucketName: { type: 'string', description: '存储桶名称' },
          objectName: { type: 'string', description: '对象名称' },
          filePath: { type: 'string', description: '本地保存路径' }
        },
        required: ['bucketName', 'objectName', 'filePath']
      }
    },
  • Zod schema validation for download_file tool arguments in the CallTool handler.
    const { bucketName, objectName, filePath } = z.object({
      bucketName: z.string(),
      objectName: z.string(),
      filePath: z.string()
    }).parse(args);
  • Dispatch handler in CallToolRequestHandler that invokes the MinIO client's downloadFile method and formats response.
    case 'download_file': {
      const { bucketName, objectName, filePath } = z.object({
        bucketName: z.string(),
        objectName: z.string(),
        filePath: z.string()
      }).parse(args);
      
      await this.minioClient.downloadFile(bucketName, objectName, filePath);
      return {
        content: [
          {
            type: 'text',
            text: `成功下载文件 ${bucketName}/${objectName} 到 ${filePath}`
          }
        ]
      };
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states it downloads a file but doesn't mention important behaviors like whether it overwrites existing local files, requires authentication, handles errors, or has rate limits. For a file operation tool with zero annotation coverage, this leaves significant gaps.

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 in Chinese that directly states the tool's purpose. There's no wasted verbiage or unnecessary elaboration - it's appropriately concise for a straightforward download operation.

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 this is a file operation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what happens on success/failure, whether files are overwritten, authentication requirements, or return values. For a tool that modifies the local filesystem, more behavioral context is needed.

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 all parameters are documented in the schema. The description doesn't add any additional meaning about the parameters beyond what's already in the schema. Baseline 3 is appropriate when the schema does the heavy lifting.

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 (download) and resource (file from bucket) in Chinese. It's specific about what the tool does but doesn't differentiate from its sibling 'download_files' (plural), which appears to be a similar tool for multiple files.

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 about when to use this tool versus alternatives like 'download_files' (for multiple files) or 'generate_presigned_url' (for temporary access). The description only states what it does, not when it's appropriate.

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/pickstar-2002/minio-storage-mcp'

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