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, and the call-site line when the scan recorded one. For what a function calls rather than who calls it, use list_function_intents.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input 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. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), but the description adds a caveat none of them carry: zero results are not safe-deletion evidence because callback and value references are unmeasured. It also discloses the row shape, including that the call-site line is only present 'when the scan recorded one' — a real completeness limit an agent must account for.

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, no preamble, front-loaded with what it returns, then the safety caveat, then the usage trigger, then the sibling redirect. The caveat is placed before the call-to-action, which is the right ordering for a tool whose false-negative risk matters.

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 six optional parameters, no output schema, and no enums, the description nonetheless covers purpose, scope limits, the epistemic caveat, row shape, and the alternative tool. Nothing an agent needs to call it correctly or interpret its result is missing.

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 description coverage is 100%, so the parameters are already fully documented, and the description largely restates them ('pass depth for transitive callers' mirrors the depth property text). The row-format sentence is return-value context rather than parameter semantics, so it adds little on this dimension beyond the baseline.

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 opening sentence names a specific verb and resource ('List recorded direct callers of a named function') and scopes the payload ('with their service, file and line span'). It then explicitly separates itself from the inverse-direction sibling by naming list_function_intents, so an agent can route between the two 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?

It gives a concrete trigger ('Call it before changing or removing a function to see what a signature change would break'), states how to widen scope ('pass depth for transitive callers'), and names the alternative for the opposite question ('For what a function calls rather than who calls it, use list_function_intents'). Both the when and the when-otherwise are covered.

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.