Skip to main content
Glama

find_references

Find all occurrences of a specified identifier in a source file to survey its 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?

Discloses read-only, syntactic-only, no scope awareness, and potential for unrelated results. Also describes output format. With no annotations, description fully covers behavioral aspects.

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?

Concise, front-loaded with purpose, then limitations, usage guidelines, and example. Every sentence adds value with no redundancy.

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

Completeness5/5

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

Given the presence of an output schema, the description adequately covers usage context, behavioral nuances, and parameter semantics. It is complete for this simple tool.

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?

Despite 0% schema description coverage, the description explains the 'target' parameter with an example and implies 'file_path' as the source file. However, file_path is not explicitly described, and the example omits it.

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 occurrences of an identifier in a source file as line entries, distinguishes from sibling code manipulation tools, and explains its syntactic-only nature.

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 states when to use (renaming/refactoring a symbol for quick survey) and when not to use (cross-file or scope-aware analysis), with a clear alternative (full language server).

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/ast-editor'

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