Skip to main content
Glama

code_callers

Read-onlyIdempotent

Find every caller of a method and the calls made inside it to assess impact before changing, renaming, or deleting it.

Instructions

Shows WHO calls a method and WHERE exactly, and what the method itself calls. CRITICAL for impact analysis. Returns caller locations (file, line, calling type and member, receiver) and the calls made inside the method. Use this BEFORE: changing a method signature (prevents breaking callers), modifying behavior, deleting a method, or renaming a method (find all references). Example: before changing GetUser(), verify which services depend on its parameter order. Callers are found by method NAME in the syntax index, then sorted by the declared type of their receiver: calls on an unrelated type are left out and counted (includeUnrelated=true lists them), and '?' marks a call whose receiver type is unknown. All overloads share one result. In TypeScript and JavaScript a local function (a handler or useCallback inside a React component) works too, and the calls inside it are reported under its own name, not its component's. For implementations and overrides of an interface or virtual member use code_types; to find the method's file first use code_search.

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": {
      "workspace": "<workspace>",
      "relativeFilePath": "<relativeFilePath>",
      "methodName": "<methodName>"
    },
    "name": "code_callers"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoOptional: page number, 1-based (default 1). Increment to see more callers.
guideNotrue: put the code guide first in the result. Use on your first code call, or when told it changed.
pageSizeNoOptional: callers per page (default 20, max 200). Use with 'page' when a method has many callers.
classNameNoOptional: class name when the file has several classes with this method; in TypeScript and JavaScript also the function (component, hook) that declares a local function
workspaceYesWorkspace name as shown in Waymark (a single workspace; '*' is not accepted)
methodNameYesMethod or function name to analyze (e.g. 'GetUser', 'ProcessOrder'). A Python class name, or '__init__', finds the calls that create the class.
includeTestsNoOptional: include callers in test folders (default false, production code only; their number is reported)
includeUnrelatedNoOptional: also list calls whose receiver is declared as an unrelated type, marked [on Type] (default false: they are only counted)
relativeFilePathYesPath of the source file (.cs, .py, .ts, .tsx, .js, .jsx and the like) that defines the method or function, relative to the workspace root (e.g. 'Services/UserService.cs')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.6/5.0
Behavior4/5

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

Much richer than the annotations: it discloses that callers are matched by name in the syntax index and then filtered by the declared receiver type, that unrelated calls are excluded and merely counted (unless includeUnrelated), that '?' marks unknown receivers, and that all overloads share one result set. Read-only safety is already covered by annotations, so the description spends its words on resolution semantics instead — only the paging/count behavior on large result sets is left implicit.

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?

Front-loads purpose and impact-analysis warning, then moves through return shape, filtering rules, and alternatives in a logical order. It is dense and every clause carries information, though the middle sentences on receiver-type sorting and the React local-function case run long enough to slow scanning.

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?

With nine parameters and no output schema, the description still specifies what is returned (caller file, line, calling type and member, receiver, plus internal calls) and covers pagination, test exclusion, overload merging, and language-specific edge cases — everything needed to call it correctly.

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%, so the baseline is 3; the description still adds meaning by explaining that className disambiguates a declaring component/hook in TS/JS, that includeUnrelated promotes excluded unrelated-typed calls into the list, and that test-folder callers are counted even when excluded.

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?

Opens with a specific verb and resource plus scope: who calls the method, where exactly, and what the method itself calls. It explicitly differentiates from siblings by naming code_types and code_search for adjacent tasks, so an agent can choose without opening schemas.

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?

Gives concrete when-to-use triggers ('BEFORE: changing a method signature, modifying behavior, deleting, or renaming'), a worked example (GetUser parameter order), and routing rules to code_types for overrides/implementations and code_search to locate the file first.

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