Skip to main content
Glama
thousandmiles

Semantic Code MCP Server

get_references

Find all usages of a symbol in code by providing its file path and position. Returns a list of locations where the symbol is referenced, making it simple to trace dependencies and impact.

Instructions

Find all references to a symbol. Returns a list of locations where the symbol is used. Tip: Use 'search_in_file' to find the exact line and character of the symbol definition or usage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lineYesThe 0-based line number of the symbol
filePathYesThe absolute path to the file containing the symbol definition or usage
characterYesThe 0-based character offset of the symbol

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations present, the description carries the behavioral disclosure burden. It clearly states that the tool returns a list of locations where the symbol is used, which is the essential behavioral and output information for a read-only reference lookup. It does not detail error or empty-result behavior, but for a simple read operation this is reasonable.

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?

Two concise sentences plus a focused tip. Every sentence earns its place: the purpose, the return behavior, and the practical prerequisite for obtaining parameters.

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?

Given the tool's simplicity, no output schema, and 100% parameter schema coverage, the description conveys purpose, return shape, and parameter-obtaining guidance. It is adequate for an agent to select and invoke the tool correctly, though it could briefly mention behavior when no references exist.

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 100%, so the baseline is 3. The description adds meaning by advising search_in_file to find the exact line and character, which directly helps the agent populate the required parameters correctly and reinforces the intended workflow.

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 clearly states the tool's function: finding references to a symbol and returning usage locations. It is distinguishable from siblings by the focus on references rather than definitions, though it does not explicitly name a sibling for comparison.

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?

The description provides practical usage context, telling the agent to use search_in_file to obtain the exact line and character inputs. It does not explicitly contrast with get_definition or check_function_call, but the reference-finding purpose is clear enough to imply the appropriate scenario.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/thousandmiles/lsp-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server