Skip to main content
Glama

set_default_retention

Destructive

Set a bucket's default object retention so newly written data is locked for a fixed period in GOVERNANCE or COMPLIANCE mode. Preview with dry-run and undo via the prior rule.

Instructions

[WRITE][risk=high] Set the bucket's DEFAULT retention. Reversible → prior rule.

Applies to objects written from now on; objects already stored are untouched. Undo restores the prior rule — but objects written while this rule was in force keep the retention they were given, and COMPLIANCE retention on them cannot be shortened by anyone afterwards.

Refused (under dry_run too) when the bucket has no object lock, since the rule would have nothing to attach to.

Args: bucket_name: Bucket name (must already have object lock enabled). mode: "GOVERNANCE" (an admin with bypass permission can lift it) or "COMPLIANCE" (nobody can lift it before the date). days: Retention duration in days. Pass exactly one of days/years. years: Retention duration in years. Pass exactly one of days/years. dry_run: If True, preview without applying. target: MinIO target name from config; omit for the default.

Input Schema

NameRequiredDescriptionDefault
daysNo
modeYes
yearsNo
targetNo
dry_runNo
bucket_nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.11.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the destructive/readOnly annotations by disclosing what undo does (restores prior rule), that objects written under the rule keep the retention given, and that COMPLIANCE retention on them can never be shortened. It also documents a pre-condition failure mode (no object lock → refusal even in dry_run), which annotations cannot express.

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?

Front-loaded with the write/risk tag and the core action, then behavior, then a compact Args list. Given zero schema coverage, every line (including the Args block) earns its place with no 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 high-risk, 6-parameter mutation with no output schema, the description covers the action, side effects, undo semantics, irreversibility caveats, refusal conditions, and every parameter. Nothing needed to invoke it correctly 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?

With 0% schema description coverage, the description carries the full burden and delivers: it explains mode's GOVERNANCE vs COMPLIANCE semantics, the days/years mutual exclusivity ("pass exactly one"), dry_run behavior, and target's config origin. This adds genuine meaning the raw 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?

States a specific verb+resource ("Set the bucket's DEFAULT retention") and scopes it to default (future) retention versus per-object rules. The [WRITE][risk=high] tag and the note that existing objects are untouched make it easily distinguishable from siblings like set_object_retention and clear_default_retention.

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?

Gives clear context: it applies only to objects written from now on, is reversible to the prior rule, and is refused (even under dry_run) when the bucket lacks object lock. It stops short of explicitly naming sibling alternatives (e.g. set_object_retention for existing objects), so it is strong context rather than a full when/when-not routing.

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