Skip to main content
Glama

find_references

Locate all occurrences of a specific identifier within a source file to survey where it appears before renaming or refactoring. Provides line numbers and source lines for quick reference analysis.

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
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behavioral traits: it's 'Read-only' (safety profile), 'syntactic only (no scope awareness)' (analysis limitations), and that 'results may include unrelated identifiers that happen to share the same name' (accuracy constraints). The example further clarifies expected output format.

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 description is efficiently structured with clear sections: purpose statement, behavioral constraints, usage guidelines, and an example. Every sentence earns its place by adding distinct value - no repetition or filler. The information is front-loaded with the core functionality stated first.

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 tool's moderate complexity (2 parameters, read-only analysis), no annotations, but with an output schema present, the description provides excellent contextual completeness. It covers purpose, behavioral limitations, usage context, and includes an example. The output schema will handle return value documentation, so the description appropriately focuses on operational context.

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?

With 0% schema description coverage, the description must compensate for the lack of parameter documentation. While it doesn't explicitly name the parameters, it provides semantic context: 'target' is the identifier name being searched for, and the example shows target='LRUCache'. The file_path parameter is implied by 'in a source file' context. This adds meaningful value beyond the bare schema.

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 specific action ('Return all occurrences of an identifier'), resource ('in a source file'), and output format ('as line N: <source line>'). It explicitly distinguishes this tool from its siblings by emphasizing it's 'syntactic only (no scope awareness)' and for single-file analysis, unlike other tools that modify code or analyze different aspects.

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?

The description provides explicit guidance with 'Use this when:' and 'Don't use this when:' sections, clearly stating the appropriate context (quick survey for renaming/refactoring) and naming an alternative ('use a full language server') for cross-file or scope-aware analysis. This directly addresses when to choose this tool over alternatives.

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