Skip to main content
Glama

RAG Retrieve

rag_retrieve
Read-onlyIdempotent

Retrieve relevant code snippets for a question using local BM25 ranking, returning full code windows with line numbers for grounded answers. Works entirely on your machine.

Instructions

Retrieve the most relevant code chunks for a question using local BM25 ranking. No embeddings, no API calls, no data leaves the machine. Returns full code windows with line numbers so answers are grounded in real code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the repository root
topKNo
queryYesWhat you want to find — natural language or symbol names
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive). The description adds meaningful behavioral detail: the retrieval mechanism (local BM25), the guarantee of no API calls or data egress, and the return format (full code windows with line numbers). These go beyond the annotations and help an agent understand what happens without attempting a call. No contradiction.

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?

Three concise sentences with zero filler. The first sentence states purpose and method, the second clarifies constraints (local, no API), and the third explains output value. Everything earns its place, and the key scoping information is 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?

For a retrieval tool with no output schema and simple parameters, the description is complete enough: it tells the agent what it returns (code windows with line numbers) and the key constraint (local only). It doesn't mention error behavior or edge cases, but given the simplicity and the annotations, nothing critical is missing.

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 description coverage is 67% (path and query described, topK undocumented). The description does not explain any parameters further; it only refers to 'code chunks' generally. The schema already provides constraints for topK (default 8, min 1, max 20), and path/query are well-described, so the description adds no extra semantic value for parameters.

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 states a specific verb (retrieve) and resource (most relevant code chunks for a question), and immediately contrasts itself with API/embedding-based approaches. It also specifies the output (full code windows with line numbers), making it distinct from generic search tools. While it doesn't name a sibling explicitly, the 'no API calls' and 'local BM25' clearly differentiate from any cloud retrieval alternative.

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 implies when to use it (when you need local, private retrieval) by highlighting no data leaves the machine, but it does not explicitly state when to prefer this over other tools like `search` or `ground_finding`. There is no mention of alternatives or exclusion conditions, so guidance is only implicit.

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/CerisonAutomation/argus-mcp'

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