Skip to main content
Glama

who_calls

Find all statically confirmed callers of a symbol with each call site's source location, and list unresolved dynamic call sites separately.

Instructions

查询某个符号的全部调用方(静态可确认),附每个调用点的源码位置;无法静态消歧的动态调用点单独列出

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": {
      "symbol": "<symbol>"
    },
    "name": "who_calls"
  }
}

Input Schema

NameRequiredDescriptionDefault
symbolYes符号名或 文件路径::符号名

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden, and it does disclose a genuinely useful behavioral trait: results are limited to statically confirmable callers, with unresolvable dynamic call sites reported separately rather than silently dropped. It says nothing about permissions, result size, or whether the caller list is exhaustive/truncated, so it is informative but not complete.

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?

One compact sentence with the main capability front-loaded and the static/dynamic split appended as a qualifier. No filler, though the clause structure is slightly dense for non-Chinese readers.

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?

For a one-parameter read tool with no output schema and no annotations, the description covers both the primary result (callers plus source locations) and the edge case (dynamic call sites). Only the absence of any exhaustiveness or size caveat keeps it from being fully complete.

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?

There is a single parameter at 100% schema coverage, and the schema already documents both accepted forms (bare symbol name or file path::symbol). The description adds no disambiguation guidance, such as when the qualified form is required. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb+resource: return all callers of a symbol, plus the source location of each call site. It also carves out a distinct result category (dynamic call sites that cannot be statically resolved are listed separately), which an agent can use to distinguish it from generic search. It stops short of naming the sibling it is not (impact, trace), so it is clear but not sibling-differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: you call this when you need the callers of a known symbol. There is no statement of when to prefer it over impact or trace, no prerequisites, and no exclusions. Adequate but with clear gaps for a tool sitting in a graph-analysis family.

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