Skip to main content
Glama

stale_scan

Detect documentation drift by scanning project markdown files to find references to commands, flags, APIs, or files that no longer match the actual codebase.

Instructions

Detect documentation drift — find places in README.md, CHANGELOG.md, and other project markdown where the docs reference commands, flags, APIs, or files that the code no longer matches.

When to use: before tagging a release, after large refactors or renames, when onboarding a new contributor, or as a periodic health check. Set git: true to additionally flag docs that have not been touched since a closely related source file changed significantly.

Side effects: reads all markdown files and source files reachable from the project root (respecting .gitignore). Never writes, auto-fixes, or moves files — this is a pure reporting tool.

Returns: plain-text, JSON, or markdown report listing each drifted section with file:line references and a one-line explanation of the mismatch (e.g. "README references --deep flag removed in src/cli.ts:42"). Exit 1 if any drift is found.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoAbsolute or relative path to the project root to scan. Defaults to the current working directory.
formatNoResponse format: "terminal" for human-readable ANSI-colored output, "json" for machine-parseable structured data, "markdown" for rendered tables (where supported). Defaults to "terminal".
gitNoWhen true, additionally compare each markdown file's last-modified commit against the closest-related source file and flag docs that are significantly older. Requires the project to be a git repository; silently skipped otherwise.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure and does so effectively. It explicitly states side effects: 'reads all markdown files and source files reachable from the project root (respecting .gitignore). Never writes, auto-fixes, or moves files.' It also describes the exit behavior: 'Exit 1 if any drift is found.' The only minor gap is that it doesn't mention performance characteristics or rate limits, but for a local file scanning tool, this is reasonable.

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

Conciseness5/5

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

The description is well-structured and front-loaded with the core purpose. Each sentence adds distinct value: purpose statement, usage guidelines, behavioral transparency, and return format/exit behavior. There's no wasted text, and the information is organized logically from general to specific.

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 tool with no annotations and no output schema, the description provides excellent contextual completeness. It covers purpose, usage guidelines, behavioral characteristics (including what it does and doesn't do), and output format details. The description compensates well for the lack of structured metadata by being comprehensive yet concise.

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?

The schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description adds some context about the 'git' parameter ('Set `git: true` to additionally flag docs...'), but doesn't provide additional semantic meaning beyond what's in the schema descriptions. This meets the baseline expectation when schema coverage is complete.

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?

The description clearly states the tool's purpose with specific verbs ('detect', 'find') and resources ('documentation drift', 'README.md, CHANGELOG.md, and other project markdown'). It distinguishes itself from potential siblings by explicitly stating it's a 'pure reporting tool' that 'never writes, auto-fixes, or moves files', which differentiates it from tools that might perform automated fixes.

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?

The description provides explicit guidance on when to use the tool: 'before tagging a release, after large refactors or renames, when onboarding a new contributor, or as a periodic health check.' It also includes a specific conditional usage tip: 'Set `git: true` to additionally flag docs that have not been touched since a closely related source file changed significantly.' This gives clear context for both primary and advanced use cases.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/WhenLabs-org/when'

If you have feedback or need assistance with the MCP directory API, please join our Discord server