Skip to main content
Glama

get_related_symbols

Find symbols commonly used together with a given symbol to understand code context and common usage patterns around it.

Instructions

Find symbols that are often used together with the given symbol.

Useful for understanding the context and common patterns around a symbol.

Args:
    symbol: The symbol to find related symbols for
    directory: Path to the codebase directory

Returns:
    List of related symbols with relationship types

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>",
      "directory": "<directory>"
    },
    "name": "get_related_symbols"
  }
}

Input Schema

NameRequiredDescriptionDefault
symbolYes
directoryYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full disclosure burden. It never states that this is a read-only lookup, whether the target directory must first be indexed (relevant given siblings like index_directory and sync_index), what "often used together" means (same file, same call, co-change?), or the possible relationship types.

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 purpose sentence followed by a short usage sentence and conventional Args/Returns sections; every line is short and scannable. The middle sentence is close to redundant with the opening line but not wasteful enough to penalize further.

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

Completeness2/5

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

The presence of an output schema excuses the description from detailing return values, but for a two-required-parameter tool in an indexing-heavy toolset, the missing prerequisites (must the directory be indexed?), symbol identifier format, and the nature of "relationship types" leave real gaps an agent cannot fill elsewhere.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for both parameters. "The symbol to find related symbols for" is circular and does not say whether a bare name, qualified name, or ID is expected, and "Path to the codebase directory" adds only the word "path" over the schema's bare "Directory" title.

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?

"Find symbols that are often used together with the given symbol" states a specific verb (find) and a specific resource (co-occurring symbols), which is distinguishable from get_symbol_definition or find_references. It stops short of naming any sibling, so the distinction is inferable rather than explicit.

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?

"Useful for understanding the context and common patterns around a symbol" implies a discovery/exploration use case, but gives no when-not guidance and no pointer to alternatives such as find_references or get_call_graph, which an agent could easily confuse with this tool.

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