delete_bucket
Remove a storage bucket from MinIO object storage to manage storage resources and maintain organization.
Instructions
删除存储桶
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bucketName | Yes | 存储桶名称 |
Implementation Reference
- src/index.ts:363-377 (handler)The switch case handler for the 'delete_bucket' tool. It validates the input arguments using Zod, calls the minioClient.deleteBucket method, and returns a success message.case 'delete_bucket': { const { bucketName } = z.object({ bucketName: z.string() }).parse(args); await this.minioClient.deleteBucket(bucketName); return { content: [ { type: 'text', text: `成功删除存储桶: ${bucketName}` } ] }; }
- src/index.ts:101-110 (schema)The input schema definition for the 'delete_bucket' tool, registered in the ListTools handler. Defines bucketName as required string.name: 'delete_bucket', description: '删除存储桶', inputSchema: { type: 'object', properties: { bucketName: { type: 'string', description: '存储桶名称' } }, required: ['bucketName'] } },
- src/minio-client.ts:65-68 (helper)The MinioClient helper method deleteBucket that ensures the client is connected and delegates to the underlying MinIO client's removeBucket method.async deleteBucket(bucketName: string): Promise<void> { this.ensureConnected(); await this.client!.removeBucket(bucketName); }