Skip to main content
Glama

find_hotspots

Read-onlyIdempotent

Rank functions by hotspot kind to reveal complexity, Java allocation, or Java performance risks. Use it to target refactoring where code is most costly or tangled.

Instructions

Rank functions by hotspot kind. complexity (all langs) | allocation (Java) | performance (Java).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNoHotspot category (default 'complexity').
projectNoProject name/path (default: active).
min_scoreNoMinimum score to include (default: 0 for complexity, 1 for Java kinds).
max_resultsNoMaximum number of functions to report (default: 20).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.0.0

TDQS

B3.3/5.0
Behavior2/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, covering the safety profile. The description adds nothing behavioral on top of that: no indication of sort order, scoring basis, or scope of analysis. The one extra fact (language applicability per kind) is a validity constraint rather than behavior, so it is credited under parameter semantics.

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?

Extremely compact and front-loaded — the core action leads and the kind/language mapping follows. The pipe-delimited fragment is slightly cryptic and borders on under-specification rather than conciseness, which keeps it off a 5.

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

Completeness3/5

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

With 100% schema coverage, annotations, and no required parameters, the agent can invoke this correctly. Still missing for a ranking tool are the ordering of results (descending score?) and the analysis scope, which the description never addresses and the schema does not cover.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3, and the description genuinely adds meaning the schema lacks: it tells the agent that 'allocation' and 'performance' only apply to Java while 'complexity' spans all languages. That is a non-obvious constraint that prevents selecting an invalid kind for a non-Java project.

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 (rank) and resource (functions) plus the hotspot categories that define the operation, so an agent knows this produces a ranked hotspot list. It is clearly distinct from siblings like get_functions or find_dead_code, though 'hotspot' itself is never defined beyond the enum values.

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 parenthetical language tags ('complexity (all langs)', 'allocation (Java)', 'performance (Java)') imply which kind to choose for a given codebase, which is real guidance. However there is no explicit when-to-use versus alternatives, no prerequisites, and no statement of when NOT to call it.

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