Skip to main content
Glama
pickstar-2002

MinIO Storage MCP

get_storage_stats

Retrieve storage usage statistics and metrics from MinIO object storage to monitor capacity and analyze data distribution.

Instructions

获取存储统计信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:226-229 (registration)
    Registration of the 'get_storage_stats' tool in the ListTools response, including name, description, and empty input schema.
    {
      name: 'get_storage_stats',
      description: '获取存储统计信息',
      inputSchema: { type: 'object', properties: {} }
  • MCP CallTool handler case for 'get_storage_stats': calls minioClient.getStorageStats() and returns formatted text response.
    case 'get_storage_stats': {
      const stats = await this.minioClient.getStorageStats();
      return {
        content: [
          {
            type: 'text',
            text: `存储统计信息:\n- 总存储桶数: ${stats.totalBuckets}\n- 总对象数: ${stats.totalObjects}\n- 总大小: ${(stats.totalSize / 1024 / 1024).toFixed(2)} MB\n\n各存储桶详情:\n${stats.bucketStats.map(b => `- ${b.bucketName}: ${b.objectCount} 个对象, ${(b.totalSize / 1024 / 1024).toFixed(2)} MB`).join('\n')}`
          }
        ]
      };
    }
  • Core implementation of getStorageStats(): lists all buckets and objects recursively, computes total stats and per-bucket stats.
    async getStorageStats(): Promise<StorageStats> {
      this.ensureConnected();
      
      const buckets = await this.listBuckets();
      const bucketStats = [];
      let totalObjects = 0;
      let totalSize = 0;
    
      for (const bucket of buckets) {
        const objects = await this.listObjects(bucket.name, undefined, true);
        const bucketSize = objects.reduce((sum, obj) => sum + obj.size, 0);
        const objectCount = objects.length;
        
        bucketStats.push({
          bucketName: bucket.name,
          objectCount,
          totalSize: bucketSize
        });
        
        totalObjects += objectCount;
        totalSize += bucketSize;
      }
    
      return {
        totalBuckets: buckets.length,
        totalObjects,
        totalSize,
        bucketStats
      };
    }
  • TypeScript interface defining the StorageStats return type used by getStorageStats().
    export interface StorageStats {
      totalBuckets: number;
      totalObjects: number;
      totalSize: number;
      bucketStats: Array<{
        bucketName: string;
        objectCount: number;
        totalSize: number;
      }>;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden but only states the action without behavioral details. It doesn't disclose if this is a read-only operation, requires authentication, has rate limits, returns aggregate or per-bucket stats, or any other traits beyond the basic purpose.

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 phrase in Chinese that directly states the purpose without waste. It's appropriately sized and front-loaded, though its brevity contributes to gaps in other dimensions.

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?

Given no annotations, no output schema, and a simple tool with 0 parameters, the description is incomplete. It doesn't explain what statistics are returned (e.g., numeric data, JSON structure) or how it fits into the MinIO context, making it inadequate for reliable agent use.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add param info, but that's acceptable here; baseline is 4 for zero parameters as it avoids unnecessary details.

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

Purpose2/5

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

The description '获取存储统计信息' (Get storage statistics) restates the tool name 'get_storage_stats' with minimal elaboration, making it a tautology. It doesn't specify what kind of storage statistics (e.g., MinIO bucket usage, object counts, total size) or distinguish it from sibling tools like 'list_buckets' or 'get_object_info'.

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

Usage Guidelines1/5

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

No guidance is provided on when to use this tool versus alternatives. It doesn't mention context (e.g., monitoring storage usage, checking capacity) or exclusions, leaving the agent to guess based on the name alone among many storage-related siblings.

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