Skip to main content
Glama
damoqiongqiu

mcp-local-rag

by damoqiongqiu

find_references

Find all references to a symbol across ingested code files. Combines import metadata scans and full-text search to return file paths, context snippets, and reference types, deduplicated by location.

Instructions

Find all references to a symbol across ingested code files using a two-phase strategy: (1) import metadata scan for exact import name matches, (2) FTS text search for in-code mentions. Results merge with import references first, deduplicated by (filePath, chunkIndex). Returns { totalMatches, matches: [{ filePath, chunkIndex, referenceType, context?, importSource?, isDefault?, isNamespace? }] }. Only works for code files ingested with AST-level chunking.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of matches (default 10, range 1-50).
symbolNameYesSymbol name to search for. Exact match in imports; substring match in text mentions (FTS). Example: "useEffect".
Behavior5/5

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

With no annotations provided, the description carries the full burden and excels: it details the two-phase search strategy, merge order, deduplication key, output structure, and a prerequisite condition. This goes beyond a typical description and provides rich behavioral detail.

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 concise, with four sentences that are all informative. It front-loads the main action, then provides algorithm, return shape, and constraints without redundancy.

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?

The description covers the return structure (mitigating no output schema), explains the algorithm, and states a prerequisite. It could optionally mention possible referenceType values or error behavior, but these are not essential for usage.

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?

Both parameters (symbolName, limit) are fully described in the input schema, including semantics ('exact match in imports; substring match in text mentions') and limits (default 10, range 1-50). The description adds no new parameter semantics beyond the schema, so it does not exceed the schema's coverage.

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 'Find all references to a symbol across ingested code files', which is a specific verb+resource+scope. It distinguishes from sibling find_definition by using 'references' rather than 'definition'.

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?

The description gives a clear usage context ('across ingested code files') and a prerequisite (AST-level chunking), but it does not explicitly mention alternatives or when not to use it. Usage is implied by the purpose rather than explicitly compared to sibling tools like find_definition.

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/damoqiongqiu/mcp-local-rag'

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