Skip to main content
Glama

get_risk_hotspots

Identify high-risk code files by detecting areas with both high complexity and frequent changes using Adam Tornhill's methodology to prioritize refactoring efforts.

Instructions

Code hotspots: files with both high complexity AND high git churn (Adam Tornhill methodology). Score = complexity × log(1 + commits). Each entry includes a confidence_level (low/medium/multi_signal) counting how many of the two independent signals fired strongly. Result envelope includes _methodology disclosure and _warnings when git is unavailable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
since_daysNoGit churn window in days (default: 90)
limitNoMax results (default: 20)
min_cyclomaticNoMin cyclomatic complexity to consider (default: 3)
Behavior5/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. It effectively describes the methodology (complexity × log(1 + commits)), confidence levels (low/medium/multi_signal), result envelope inclusions (methodology disclosure and warnings), and edge cases (git unavailability). This provides comprehensive behavioral context beyond basic functionality.

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 efficiently structured in three sentences: first defines the tool's purpose and methodology, second explains the confidence scoring, third describes result envelope inclusions. Every sentence adds essential information with zero wasted words, making it highly front-loaded and concise.

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?

For a tool with no annotations and no output schema, the description provides excellent context about methodology, scoring, confidence levels, and edge cases. However, without an output schema, it doesn't fully describe the return format structure (though it mentions confidence_level and result envelope inclusions), leaving some ambiguity about the complete response format.

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 schema already documents all three parameters with their types, constraints, and defaults. The description doesn't add any parameter-specific information beyond what's in the schema, maintaining the baseline score of 3 for adequate but not enhanced parameter documentation.

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 identifies 'code hotspots: files with both high complexity AND high git churn' using the 'Adam Tornhill methodology' with a specific scoring formula. It distinguishes itself from sibling tools like 'get_complexity_report' or 'get_git_churn' by combining both signals and focusing on high-risk intersections.

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?

The description provides clear context for when to use this tool (identifying files with both complexity and churn issues) and implicitly distinguishes it from tools that analyze only one dimension. However, it doesn't explicitly name alternative tools or state when NOT to use it, keeping it at a 4 rather than a 5.

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/nikolai-vysotskyi/trace-mcp'

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