Skip to main content
Glama

Cache: Freeze cache tree

metrecept_freeze_cache_tree

Freeze a cache tree to pin a known-good version while forks keep experimenting, or unfreeze it to resume writes. Frozen trees still serve cached responses and send misses upstream without storing them.

Instructions

Freeze a cache tree so it keeps serving its cached responses but accepts no new writes, or unfreeze it (frozen=false) back to active. Use it to pin a known-good cache, for example a release branch's tree, while experiments continue in forks. Not for hiding or retiring a tree: use metrecept_archive_cache_tree. Not for removing it: use metrecept_delete_cache_tree. While frozen, misses are served upstream but not stored, eviction returns 409 tree_frozen and the tree cannot be a fork parent or promote target. Idempotent, not billed, audit-logged. Errors: 409 cannot_freeze_main, 409 tree_archived (restore it first), 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
frozenNotrue (default) freezes the tree; false unfreezes it back to active.
tree_idYesId of the cache tree to freeze or unfreeze; any tree except "main".

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.1

TDQS

A4.2/5.0
Behavior3/5

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

Annotations are absent, and the description does substantial work: frozen-state semantics (misses served upstream but not stored), which operations break while frozen (eviction 409 tree_frozen, cannot be fork parent or promote target), idempotency, billing, audit logging, auth requirements, and enumerated errors. That is strong disclosure overall, but the tool's actual result payload and how to confirm the new state are left to the output schema.

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 the core action and follow-up routing, followed by behavior, then errors, then auth. Dense but nearly every clause carries distinct information; the auth/tenant sentence is boilerplate that could be trimmed.

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 with no annotations, the description supplies state semantics, side effects on other operations, idempotency, cost, auditability, auth, and a full error enumeration. An agent has everything needed to call it and interpret failures correctly.

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

Parameters3/5

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

Schema coverage is 100%, so both parameters are already documented, and the description largely restates them ('frozen=false' to unfreeze, any tree but main via the cannot_freeze_main error). The added value is the error-to-parameter mapping, which is useful but modest at this coverage level.

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 ('Freeze a cache tree') plus the inverse operation (unfreeze via frozen=false), and immediately distinguishes itself from archive and delete siblings. An agent knows exactly which sibling to pick from the first sentence.

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 concrete positive use case ('pin a known-good cache, for example a release branch's tree, while experiments continue in forks') and two explicit negative routings to metrecept_archive_cache_tree and metrecept_delete_cache_tree. When/when-not/alternatives are all present.

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