Skip to main content
Glama
pickstar-2002

MinIO Storage MCP

delete_object

Remove specific objects from MinIO storage buckets to manage storage space and maintain organized data structures.

Instructions

删除存储桶中的对象

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucketNameYes存储桶名称
objectNameYes对象名称

Implementation Reference

  • Handler for the 'delete_object' tool in the MCP server. Validates input using Zod schema, calls the MinIO client's deleteObject method, and returns a success message.
    case 'delete_object': {
      const { bucketName, objectName } = z.object({
        bucketName: z.string(),
        objectName: z.string()
      }).parse(args);
      
      await this.minioClient.deleteObject(bucketName, objectName);
      return {
        content: [
          {
            type: 'text',
            text: `成功删除对象: ${bucketName}/${objectName}`
          }
        ]
      };
    }
  • JSON input schema for the 'delete_object' tool, defining required bucketName and objectName parameters.
    inputSchema: {
      type: 'object',
      properties: {
        bucketName: { type: 'string', description: '存储桶名称' },
        objectName: { type: 'string', description: '对象名称' }
      },
      required: ['bucketName', 'objectName']
    }
  • src/index.ts:162-173 (registration)
    Registration of the 'delete_object' tool in the list_tools response, including name, description, and schema.
    {
      name: 'delete_object',
      description: '删除存储桶中的对象',
      inputSchema: {
        type: 'object',
        properties: {
          bucketName: { type: 'string', description: '存储桶名称' },
          objectName: { type: 'string', description: '对象名称' }
        },
        required: ['bucketName', 'objectName']
      }
    },
  • Helper method in MinIOStorageClient that ensures connection and calls MinIO client's removeObject to delete the specified object.
    async deleteObject(bucketName: string, objectName: string): Promise<void> {
      this.ensureConnected();
      await this.client!.removeObject(bucketName, objectName);
    }

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