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.

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.6/5.0
Behavior5/5

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

Annotations cover safety and idempotency, so the description adds the non-obvious behavioral truths: zero callers is not deletion evidence because callback and value references are unmeasured, and rows name the enclosing caller rather than the call-site line. These are exactly the caveats an agent would otherwise misinterpret.

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?

Four dense sentences, front-loaded with the core action and followed by the caveats and the alternative. Nearly every sentence earns its place, though the depth and return-shape mentions overlap slightly with the schema.

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 supplies the return shape (caller with service, file, line span) plus the critical interpretation limits. An agent has enough to call it and to read the result 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%, so every parameter including depth and the name/function_name alias is already documented there. The description restates depth's transitive use and the alias choice without adding format or resolution detail beyond the schema, so the baseline 3 applies.

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 — listing recorded direct callers of a named function — and immediately qualifies what the rows contain (service, file, line span). It also explicitly distinguishes itself from the inverse tool, list_function_intents.

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 an explicit trigger ('call it before changing or removing a function'), a parameter-led variant ('pass depth for transitive callers'), and a named alternative for the opposite direction. The exclusion for zero-callers-as-deletion-evidence is spelled out rather than implied.

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.