Skip to main content
Glama

callers

Find every call site of a JavaScript or TypeScript function, listing each calling function and line numbers. Excludes imports and type-only usages for direct caller results.

Instructions

Who calls this function? Example: callers(name="renderSidebar").

Narrower than references, since it leaves out imports and type-only usages and only lists actual call sites, each with the calling function and its call-site lines. name resolves the same way as symbol_info (dotted Class.method accepted, inherited members included; pass file_path to disambiguate a common name). query is accepted as an alias for name. JS/TS only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
queryNo
file_pathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the return content (calling function plus call-site lines), the symbol-resolution rules, and the JS/TS-only limitation. It does not cover failure modes (e.g. unresolved names) or whether results are paginated, but for a read-only query tool the disclosure is strong.

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-loaded with the core question and an example before any elaboration, and every subsequent sentence adds a distinct fact (scope vs references, resolution rules, alias, language limit). It is dense but not padded, though the mid-paragraph resolution detail is slightly heavy for a first read.

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?

With no annotations and no output schema, the description supplies the return shape, the scoping semantics, the alias, and the language constraint, which is enough to call it correctly. Minor gaps remain around result limits and behavior when a symbol cannot be resolved.

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%, so the description must compensate and largely does: it explains that `name` accepts dotted `Class.method` with inherited members, that `file_path` disambiguates a common name, and that `query` is an alias for `name`. Only the exact error/empty behavior of an unresolved `name` is left unexplained.

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 description opens with a direct question-and-verb statement ('Who calls this function?') plus a concrete invocation example, and explicitly distinguishes itself from the sibling `references` tool by scope. An agent can tell instantly what resource it operates on and how it differs from the nearest alternative.

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 names the alternative (`references`) and the exact condition that separates them: callers omits imports and type-only usages and lists only actual call sites. It also states the language restriction ('JS/TS only'), which is a hard when-not-to-use boundary.

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