delete_bucket_policy
Remove access policies from MinIO storage buckets to manage permissions and control data security configurations.
Instructions
删除存储桶策略
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bucketName | Yes | 存储桶名称 |
Implementation Reference
- src/minio-client.ts:345-348 (handler)Core implementation of the delete_bucket_policy tool handler. Ensures MinIO connection and sets an empty policy on the specified bucket to delete the existing policy.async deleteBucketPolicy(bucketName: string): Promise<void> { this.ensureConnected(); await this.client!.setBucketPolicy(bucketName, ''); }
- src/index.ts:302-311 (registration)Registration of the 'delete_bucket_policy' tool in the MCP server's tools list, including name, description, and input schema.name: 'delete_bucket_policy', description: '删除存储桶策略', inputSchema: { type: 'object', properties: { bucketName: { type: 'string', description: '存储桶名称' } }, required: ['bucketName'] } }
- src/index.ts:627-641 (handler)MCP server request handler for 'delete_bucket_policy' tool. Parses input arguments using Zod and delegates to MinIO client, returning success response.case 'delete_bucket_policy': { const { bucketName } = z.object({ bucketName: z.string() }).parse(args); await this.minioClient.deleteBucketPolicy(bucketName); return { content: [ { type: 'text', text: `成功删除存储桶 ${bucketName} 的策略` } ] }; }
- src/index.ts:304-310 (schema)Input schema definition for the delete_bucket_policy tool, specifying the required 'bucketName' string parameter.inputSchema: { type: 'object', properties: { bucketName: { type: 'string', description: '存储桶名称' } }, required: ['bucketName'] }