Skip to main content
Glama

Code age

code_age
Read-onlyIdempotent

Find stale code and knowledge loss: see how long ago each file last changed, its last author, and whether that author still commits; includes age histogram and departed-author counts.

Instructions

How long ago each file on HEAD last changed, oldest first, with its last author and whether that author still commits to the repository. Also returns an age histogram, the median age per directory and how many files were last touched by someone who has left. Useful for "which parts of the code nobody touches any more?" and "where are we losing knowledge?".

Input Schema

NameRequiredDescriptionDefault
pathNoRestrict to this file or directory.
repoNoRepo name or path; defaults to the first configured repo.
limitNoMaximum number of results.
excludeNoGlobs to leave out, as in file_hotspots.
minAgeDaysNoOnly list files at least this many days old (the summary covers all files).
inactiveDaysNoAn author with no commit in this many days counts as inactive.

Output Schema

NameRequiredDescriptionDefault
pathYesThe requested file or directory, or null for the whole repo.
repoYesName of the repository that was queried.
filesYesOldest first, at least minAgeDays old.
ageBucketsYes
directoriesYesOldest (highest median age) first.
filesOnHeadYesFiles on HEAD in the area, after exclude.
inactiveDaysYes
medianAgeDaysYes
scanTruncatedYesTrue if history was cut off; files last changed before the cut-off are missing.
commitsScannedYes
inactiveAuthorFilesYesFiles whose last author has not committed anywhere in the last inactiveDays.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare the full safety profile (readOnly, idempotent, non-destructive, closed-world), so the description carries a lighter burden. It adds genuinely useful behavior beyond annotations only in the result-ordering clause ("oldest first") and the interpretation of last-author activity; the rest restates return content that the output schema already covers. No permissions, cost, or failure-mode context is offered.

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 behavior and the oldest-first ordering are front-loaded in the first sentence, and the use-case framing comes last. It is dense but every clause conveys real information; the enumeration of return aggregates is somewhat lengthy given an output schema exists, keeping it from a 5.

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

Completeness4/5

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

With a full output schema, complete parameter documentation, and annotations covering the safety profile, the description is sufficient for an agent to call the tool correctly. The main remaining gap is routing guidance against the many sibling analysis tools, which the description never addresses.

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 all six parameters (path, repo, limit, exclude, minAgeDays, inactiveDays) are already documented in the schema. The description adds no parameter-level meaning beyond what is in the schema, so the baseline of 3 applies.

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

Purpose4/5

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

The description states a specific resource and computed result: file age on HEAD, oldest first, with last author and author activity status, plus histogram/median/per-directory aggregates. An agent understands exactly what the tool produces. It does not, however, explicitly differentiate itself from adjacent siblings like file_hotspots or knowledge_map, which is the only thing separating this from a 5.

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 gives clear situational context via two quoted questions ("which parts of the code nobody touches any more?", "where are we losing knowledge?"), which tells an agent when this tool is the right pick. It stops short of naming alternatives or exclusions (e.g. when to prefer file_hotspots or knowledge_map instead), so it does not reach 5.

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