Skip to main content
Glama
pickstar-2002

MinIO Storage MCP

delete_objects

Remove multiple objects from a MinIO storage bucket to manage storage space and organize data efficiently.

Instructions

批量删除存储桶中的对象

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucketNameYes存储桶名称
objectNamesYes对象名称列表

Implementation Reference

  • MCP tool handler for 'delete_objects': validates input parameters using Zod, calls MinIOStorageClient.deleteObjects, and returns formatted success/failure response.
    case 'delete_objects': {
      const { bucketName, objectNames } = z.object({
        bucketName: z.string(),
        objectNames: z.array(z.string())
      }).parse(args);
      
      const result = await this.minioClient.deleteObjects(bucketName, objectNames);
      return {
        content: [
          {
            type: 'text',
            text: `批量删除完成: 成功 ${result.successCount} 个, 失败 ${result.failureCount} 个${result.errors.length > 0 ? '\n错误:\n' + result.errors.map(e => `- ${e.item}: ${e.error}`).join('\n') : ''}`
          }
        ]
      };
    }
  • src/index.ts:174-185 (registration)
    Tool registration in ListTools response, including name, description, and input schema specification.
    {
      name: 'delete_objects',
      description: '批量删除存储桶中的对象',
      inputSchema: {
        type: 'object',
        properties: {
          bucketName: { type: 'string', description: '存储桶名称' },
          objectNames: { type: 'array', items: { type: 'string' }, description: '对象名称列表' }
        },
        required: ['bucketName', 'objectNames']
      }
    },
  • Inline Zod schema validation for delete_objects input parameters within the handler.
    const { bucketName, objectNames } = z.object({
      bucketName: z.string(),
      objectNames: z.array(z.string())
    }).parse(args);
  • Core implementation of batch object deletion using MinIO client's removeObjects method, with error handling and result aggregation.
    async deleteObjects(bucketName: string, objectNames: string[]): Promise<BatchOperationResult> {
      this.ensureConnected();
      
      const result: BatchOperationResult = {
        success: true,
        successCount: 0,
        failureCount: 0,
        errors: []
      };
    
      try {
        await this.client!.removeObjects(bucketName, objectNames);
        result.successCount = objectNames.length;
      } catch (error) {
        result.success = false;
        result.failureCount = objectNames.length;
        result.errors.push({
          item: objectNames.join(', '),
          error: error instanceof Error ? error.message : String(error)
        });
      }
    
      return result;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While '删除' (delete) clearly indicates a destructive operation, it doesn't specify whether deletions are permanent/reversible, what permissions are required, rate limits, or what happens with partial failures. The batch nature is mentioned but without details about atomicity or error handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient Chinese sentence that communicates the core functionality without waste. It's appropriately sized for a tool with clear parameters and no complex behavioral nuances needing explanation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive batch operation tool with no annotations and no output schema, the description is inadequate. It doesn't explain what the tool returns (success/failure indicators, error messages), doesn't warn about irreversible data loss, and provides no context about the MinIO storage system evident from sibling tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with both parameters clearly documented in the schema. The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain format constraints, size limits for the objectNames array, or special characters in bucket/object names. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('批量删除' - batch delete) and target ('存储桶中的对象' - objects in a storage bucket). It distinguishes from the sibling 'delete_object' (singular) by specifying batch operation. However, it doesn't explicitly mention the storage system context (MinIO) that's implied by the sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'delete_object' (for single objects) or 'delete_bucket' (for entire buckets). It doesn't mention prerequisites (e.g., bucket must exist), error conditions, or typical use cases for batch deletion.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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