Skip to main content
Glama

set_object_retention

Destructive

Apply S3 object-lock retention to a specific object version. Enforce GOVERNANCE or COMPLIANCE mode with days and dry-run guards; shortening existing retention is refused.

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

NameRequiredDescriptionDefault
daysYes
modeYes
targetNo
dry_runNo
version_idNo
bucket_nameYes
object_nameYes
acknowledge_irreversibleNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.11.0

TDQS

A4.7/5.0
Behavior5/5

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

Extraordinarily rich beyond the annotations: no undo token is recorded, S3 refuses to shorten retention without the bypass-governance-retention header which the SDK never sends, COMPLIANCE cannot be lifted by any credential including root until the date passes, and both refusal paths fire under dry_run. This is exactly the destructive/irreversible context an agent needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the critical [WRITE][risk=critical] warning and 'NO UNDO EXISTS' before the mechanics and args. The prose is dense but almost every clause carries decision-relevant information; only mild redundancy between the header warning and the body costs it a 5.

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?

No output schema exists, yet the description explains what dry_run returns (before-state) and exactly what a refused call does. For a critical, irreversible, 8-parameter mutation tool, nothing needed to call it safely is missing.

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%, so the description carries the full load and does: mode values are explained with their liftability semantics, days is anchored ('from now'), version_id defaults to current, dry_run is defined as running every guard and reporting before-state, bucket_name notes the object-lock prerequisite, and object_name cites its source. All 8 parameters gain meaning.

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?

States a specific verb and resource: 'Put retention on one object version.' The scope ('one object version') cleanly separates it from set_default_retention, set_legal_hold, and bucket_lock_config. An agent can select it without opening the schema.

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?

Provides strong conditional guidance: COMPLIANCE requires acknowledge_irreversible=True, shortening/downgrade attempts are refused, and guards still fire under dry_run. It doesn't explicitly compare against sibling tools like set_default_retention or set_legal_hold, so a 4 rather than 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.