Skip to main content
Glama
damoqiongqiu

mcp-local-rag

by damoqiongqiu

find_definition

Locate the exact file, line, and scope where a symbol is defined in code files using AST-level metadata from local RAG indexing.

Instructions

Find where a symbol (function, class, variable, etc.) is defined in code files. Searches AST-level entity metadata extracted during code chunking. Returns { totalMatches, matches: [{ filePath, chunkIndex, entityName, entityType, lineRange?, scope? }] }. Only works for code files that were ingested with AST-level chunking (CodeChunker).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolNameYesExact symbol name to locate the definition of. Case-sensitive. Example: "handleFindReferences".
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the internal mechanism (AST-level metadata), provides the return format, and states a key limitation (requires CodeChunker). For a read/search operation, this is transparent enough, though it does not explicitly mention error conditions or confirm it is non-mutating.

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 three concise sentences: it front-loads the core action, then adds the mechanism, and finally the return shape and constraint. Every sentence earns its place with no redundancy or filler.

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?

For a simple one-parameter tool with no output schema, the description is complete. It provides the return structure, the search domain, and the prerequisite condition (CodeChunker ingestion). An agent has enough to select and invoke the tool correctly.

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?

The description does not add parameter-specific information beyond the schema. The schema already fully documents symbolName with case-sensitivity and an example. With 100% schema coverage, the baseline score of 3 is appropriate; no additional parameter details are necessary.

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's purpose: 'Find where a symbol (function, class, variable, etc.) is defined in code files.' It specifies the resource (code files) and the search domain (AST-level entity metadata). This distinguishes it from sibling tools like find_references, which would focus on usages 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 Guidelines3/5

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

The usage context is implied: use when you need to locate a definition. It gives an important constraint ('Only works for code files that were ingested with AST-level chunking') but does not explicitly compare to alternatives like find_references or say when not to use this tool. This is adequate but not explicit.

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