Skip to main content
Glama

Cache: Archive cache tree

metrecept_archive_cache_tree

Archive a cache tree to make it read-only and hide it from active listings while preserving all entries for later restore; set archived=false to restore its prior status.

Instructions

Archive a cache tree: make it read-only and hide it from metrecept_list_cache_trees, keeping every entry so it can be restored later; archived=false restores it to the status it had before (active or frozen). Use it to retire a finished experiment's tree without losing it. Not for a temporary write lock: use metrecept_freeze_cache_tree. Not for freeing storage: use metrecept_delete_cache_tree. Archived trees still serve hits, but writes, eviction, reset and freeze return 409 tree_archived, and they cannot be a fork parent or promote target. List them with include_archived=true. Idempotent, not billed, audit-logged. Errors: 409 cannot_archive_main, 404 tree_missing. Requires a Metrecept API key (METRECEPT_API_KEY env on stdio, or Authorization: Bearer on remote HTTP); results are scoped to that key's tenant only.

Input Schema

NameRequiredDescriptionDefault
tree_idYesId of the cache tree to archive or restore; any tree except "main".
archivedNotrue (default) archives the tree; false restores it to the status it had before archiving.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.1

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the full burden and does so: it discloses that archived trees still serve hits, that writes/eviction/reset/freeze return 409 tree_archived, that archived trees cannot be fork parents or promote targets, and that the operation is idempotent, unbilled and audit-logged. It also names both error codes (409 cannot_archive_main, 404 tree_missing) and the auth/tenant scoping requirements.

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?

The core effect is front-loaded in the first clause, then restore semantics, then exclusions, then side effects. It is a dense run-on block rather than being broken into scannable segments, but essentially every clause carries non-redundant information an agent needs.

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 two-parameter mutation tool with no annotations and an output schema, the description covers effect, reversibility, side effects on other operations, error modes, auth and tenant scoping. Return values are correctly left to the output schema rather than restated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds value by specifying the possible prior states an archived=false restore can return to (active or frozen) and by tying tree_id to the "any tree except main" constraint that produces the cannot_archive_main error. It stops short of adding anything not already hinted at in the schema fields.

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 ("Archive a cache tree") and immediately defines the scope of the operation: read-only plus hidden from metrecept_list_cache_trees while entries are preserved. It explicitly separates itself from metrecept_freeze_cache_tree and metrecept_delete_cache_tree, so an agent can pick it out of the sibling set without opening a schema.

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?

Gives a positive use case ("retire a finished experiment's tree without losing it") and two explicit not-for cases, each paired with the correct alternative sibling. The listing guidance (include_archived=true) and the restore trigger (archived=false) are both stated as conditions for action.

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