Skip to main content
Glama

set_bucket_policy

Set a new bucket policy on a MinIO bucket while preserving the previous policy for rollback. Supports dry-run and prevents changes that would lock out the tool's own undo access.

Instructions

[WRITE][risk=medium] Replace the bucket policy. Reversible → prior policy JSON.

An anonymous-Allow policy makes the bucket public — check bucket_exposure_audit after changing policies.

Refuses a policy whose explicit Deny on s3:PutBucketPolicy covers this tool's own access key: an explicit Deny beats every Allow, so the undo that replays the prior policy would itself be denied. Enforced under dry_run too.

Args: bucket_name: Bucket name (from bucket_ls). policy_json: Full policy document as a JSON string (must contain 'Statement'). dry_run: If True, preview without applying. target: MinIO target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNo
dry_runNo
bucket_nameYes
policy_jsonYes
Behavior5/5

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

No annotations are provided, so the description carries the full behavioral burden, and it does so excellently. It discloses mutability (WRITE), reversibility ('prior policy JSON'), the risk of making a bucket public, and a subtle failure mode: it refuses policies whose explicit Deny on s3:PutBucketPolicy covers the tool's own access key, explaining why via 'an explicit Deny beats every Allow' and noting it is enforced even under dry_run. This is rich, beyond-schema behavioral disclosure.

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?

Efficiently front-loaded with a bracketed WRITE/risk tag, a one-line summary, and a reversibility note. The behavioral caveats are justified and the Args section is compact and clean. No wasted sentences.

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

Completeness5/5

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

A mutation tool with no annotations, no output schema, and four parameters—yet the description covers purpose, risk, reversibility, a failure-refusal edge case, the dry_run interaction, and all parameter semantics. It is complete for a tool of this complexity.

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?

Schema description coverage is 0%, so the description must compensate for the schema, and it does for three of four parameters: bucket_name ('from bucket_ls'), policy_json ('must contain Statement'), dry_run ('preview without applying'), and target ('MinIO target name from config; omit for the default'). Every parameter is explained, adding meaning the bare schema lacks.

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

Purpose5/5

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

Clear verb+resource: 'Replace the bucket policy.' It explicitly frames this as a WRITE operation of medium risk and distinguishes it from the sibling delete_bucket_policy and bucket_policy_get. The reversal note ('prior policy JSON') and the public-exposure warning further sharpen the purpose.

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

Usage Guidelines4/5

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

The description states when to use it (replace a bucket policy) and gives an actionable follow-up ('check bucket_exposure_audit after changing policies'). It doesn't explicitly contrast with siblings beyond delete_bucket_policy/policy_get, and doesn't state when not to use it, but provides clear operational context and caveats.

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/AIops-tools/MinIO-AIops'

If you have feedback or need assistance with the MCP directory API, please join our Discord server