Skip to main content
Glama

set_lifecycle

Replace a bucket's lifecycle rules with day-based expiration for current and noncurrent object versions. Captures the previous config for undo; supports dry-run and prefix scoping.

Instructions

[WRITE][risk=medium] Replace the bucket lifecycle. Reversible → prior config.

Pass the day-count knobs (rules are built for you: current-version expiry, noncurrent-version expiry), or lifecycle_xml to apply a configuration verbatim (used by undo restores). REPLACES any existing rules — the prior config is captured for undo.

Aborting abandoned multipart uploads is NOT available here: MinIO refuses a lifecycle rule whose only action is that, and drops the action when it is combined with an expiration. Use remove_incomplete_uploads instead.

The undo restores the RULE, not the data: objects the rule expires before you undo are deleted, and putting the prior configuration back does not bring them back.

Args: bucket_name: Bucket name (from bucket_ls). expire_days: Expire current objects after N days. noncurrent_expire_days: Expire noncurrent versions after N days. prefix: Optional key prefix the rules apply to (empty = whole bucket). lifecycle_xml: Full lifecycle configuration XML to apply verbatim. dry_run: If True, preview without applying. target: MinIO target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prefixNo
targetNo
dry_runNo
bucket_nameYes
expire_daysNo
lifecycle_xmlNo
noncurrent_expire_daysNo
Behavior5/5

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

Discloses that the tool REPLACES existing rules and captures prior config for undo. Warns that undo restores the rule, not the data, and objects expired before undo are permanently deleted. Also explains MinIO's refusal of certain lifecycle rules, going well beyond any annotation.

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 front-loaded with the core action and risk tag, then uses concise sections for usage, exclusions, and warnings. Every sentence carries actionable signal, and the Args section maps directly to schema without redundancy.

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?

For a complex 7-parameter mutation tool with no annotations or output schema, the description covers purpose, behavior, parameter semantics, and caveats. It even explains the interplay with undo_apply and warns about data loss, making it highly complete.

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

Parameters5/5

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

Schema coverage is 0%, but the description provides meaningful semantics for all 7 parameters, e.g., 'expire_days: Expire current objects after N days' and 'lifecycle_xml: Full lifecycle configuration XML to apply verbatim.' It also notes bucket_name comes from bucket_ls and dry_run previews without applying.

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?

The description opens with 'Replace the bucket lifecycle,' a specific verb+resource, and explicitly states it REPLACES any existing rules. This clearly distinguishes it from siblings like delete_lifecycle and bucket_lifecycle_get.

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

Usage Guidelines5/5

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

Explicitly provides exclusion guidance: 'Aborting abandoned multipart uploads is NOT available here... Use remove_incomplete_uploads instead.' Also explains the two usage modes (day-count knobs vs lifecycle_xml) and the undo restores context, making alternatives clear.

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