Skip to main content
Glama

create_bucket

Create storage buckets in MinIO object storage to organize and manage data. Specify bucket name and optional region for structured data storage.

Instructions

创建存储桶

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucketNameYes存储桶名称
regionNo区域设置(可选)

Implementation Reference

  • Handler for the 'create_bucket' tool. Parses arguments using Zod, calls minioClient.createBucket, and returns a success message.
    case 'create_bucket': { const { bucketName, region } = z.object({ bucketName: z.string(), region: z.string().optional() }).parse(args); await this.minioClient.createBucket(bucketName, region); return { content: [ { type: 'text', text: `成功创建存储桶: ${bucketName}` } ] }; }
  • src/index.ts:88-99 (registration)
    Registration of the 'create_bucket' tool in the list_tools response, including name, description, and input schema.
    { name: 'create_bucket', description: '创建存储桶', inputSchema: { type: 'object', properties: { bucketName: { type: 'string', description: '存储桶名称' }, region: { type: 'string', description: '区域设置(可选)' } }, required: ['bucketName'] } },
  • Zod schema validation for create_bucket inputs within the handler.
    const { bucketName, region } = z.object({ bucketName: z.string(), region: z.string().optional() }).parse(args);
  • Helper method in MinIOStorageClient that performs the actual bucket creation using the MinIO client's makeBucket method.
    async createBucket(bucketName: string, region?: string): Promise<void> { this.ensureConnected(); await this.client!.makeBucket(bucketName, region || this.config!.region || 'us-east-1'); }

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