Skip to main content
Glama
pickstar-2002

MinIO Storage MCP

upload_files

Upload multiple files to MinIO object storage buckets with metadata options. This tool enables batch file transfers to cloud storage for efficient data management.

Instructions

批量上传文件

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucketNameYes存储桶名称
filesYes文件列表

Implementation Reference

  • Core implementation of the upload_files tool: batch uploads files to MinIO bucket by iterating and calling uploadFile for each, returns BatchOperationResult with success/failure counts and errors.
    async uploadFiles(bucketName: string, files: Array<{ localPath: string; objectName: string; metadata?: Record<string, string> }>): Promise<BatchOperationResult> {
      this.ensureConnected();
      
      const result: BatchOperationResult = {
        success: true,
        successCount: 0,
        failureCount: 0,
        errors: []
      };
    
      for (const file of files) {
        try {
          await this.uploadFile(bucketName, file.objectName, file.localPath, file.metadata);
          result.successCount++;
        } catch (error) {
          result.success = false;
          result.failureCount++;
          result.errors.push({
            item: file.localPath,
            error: error instanceof Error ? error.message : String(error)
          });
        }
      }
    
      return result;
    }
  • Input JSON schema for upload_files tool defining bucketName (string) and files array of objects with localPath, objectName, optional metadata.
    inputSchema: {
      type: 'object',
      properties: {
        bucketName: { type: 'string', description: '存储桶名称' },
        files: {
          type: 'array',
          items: {
            type: 'object',
            properties: {
              localPath: { type: 'string', description: '本地文件路径' },
              objectName: { type: 'string', description: '对象名称' },
              metadata: { type: 'object', description: '文件元数据(可选)' }
            },
            required: ['localPath', 'objectName']
          },
          description: '文件列表'
        }
      },
      required: ['bucketName', 'files']
    }
  • src/index.ts:231-254 (registration)
    Registration of the upload_files tool in the ListTools response, including name, description, and inputSchema.
    {
      name: 'upload_files',
      description: '批量上传文件',
      inputSchema: {
        type: 'object',
        properties: {
          bucketName: { type: 'string', description: '存储桶名称' },
          files: {
            type: 'array',
            items: {
              type: 'object',
              properties: {
                localPath: { type: 'string', description: '本地文件路径' },
                objectName: { type: 'string', description: '对象名称' },
                metadata: { type: 'object', description: '文件元数据(可选)' }
              },
              required: ['localPath', 'objectName']
            },
            description: '文件列表'
          }
        },
        required: ['bucketName', 'files']
      }
    },
  • MCP server handler case for upload_files: validates arguments with Zod, calls minioClient.uploadFiles, formats response text.
    case 'upload_files': {
      const { bucketName, files } = z.object({
        bucketName: z.string(),
        files: z.array(z.object({
          localPath: z.string(),
          objectName: z.string(),
          metadata: z.record(z.string()).optional()
        }))
      }).parse(args);
      
      const result = await this.minioClient.uploadFiles(bucketName, files);
      return {
        content: [
          {
            type: 'text',
            text: `批量上传完成: 成功 ${result.successCount} 个, 失败 ${result.failureCount} 个${result.errors.length > 0 ? '\n错误:\n' + result.errors.map(e => `- ${e.item}: ${e.error}`).join('\n') : ''}`
          }
        ]
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. '批量上传文件' indicates a write operation but doesn't disclose behavioral traits like permissions needed, whether it overwrites existing files, error handling for partial failures, rate limits, or response format. This is a significant gap for a mutation 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise with just four characters ('批量上传文件'), front-loaded with the core action. However, it's arguably too brief, bordering on under-specified rather than efficiently informative, but within the context it's not wasteful.

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 no annotations, no output schema, and a mutation tool with batch operations, the description is incomplete. It lacks details on behavior, error handling, and integration with sibling tools, making it inadequate for safe and effective use by an AI agent.

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 the schema fully documents parameters (bucketName, files array with localPath, objectName, metadata). The description adds no meaning beyond the schema—it doesn't explain parameter relationships, constraints, or usage examples. Baseline 3 is appropriate when schema does all the work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description '批量上传文件' (batch upload files) states a clear verb ('upload') and resource ('files'), but it's vague about the destination and doesn't distinguish from sibling 'upload_file'. It specifies 'batch' which differentiates it from the single-file sibling, but lacks details on the storage system or context.

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 on when to use this tool versus alternatives like 'upload_file' (for single files) or other storage operations. The description implies batch processing but doesn't mention prerequisites, constraints, or typical scenarios for choosing batch over single upload.

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