Skip to main content
Glama
pickstar-2002

MinIO Storage MCP

set_bucket_policy

Configure access permissions for MinIO storage buckets by applying JSON policies to control user and application access rights.

Instructions

设置存储桶策略

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucketNameYes存储桶名称
policyYesJSON格式的策略

Implementation Reference

  • MCP tool handler for 'set_bucket_policy': validates input parameters using Zod, calls MinIOStorageClient.setBucketPolicy, and returns a success text response.
    case 'set_bucket_policy': {
      const { bucketName, policy } = z.object({
        bucketName: z.string(),
        policy: z.string()
      }).parse(args);
      
      await this.minioClient.setBucketPolicy(bucketName, policy);
      return {
        content: [
          {
            type: 'text',
            text: `成功设置存储桶 ${bucketName} 的策略`
          }
        ]
      };
    }
  • src/index.ts:278-289 (registration)
    Tool registration in list_tools response, including name, description, and input schema definition.
    {
      name: 'set_bucket_policy',
      description: '设置存储桶策略',
      inputSchema: {
        type: 'object',
        properties: {
          bucketName: { type: 'string', description: '存储桶名称' },
          policy: { type: 'string', description: 'JSON格式的策略' }
        },
        required: ['bucketName', 'policy']
      }
    },
  • Zod schema validation for input arguments in the handler.
    const { bucketName, policy } = z.object({
      bucketName: z.string(),
      policy: z.string()
    }).parse(args);
  • MinIOStorageClient helper method that implements setBucketPolicy by delegating to the underlying Minio Client SDK.
    async setBucketPolicy(bucketName: string, policy: string): Promise<void> {
      this.ensureConnected();
      await this.client!.setBucketPolicy(bucketName, policy);
    }
Behavior1/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. The description only states the action ('set bucket policy') without any information about permissions required, whether this is a destructive/mutative operation, potential side effects, error conditions, or what happens if a policy already exists. This is inadequate for a tool that modifies system state.

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 extremely concise - a single phrase in Chinese that directly states the tool's purpose. There's no wasted language or unnecessary elaboration. However, this conciseness comes at the cost of completeness.

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

Completeness1/5

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

For a tool that modifies bucket policies (a potentially destructive operation) with no annotations and no output schema, the description is completely inadequate. It doesn't explain what a bucket policy is, what the operation does, what permissions are needed, what format the policy should be in, or what to expect as a result. The agent would have insufficient information to use this tool correctly.

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?

The input schema has 100% description coverage with clear parameter documentation in Chinese, so the baseline score is 3. The tool description adds no additional parameter information beyond what's already in the schema (e.g., no examples of policy JSON format, no constraints on bucket names).

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 '设置存储桶策略' (Set bucket policy) is a tautology that essentially restates the tool name in Chinese. While it indicates the verb 'set' and resource 'bucket policy', it lacks specificity about what setting a bucket policy entails and doesn't distinguish this tool from sibling tools like 'get_bucket_policy' or 'delete_bucket_policy' beyond the basic action verb.

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?

The description provides no guidance on when to use this tool versus alternatives. There are no mentions of prerequisites (e.g., bucket must exist), when-not-to-use scenarios, or comparisons to sibling tools like 'get_bucket_policy' or 'delete_bucket_policy'. This leaves the agent with no context for tool selection.

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