Skip to main content
Glama

Find callers of a function

get_callers
Read-onlyIdempotent

List recorded direct callers of a named function, with their service, file and line span. Zero recorded callers is not safe-deletion evidence; callback and value references are unmeasured. Call it before changing or removing a function to see what a signature change would break; pass depth for transitive callers. Rows name the enclosing caller, not the call-site line. For what a function calls rather than who calls it, use list_function_intents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoPath suffix of the file the TARGET is defined in (e.g. `src/auth/session.ts` or `session.ts`). Use it when the name matches definitions in more than one file.
nameNoAlias for `function_name`, spelled the way the returned rows spell it. Pass one or the other.
repoNoYour repo as owner/repo (git remote) or just the repo name. Resolves which Carrick project to query.
depthNoHow many call levels to walk back (default 1, max 3). Above 1, each row carries the chain from that caller to the target.
projectNoCarrick project slug to query. Omit to auto-resolve via `repo`, or omit both when the workspace has one project.
function_nameNoFunction to find callers of. Class members are indexed as `Class.member`; a bare member name matches the part after the dot, and the options are listed back when it is ambiguous. Pass this or its alias `name`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the bar is lower, yet the description adds real caveats: zero results are not proof of safety, callback and value references are unmeasured, and rows name the enclosing caller rather than the call-site line. These limitations materially affect how an agent should interpret output, though pagination/limits are not addressed.

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 tight sentences, front-loaded with the core action and return shape, then caveats, then the routing pointer. No filler; each clause carries distinct information.

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 no output schema, the description compensates by describing row composition (caller, service, file, line span, and chained rows at depth>1). Combined with the caveats and sibling pointer, an agent has enough to select and call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema descriptions are thorough (aliases, project resolution, ambiguity handling), so the schema does the heavy lifting. The description only restates that `depth` yields transitive callers, adding relational context but little beyond the schema's own 'how many call levels to walk back' note.

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?

States a specific verb and resource ('List recorded direct callers of a named function') plus the returned fields (service, file, line span). It explicitly routes to the sibling `list_function_intents` for the inverse question, so an agent can distinguish it without opening a schema.

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 ('Call it before changing or removing a function to see what a signature change would break'), an explicit when-not (zero callers is not safe-deletion evidence), and names the alternative sibling for the opposite direction.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.