Skip to main content
Glama

get_symbol_refs

Read-onlyIdempotent

Finds every cross-file reference to a symbol, returning file, line, and code snippet while excluding its own definition. Use it to assess impact before refactoring or renaming.

Instructions

RELATIONSHIPS between symbols: who uses/calls/references a given symbol across the whole project (cross-file). Returns every usage point with file, exact line and the code snippet of that line - like IDE 'find references'. Use when refactoring, renaming, or understanding impact: 'who calls foo?', 'where is X used?'. Self-definitions are excluded.

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": {
      "path": "<path>",
      "simbolo": "<simbolo>"
    },
    "name": "get_symbol_refs"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesFile path where the symbol is defined (as ingested)
limitNo
simboloYesSymbol name to find references for

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description adds real behavior: results are cross-file, each usage point includes file, exact line and the code snippet, and self-definitions are filtered out. It says nothing about result volume, truncation, or ordering.

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-loads the core purpose, then return shape, then usage triggers. Dense but nearly every clause carries information; the colon-heavy phrasing is slightly choppy but not wasteful.

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?

No output schema exists, and the description compensates by describing the return entries (file, line, snippet). Minor gaps remain around result limits and the meaning of the path parameter, but nothing that would cause a wrong invocation.

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 67%, so the schema documents path and simbolo adequately. The description adds indirect meaning to path via 'self-definitions are excluded' (the path is used to exclude the defining site), but never explains limit's default/pagination role or whether paths must match ingested paths.

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+resource: it returns 'who uses/calls/references a given symbol across the whole project (cross-file)'. The analogy 'like IDE find references' and the note that 'self-definitions are excluded' separate it from get_symbol, which presumably returns the definition itself.

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

Usage Guidelines4/5

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

Gives concrete triggers: refactoring, renaming, impact analysis, with example queries ('who calls foo?', 'where is X used?'). It does not explicitly name an alternative tool for the definition lookup case, though the exclusion of self-definitions implicitly routes that need elsewhere.

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