Skip to main content
Glama

who_calls

Find every caller of a function in a repository by combining AST-based call graph analysis with fallback regex for dynamic dispatch patterns.

Instructions

Return every caller of a function across the indexed repo.

First searches the call graph (AST-indexed edges). If empty, falls back to string-literal grep for dynamic dispatch patterns (APScheduler add_job, Django signals, Flask routes, Celery tasks, etc.). Dynamic hits are labelled with found_via=dynamic_dispatch_fallback. Do NOT call if you already know the callers. Expensive on large graphs.

repo_path: optional absolute path to the target repository.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
function_nameYes
repo_pathNo
Behavior5/5

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

With no annotations, the description fully discloses behavior: two-step search (AST graph then string-literal grep), dynamic dispatch pattern detection, labeling of fallback results, and cost warning. This covers all key behavioral traits an agent needs.

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?

Four sentences, each adding distinct value: purpose, method, fallback details with labeling, and usage warning. No redundancy, front-loaded with the core action.

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?

The description covers behavior well but omits details on the output format (e.g., list of call sites with locations). Given no output schema, a brief note on what the result contains would improve completeness. Still, for the complexity, it is largely sufficient.

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 0%, but the description adds meaning for both parameters: function_name is implied as required, and repo_path is described as 'optional absolute path to the target repository.' It doesn't specify format or constraints, but provides enough context to use correctly.

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 explicitly states 'Return every caller of a function across the indexed repo,' providing a specific verb and resource. It clearly distinguishes from sibling tools like cross_repo_search or semantic_search_code by focusing on caller discovery.

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?

The description includes when to use (needing callers), when not to use ('Do NOT call if you already know the callers'), and notes that it is 'Expensive on large graphs,' guiding cost-aware usage. It also explains the fallback strategy, implicitly advising against calling when simpler alternatives exist.

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/ashlesh-t/cognirepo'

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