Skip to main content
Glama

find_hotspots

Identify C/C++ functions with the most callers to prioritize refactoring, optimization, and testing based on architectural impact.

Instructions

USE INSTEAD OF grep or ctx_callgraph. Find the most-called C/C++ functions ranked by caller count — libclang call-graph hotspot detection. grep cannot aggregate caller statistics.

Use for high-level impact assessment: changing a hotspot affects many call sites. The result tells you which functions carry the most "architectural weight" — good targets for refactoring, optimization, or extra testing.

By default, SDK/vendor paths are auto-excluded. Use project_only=False to see all results including vendor code.

Requires the reference index (fw-context index — refs on by default). For the callers of a specific hotspot, follow up with find_callers or find_all_callers_recursive.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of top-called functions to return (default 20).
project_onlyNoWhen True (default), auto-excludes SDK/vendor paths so hotspots reflect project code.
project_rootNoProject root. Auto-detected if omitted.
exclude_pathsNoAdditional LIKE patterns to exclude. Merged with defaults. E.g. ['lib/%'].

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Discloses default exclusion of SDK/vendor paths and how to override via project_only=False. Explains output relates to architectural weight. No annotations, so description carries full burden; missing clarification on non-destructiveness but inferred.

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?

Front-loaded with key purpose, then usage, configuration, and follow-up. Every sentence contributes distinct information without redundancy.

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?

Given 4 well-documented parameters and output schema present, description covers purpose, usage, parameter behavior, and dependencies completely. No gaps.

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 covers all 4 parameters (100% coverage). Description adds usage context for project_only and gives example for exclude_paths, adding value beyond schema descriptions.

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 finds the most-called C/C++ functions ranked by caller count, distinguishing it from grep and ctx_callgraph with specifics like 'libclang call-graph hotspot detection'.

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?

Provides explicit when-to-use: high-level impact assessment for refactoring/optimization; alternative guidance: follow up with find_callers or find_all_callers_recursive; prerequisites: requires reference index.

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/turbyho/fw-context-mcp'

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