Skip to main content
Glama
Knuckles-Team

Repository Manager

Gc

rm_build_gc

Free disk space by garbage-collecting a repository's shared build cache: prune stale content-addressed artifacts, retain recent entries, and delete those older than a set age.

Instructions

Gc (rm_build). Content-addressed build broker for ANY repository (CONCEPT:RM-TASK-LEDGER).

Keyed by (repo, tree-sha, feature-set, toolchain-fingerprint, target-triple). The DEDUP is the value: N lanes asking for the same build today each pay for a full cargo/pnpm build into their own target-isolated/node_modules — measured at 21.7 GB across 4 duplicate directories after pruning. This tool publishes named artifacts to a shared, checksummed cache instead.

Honest degradation: a dirty tree or an unfingerprintable toolchain BUILDS — it never serves a possibly-stale artifact and never silently skips the cache as though it were consulted.

Co-location: this tool always passes colocated=True to the underlying reservation, because being inside this pinned MCP server process IS the proof of same-node execution that a bare CLI invocation cannot provide — fcntl leases do not arbitrate across nodes, and the lease files live under an NFS-exported path. Route build requests through this tool rather than a bare local invocation when you are not certain you are on the pinned node.

Arbitration is advisory (D-CP-8): an agent running cargo build directly bypasses this broker entirely.

Input Schema

NameRequiredDescriptionDefault
keyNoA cache key, for status/artifacts/explain.
hostNoFor 'request': dispatch to this REGISTERED, authorized remote host (its rm_remote_workers 'register_worker' host_id) instead of building locally. Requires a clean local tree (its HEAD sha + origin are what gets staged and built remotely) and does not yet retrieve artifacts back — see the returned result's 'note'. Omit to build locally (the default, always colocated=True).
specNoWhich declared build spec to use (.buildcache.yaml). Defaults to the repo's first.
repo_pathNoAny working tree of the target repository. Defaults to the server's cwd.
keep_recentNoFor gc: always keep this many most-recent cache entries.
max_age_daysNoFor gc: reclaim cache entries older than this (subject to keep_recent).
wait_timeoutNoSeconds 'request' waits on an in-flight build of the same key before building anyway.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.5.1

TDQS

C2.2/5.0
Behavior2/5

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

The description does add real behavioral context (colocated=True reservation, advisory arbitration, 'honest degradation' on dirty trees), which is more than the bare annotations give. However, for a GC operation the critical behaviors — what gets deleted, whether reclamation is reversible, interaction with active leases — are entirely absent, and `destructiveHint: false` is left unexplained against a tool whose params say it 'reclaim[s] cache entries'. No outright contradiction in the description text itself, but the disclosure misses the operation it names.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The text is long and back-loaded with meta-commentary (CONCEPT:RM-TASK-LEDGER, D-CP-8, bold ALL-CAPS fragments) before anything actionable. Much of it — 21.7 GB measurements, cargo/pnpm anecdotes, NFS lease details — is irrelevant to invoking this specific tool, and the tool's actual action is never front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return values need no explanation, but the description omits the core of a GC tool: what state it mutates, whether it is safe to run concurrently with builds or lanes, and any prerequisites. Given seven optional params with multi-mode behavior, the description leaves the agent without the information needed to call it 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 description coverage is 100%, so the baseline is 3; each parameter including `keep_recent`, `max_age_days`, and `wait_timeout` is already documented in the schema. The description adds only the conceptual key tuple `(repo, tree-sha, feature-set, toolchain-fingerprint, target-triple)`, which mildly enriches `key` but does not change how any param is passed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The name and title say 'Gc', and two params are explicitly 'For gc', yet the description never states that this tool reclaims/garbage-collects cache entries. Instead it describes a build broker that 'publishes named artifacts to a shared, checksummed cache' — an operation belonging to sibling tools like rm_build_request. An agent reading only the description would not know this tool's verb.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is guidance for routing build *requests* through the broker and for the remote `host` path, but nothing on when to run a GC, how it interacts with in-flight builds, or when to prefer it over rm_projects_build/cleanup tools. The guidance present is for a different mode than the tool name implies.

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

Deploy Server

Other Tools