Skip to main content
Glama
reflex-search

Reflex

Official

find_hotspots

Rank files by how many other files import them to identify dependency hotspots and critical refactoring targets.

Instructions

Rank files by how many other files import them (dependency hotspots). Prefer this over any grep-based "most-imported file" heuristic — Reflex answers from its pre-built dependency index in one call; grep cannot answer this without scanning every file.

Use this for: finding critical-path files; identifying refactoring blast radius; ranking modules by coupling; architecture review. Returns {pagination, results: [{path, import_count}]} sorted by import count (desc by default; use sort to change). Default page size 200; if pagination.has_more is true, fetch the next page with offset. Only static imports are counted. On "Index not found" / "stale" error, call index_project, then retry.

Example: {"results": [{"path": "src/models.rs", "import_count": 27}]}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sortNoSort order: 'asc' (least imports first) or 'desc' (most imports first, default)
limitNoMaximum number of hotspots per page (default: 200)
offsetNoPagination offset (skip first N results). Use with limit for pagination.
min_dependentsNoMinimum number of dependents to include (default: 2)
Behavior5/5

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

Even without annotations, description covers key behaviors: only static imports counted, pagination (has_more, offset), sorting, default page size, error conditions, and return format.

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?

Dense yet efficient: purpose first, then usage guidelines, behavior details, error handling, and an example. Every sentence adds value, no fluff.

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?

Comprehensive for a tool with no output schema: describes return structure (pagination, path, import_count), error handling, pagination mechanics, and includes an example. All 4 optional parameters are explained in schema and context is provided in description.

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 coverage is 100%, baseline 3. Description adds value by explaining sort default (desc), pagination with offset, and default page size (200). min_dependents parameter is fully described in schema but not elaborated in text; still, overall parameter guidance is strong.

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?

Clearly states it ranks files by import count (dependency hotspots) and distinguishes from grep-based heuristics. Lists specific use cases like finding critical-path files and refactoring blast radius.

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?

Explicitly says to prefer this tool over grep-based alternatives. Provides when-to-use scenarios and error recovery: on 'Index not found' or 'stale' error, call index_project then retry.

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/reflex-search/reflex'

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