Skip to main content
Glama

set_legal_hold

Destructive

Enable or disable a legal hold on MinIO objects to block deletion, and lift it when no longer needed. Stacks with retention; reversible.

Instructions

[WRITE][risk=medium] Turn a legal hold on/off. Reversible → prior hold state.

A legal hold blocks deletion with no date attached and is lifted by turning it off — the one WORM control that is reversible by design. It stacks with retention: lifting the hold does not make an object deletable while its retention still runs.

Args: bucket_name: Bucket name (must have object lock enabled). object_name: Object key (from bucket_objects). hold_on: True places the hold, False lifts it. version_id: Specific version; omit for the current version. dry_run: If True, preview (reading the current hold) without changing it. target: MinIO target name from config; omit for the default.

Input Schema

NameRequiredDescriptionDefault
targetNo
dry_runNo
hold_onYes
version_idNo
bucket_nameYes
object_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?

Annotations declare a non-read-only, non-idempotent, destructive operation, and the description goes well beyond them: it explains that the change is reversible to the prior hold state, that the hold has no expiry date, that it blocks deletion, and that lifting it does not make an object deletable while retention still runs. That interaction-with-retention caveat is exactly the kind of consequence an agent needs before invoking a destructive tool.

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 [WRITE][risk=medium] and the one-line action, followed by a short rationale paragraph and a compact Args block. No sentence is filler — even the WORM/reversibility note earns its place by preventing misuse.

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?

With no output schema, the description still tells the agent what dry_run returns (the current hold state) and what state the object ends in after a real call. Combined with annotations covering the safety profile and full per-parameter docs, nothing needed to invoke this 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?

Schema description coverage is 0%, so the description must carry all six parameters — and it does, documenting bucket_name, object_name, hold_on, version_id (omit for current version), dry_run, and target (config name, omit for default). This fully compensates for the empty schema and adds semantics the types alone cannot convey.

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 gives a specific verb and resource — toggling a legal hold on/off for a bucket object — and immediately differentiates it from the adjacent retention controls ('the one WORM control that is reversible by design', 'stacks with retention'). An agent can separate this from set_object_retention / set_default_retention without opening any 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?

It states preconditions ('bucket must have object lock enabled'), the meaning of both hold_on values, and offers dry_run as a read-only preview path, which implicitly routes read-only intent away from this tool. It never names an explicit alternative sibling (e.g. object_lock_status for inspection), so it stops just 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.