Skip to main content
Glama

find_references

Find all occurrences of a specific identifier in a source file to quickly survey locations before renaming or refactoring.

Instructions

Return all occurrences of an identifier named target in a source file, as 'line N: '. Read-only, syntactic only (no scope awareness), so results may include unrelated identifiers that happen to share the same name.

Use this when: You're about to rename or refactor a symbol and need a quick survey of where it appears in the file. Don't use this when: You need cross-file or scope-aware analysis -> use a full language server.

Example: target="LRUCache"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
targetYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations exist, so the description fully shoulders transparency. It states read-only behavior, syntactic-only analysis, and the limitation that results may include unrelated identifiers. This sets accurate expectations.

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?

The description is well-structured with a clear flow: purpose, behavioral note, usage guidance, example. However, the first sentence is slightly verbose. Overall efficient and front-loaded.

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 and no annotations, the description covers essential aspects: input parameters, behavior, output format, and usage context. The output schema existence is noted but not detailed; however, the description provides enough for an agent to use the tool.

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 0%, so the description must add meaning. It clarifies that 'target' is the identifier name to search for, but does not explain 'file_path' format or provide detailed syntax. The example helps somewhat but is insufficient for complete understanding.

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?

The description clearly states the tool returns all occurrences of an identifier in a source file, formatted as 'line N: <source line>'. It distinguishes itself from sibling tools like list_symbols by focusing on references rather than definitions.

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

Usage Guidelines5/5

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

Explicitly describes when to use (renaming/refactoring) and when not to use (cross-file or scope-aware analysis), with a clear alternative (full language server). This helps the agent decide correctly.

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

Install Server

Other Tools

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/kambleakash0/agent-skills'

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