Skip to main content
Glama

list_buckets

Retrieve a comprehensive list of all available storage buckets in MinIO object storage using this tool, enabling efficient management and organization of stored data.

Instructions

列出所有存储桶

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler implementation for 'list_buckets'. It calls MinioClient.listBuckets(), formats the list of buckets into a text response, and returns it in the MCP format.
    case 'list_buckets': { const buckets = await this.minioClient.listBuckets(); return { content: [ { type: 'text', text: `找到 ${buckets.length} 个存储桶:\n${buckets.map(b => `- ${b.name} (创建时间: ${b.creationDate.toISOString()})`).join('\n')}` } ] }; }
  • src/index.ts:83-87 (registration)
    Registration of the 'list_buckets' tool with the MCP server, including name, Chinese description, and empty input schema (no parameters required).
    { name: 'list_buckets', description: '列出所有存储桶', inputSchema: { type: 'object', properties: {} } },
  • Input schema for 'list_buckets' tool: empty object, indicating no input parameters are required.
    inputSchema: { type: 'object', properties: {} }
  • Helper method in MinioClient class that lists all buckets using the MinIO SDK client.listBuckets(), ensures connection, and maps results to BucketInfo type.
    async listBuckets(): Promise<BucketInfo[]> { this.ensureConnected(); const buckets = await this.client!.listBuckets(); return buckets.map((bucket: any) => ({ name: bucket.name, creationDate: bucket.creationDate })); }
  • Type definition for BucketInfo, used as return type for listBuckets and in response formatting.
    export interface BucketInfo { name: string; creationDate: Date; }

Other Tools

Related 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