Skip to main content
Glama

set_registry_retention

Change which images the organisation's registry keeps, so it stops filling up: the organisation-wide policy (default), and/or the per-repository rules (rules). Omitted fields stay unchanged. default sets the organisation-wide policy; reset_default true puts it back on the platform default instead. rules REPLACES the whole list of repository rules: read the current rules with get_registry_storage first and send the complete list you want, including the rules to keep; an empty list removes every rule. Pass the retention.version you read as expected_version: if retention changed since, the call is refused ("Retention changed since you read it") - read it again and rebuild the change, never retry the same arguments. A rule replaces the default for the repositories its pattern matches (lowercase, * within a path segment, ** across segments, e.g. ankra-ci/** for the pipeline's build images or my-app/**; ** alone is refused - use default). An image is kept when pushed within keep_days or among the keep_latest newest of its repository. Protections whatever you choose: the newest image of every repository is always kept, and images pulled in the last 7 days are kept. Images outside the policy are deleted at the next daily run (or now with run_registry_retention); the space comes back only at the weekly garbage collection (Sunday 03:00 UTC). Requires credentials.write.

Input Schema

NameRequiredDescriptionDefault
rulesNoThe COMPLETE list of repository rules after the change (it replaces the current list). Omit to leave the rules unchanged; an empty list removes them all.
defaultNoThe new organisation-wide policy for every repository no rule covers. Omit to leave it unchanged.
reset_defaultNotrue puts the organisation-wide policy back on the platform default. Do not combine with default.
expected_versionNoAlways send the retention.version get_registry_storage returned when you read the rules: if someone changed retention since, the change is refused instead of overwriting theirs - read again and rebuild the change. Omit it only when that read returned no version.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the sparse annotations: discloses that rules REPLACES the whole list, that an empty list removes all rules, optimistic-concurrency refusal semantics, that deletions occur at the next daily run with space reclaimed only at weekly GC, built-in protections (newest image always kept, last-7-day pulls kept), and the credentials.write requirement.

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-loaded with purpose before the mechanics, and nearly every sentence carries needed information given the complexity. It is a dense wall of text, but the length is largely justified rather than padded.

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 mutation tool with no output schema and nested objects, it covers side effects, protections, auth, concurrency, error behaviour, and deferred deletion costs. Nothing an agent needs in order to call 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 100% schema coverage the baseline is 3, but the description adds real meaning: rules-replace semantics, reset_default vs default mutual exclusion, expected_version being the retention.version from get_registry_storage, and pattern syntax rules (lowercase, * within a segment, ** across segments, bare ** refused).

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 (change) and resource (the images the organisation's registry keeps) plus the goal ('so it stops filling up'). It distinguishes itself from siblings by naming get_registry_storage for reading and run_registry_retention for immediate deletion.

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 covers when to use each option: default vs rules vs reset_default, that omitted fields stay unchanged, that rules must be read via get_registry_storage first, and the concurrency protocol (read again and rebuild, never retry the same arguments). It also routes immediate deletion to run_registry_retention.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources