Skip to main content
Glama

File hotspots

file_hotspots
Read-onlyIdempotent

Rank files by commit count over a selected period to reveal churn, risky areas, and refactoring candidates.

Instructions

Rank files by how many commits changed them in the last N days (merge commits excluded). Useful for spotting churn, risky areas and refactoring candidates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoSize of the time window in days.
pathNoRestrict to this file or directory.
repoNoRepository name or absolute path from the allowlist. Defaults to the first configured repo.
limitNoMaximum number of results (1-100).
excludeNoGlob patterns for files to leave out, e.g. ["*.lock", "dist/", "docs/**/*.md"]. A pattern without "/" matches at any depth; a trailing "/" excludes a directory.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesName of the repository that was queried.
hotspotsYes
windowDaysYes
filesChangedYes
scanTruncatedYes
commitsScannedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so safety is covered. The description adds a real behavioral trait beyond that: merge commits are excluded from the count, which changes how the ranking should be read.

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?

Two tightly written sentences: the operation and its scope come first, the value proposition second. No filler, no restating the title.

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?

An output schema exists so return values need not be described, and annotations carry the safety profile. The description covers the ranking basis and window, though it could note result ordering (descending churn) to be fully self-contained.

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 days, path, repo, limit and exclude are fully documented in the schema. The description only echoes the N-day window and implies filtering, adding no format or semantics beyond the schema.

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?

States a precise verb and resource ('Rank files by how many commits changed them') plus the scoping window and a behavioral detail (merge commits excluded). It is clear what the tool computes, but it never distinguishes itself from close siblings like file_history or change_coupling.

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

Usage Guidelines3/5

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

The second sentence gives motivation ('spotting churn, risky areas and refactoring candidates'), which implies when the tool is useful, but offers no explicit when-not guidance and names no alternative sibling for overlapping tasks such as file_history.

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