Skip to main content
Glama

get_symbol_relations

Retrieves AST-level symbol relations—usages, callers, callees, implementors, subclasses, and bases—to trace code dependencies and navigate a project’s symbol graph.

Instructions

Returns AST-level relations of a symbol from the symbol graph.

Args:
    symbol: Function/class/method name (bare, e.g. "UserService").
    relation: One of "usages" (default), "callers", "callees",
        "implementors", "subclasses", "bases", "info".

Returns:
    Related symbols with file:line, or full info for relation="info".

Input Schema

NameRequiredDescriptionDefault
symbolYes
relationNousages

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It does disclose the return shape (related symbols with file:line, or full info), which is useful, but says nothing about whether the codebase must be indexed, what happens for an unknown or ambiguous symbol, or whether results are bounded.

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?

The one-line summary is front-loaded, followed by a compact Args/Returns block with zero filler. Every sentence adds information an agent needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no annotations and an output schema already covering returns, the description covers the essentials (param format, relation values) but omits prerequisites such as index state and symbol disambiguation. For a graph-query tool this leaves meaningful gaps.

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 it largely does: it lists every accepted relation value with the default and specifies the bare-name format for symbol ("UserService"). The one gap is that the distinction between "usages" and "callers" is not explained, which matters for picking the right value.

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?

States a specific verb and resource: returns AST-level relations of a symbol from the symbol graph, which is clearly different from file-level or search tools. It does not explicitly contrast with close siblings like find_symbol or get_file_relations, leaving the agent to infer the boundary.

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?

The enumerated relation values imply the use cases (impact analysis, hierarchy exploration), but there is no explicit when-to-use or when-not-to-use guidance relative to find_symbol, get_file_relations, or analyze_change_impact. The agent must infer which tool to reach for.

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