Skip to main content
Glama

List hotspots

list_hotspots
Read-only

Ranks tracked files by code-at-rest risk using bug-fix history, churn, dependents, and critical paths, helping you find likely break points or choose files for reengineering and extra tests.

Instructions

Rank the files tracked at HEAD by code-at-rest risk: bug-fix commits, churn, dependents and critical paths in the history lookback window (authors shown, not scored); returns { hotspots, warnings }, transitive dependents in the import graph (null when the language is not supported), and critical or blocked path flags. Use it to find where a codebase is most likely to break, or to pick files for reengineering or extra test coverage.

Input Schema

NameRequiredDescriptionDefault
topNoHow many files to return. Defaults to 20.
repoDirYesAbsolute path to the git repository (any directory inside the work tree).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.5

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint=true annotation by disclosing the result shape ({ hotspots, warnings }), the authors-included-but-not-scored nuance, the null case for unsupported languages in the import graph, and the presence of critical/blocked path flags. This is genuinely useful behavioral detail an agent cannot get from the 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?

Two sentences, front-loaded with the ranking definition followed by the return/edge-case detail and the use case. Dense and slightly run-on (the return clause is a bit tangled), but almost every clause earns its place.

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 no output schema, the description usefully carries the return-value burden by naming the key fields and a nullable edge case, and the readOnly annotation covers the safety profile. The return description is slightly ambiguous about whether dependents and path flags are nested inside hotspots, so it is not fully airtight.

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 both parameters (repoDir, top) are already fully documented in the schema. The description adds no parameter-level detail, which matches the baseline expectation when the schema does the heavy lifting.

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 specific verb and resource ('Rank the files tracked at HEAD') and enumerates the scoring inputs (bug-fix commits, churn, dependents, critical paths). An agent can tell it is a repo-wide ranking tool, though it never names siblings like explain_file_risk or score_diff to draw the boundary explicitly.

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?

Gives clear context for use: 'to find where a codebase is most likely to break, or to pick files for reengineering or extra test coverage.' Strong positive guidance, but no when-not-to-use or explicit alternative routing versus the sibling tools.

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