Skip to main content
Glama
pickstar-2002

MinIO Storage MCP

list_objects

Lists objects in a MinIO storage bucket to view and manage stored files. Use optional filters like prefix and recursive search to organize content.

Instructions

列出存储桶中的对象

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucketNameYes存储桶名称
prefixNo对象名前缀(可选)
recursiveNo是否递归列出

Implementation Reference

  • MCP tool handler for list_objects: parses arguments with Zod, calls MinIO client to list objects, formats and returns the result as text content.
    case 'list_objects': {
      const { bucketName, prefix, recursive } = z.object({
        bucketName: z.string(),
        prefix: z.string().optional(),
        recursive: z.boolean().default(false)
      }).parse(args);
      
      const objects = await this.minioClient.listObjects(bucketName, prefix, recursive);
      return {
        content: [
          {
            type: 'text',
            text: `存储桶 ${bucketName} 中找到 ${objects.length} 个对象:\n${objects.map(obj => 
              `- ${obj.name} (大小: ${obj.size} 字节, 修改时间: ${obj.lastModified.toISOString()})`
            ).join('\n')}`
          }
        ]
      };
    }
  • Core implementation of object listing using MinIO client's listObjects stream, collects ObjectInfo into array.
    async listObjects(bucketName: string, prefix?: string, recursive: boolean = false): Promise<ObjectInfo[]> {
      this.ensureConnected();
      
      return new Promise((resolve, reject) => {
        const objects: ObjectInfo[] = [];
        const stream = this.client!.listObjects(bucketName, prefix, recursive);
        
        stream.on('data', (obj: any) => {
          objects.push({
            name: obj.name,
            size: obj.size,
            lastModified: obj.lastModified,
            etag: obj.etag,
            isDir: obj.name.endsWith('/')
          });
        });
        
        stream.on('error', reject);
        stream.on('end', () => resolve(objects));
      });
    }
  • src/index.ts:122-134 (registration)
    Tool registration in ListTools handler: defines name, description, and input schema for list_objects.
    {
      name: 'list_objects',
      description: '列出存储桶中的对象',
      inputSchema: {
        type: 'object',
        properties: {
          bucketName: { type: 'string', description: '存储桶名称' },
          prefix: { type: 'string', description: '对象名前缀(可选)' },
          recursive: { type: 'boolean', description: '是否递归列出', default: false }
        },
        required: ['bucketName']
      }
    },
  • Zod schema validation for list_objects input arguments in the handler, matching the registered inputSchema.
    const { bucketName, prefix, recursive } = z.object({
      bucketName: z.string(),
      prefix: z.string().optional(),
      recursive: z.boolean().default(false)
    }).parse(args);
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 but offers minimal information. It doesn't mention whether this is a read-only operation, what permissions are required, how results are returned (pagination, format), or any rate limits. The description only states what the tool does at the most basic level.

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 extremely concise - a single Chinese phrase that directly states the tool's purpose. There's no wasted language or unnecessary elaboration, making it front-loaded and efficient.

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?

For a tool with 3 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain what the tool returns, how to interpret results, or provide any context about the operation's behavior beyond the basic purpose. The description should do more to compensate for the lack of structured metadata.

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, so all parameters are documented in the schema. The description adds no additional parameter information beyond what's already in the schema, which is acceptable given the comprehensive schema documentation. The baseline of 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 verb ('列出' meaning 'list') and resource ('存储桶中的对象' meaning 'objects in a bucket'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'list_buckets' or explain how this listing differs from other object-related operations.

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 multiple sibling tools like 'get_object_info', 'download_file', and 'list_buckets', there's no indication of when this listing operation is appropriate versus other object-related operations.

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