Skip to main content
Glama

set_object_retention

Apply retention to an object version to protect it from deletion or modification for a specified period, using GOVERNANCE or COMPLIANCE modes.

Instructions

[WRITE][risk=critical] Put retention on one object version. NO UNDO EXISTS.

This is extend-only and irreversible through this tool, not by policy but by construction: S3 refuses to shorten or remove retention without the x-amz-bypass-governance-retention header, and the minio SDK never sends it. COMPLIANCE mode cannot be shortened by any credential at all — not root — until the date passes, and the storage cannot be reclaimed before then.

No undo token is recorded. Calls that would shorten or downgrade retention already in force are refused, and COMPLIANCE requires acknowledge_irreversible=True. Both refusals fire under dry_run.

Args: bucket_name: Bucket name (must have object lock enabled). object_name: Object key (from bucket_objects). mode: "GOVERNANCE" (liftable out of band with mc retention clear by a holder of s3:BypassGovernanceRetention — note that command has no --bypass flag) or "COMPLIANCE" (liftable by nobody before the date, root included). days: Retain for this many days from now. version_id: Specific version; omit for the current version. acknowledge_irreversible: Required True for COMPLIANCE mode. dry_run: If True, run every guard and report the before-state without writing. target: MinIO target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysYes
modeYes
targetNo
dry_runNo
version_idNo
bucket_nameYes
object_nameYes
acknowledge_irreversibleNo
Behavior5/5

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

With no annotations provided, the description carries the full burden and exceeds it: it discloses no-undo, irreversibility, COMPLIANCE's immutability, refusal of shortening/downgrading, the acknowledge_irreversible requirement, and dry_run behavior. This is far beyond any schema or annotation could convey.

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 lengthy but every sentence earns its place by adding critical safety or operational detail. It is well-structured with a warning prefix, explanatory prose, and a clear Args list, all front-loaded with the most important caveat: 'NO UNDO EXISTS.'

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 high-complexity mutation tool with no annotations and no output schema, this description covers safety, parameter semantics, failure modes, dry_run behavior, and edge cases. It gives the agent everything needed to invoke the tool correctly and understand the irreversible consequences.

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 description coverage is 0%, but the Args section compensates completely: bucket_name requires object lock, mode explains GOVERNANCE vs COMPLIANCE and out-of-band escape, days/version_id/dry_run/target all get concrete behavioral meaning. Every parameter is given semantic value beyond its type.

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 '[WRITE][risk=critical] Put retention on one object version,' clearly stating the verb (put), resource (retention), and scope (one object version). This distinguishes it from sibling tools like set_default_retention and set_legal_hold, which operate at different levels.

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?

It provides strong context for when to use the tool: setting retention on a specific object version, with detailed mode implications and refusal conditions. However, it does not explicitly name alternative tools like set_default_retention or say 'use this instead of X,' so it stops short of a 5.

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