Skip to main content
Glama

who_calls

Find every call site of a function or method across a project and return the calling function and line number; matches by name, so same-named methods are listed together.

Instructions

Every call site of a function/method across the project, with the calling function and the line. Matched by name, so same-named methods on different classes are listed together.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>"
    },
    "name": "who_calls"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose a genuinely important trait — lookup is by bare name, so same-named methods on different classes are merged — and it describes what each result contains, but it omits whether the call is read-only, how large projects are paginated or truncated, and whether qualified names are rejected.

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?

Two sentences, both front-loaded with the most decision-relevant information — first what is returned, then the caveat about name matching. Nothing is redundant or padded.

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?

Low-complexity tool with an output schema, so return structure need not be spelled out. The definition covers purpose, match semantics, and result contents; the remaining gap is operational behavior (result limits, pagination) for a project-wide traversal, which is minor but not nothing.

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% (the single 'name' property has no description), so the description must compensate, and it does: it clarifies that the argument is matched by name rather than by qualified signature and that same-named methods across classes collapse together. That is meaningful semantics beyond the schema's bare string type.

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?

The description states a specific operation and resource: all call sites of a function/method across the project, plus the calling function and line number. That is precise enough for an agent to tell it apart from symbol-lookup or outline tools, though it never names an alternative sibling explicitly.

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?

Usage is implied rather than stated: an agent can infer this is the tool for 'who references this function' before a refactor. There is no explicit when-to-use, when-not-to-use, or 'use X instead for qualified names' guidance, which matters given the sibling set includes get_symbol and outline.

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