Skip to main content
Glama
code-lawyer

rag-retriever-mcp

by code-lawyer

search

Retrieve top relevant passages from indexed documents for a query, returning source paths and similarity scores to ground AI answers.

Instructions

Search the indexed documents for passages relevant to query and return the top k chunks (with source path and similarity score). Use these passages as grounding to answer the user's question yourself — this tool does NOT answer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNo
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations provided, but the description fully compensates by disclosing that results are chunks with scores and that the tool itself does not answer. No contradictions present.

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?

Two sentences: first for function and output, second for usage advice. No redundancy, front-loaded with essential information.

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 simplicity (2 params, no annotations), the description covers purpose, output, and usage pattern thoroughly. No missing critical details.

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?

Schema coverage is 0%, but the description explains both parameters: 'query' as the search term and 'k' as the top number of chunks with a default of 5. Could add constraints like allowed range for k, but sufficient.

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 verb 'Search' and the resource 'indexed documents', listing the returned fields (source path, similarity score). It distinguishes from sibling tools like index_path and list_sources by focusing on retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

The description explicitly instructs to use the passages as grounding and warns that the tool does not answer, guiding the agent on proper usage. However, it lacks contrasting with alternatives for when not to use.

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/code-lawyer/rag-retriever'

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