Skip to main content
Glama
samishekhalard

rag-mcp

rag_search

Retrieve ranked passages from indexed documents to read and quote as source material. Returns document id, ordinal, relevance score and chunk_id for follow-up reading.

Instructions

Search the indexed documents and return the most relevant passages.

Retrieval only: no text is generated, so this is the cheap and fast call. Prefer it when you want source material to read and quote yourself. Returns each passage with its document id, ordinal, relevance score and chunk_id; pass a chunk_id to rag_get_document to read around it. Use rag_answer instead only if you want the service to compose the answer.

Input Schema

NameRequiredDescriptionDefault
questionYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does most of it: it declares the operation is non-generative, cheap and fast, and describes the shape of each returned passage plus the handoff to rag_get_document. It stops short of saying how many passages come back or whether there is any limit/pagination, which matters for a search call.

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?

Front-loaded with the core action, then three short lines covering cost, selection criteria, and return/follow-up. Every sentence earns its place with no repetition.

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?

Output schema exists so return values need no explanation, yet the description still summarizes what comes back and how to continue. Combined with the explicit routing to rag_answer and rag_get_document, an agent has everything needed to call this 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?

Schema coverage is 0%, so the single required 'question' parameter is undocumented by structured data. The description implies it drives relevance search but never says whether it should be a natural-language question, a keyword string, or a phrase, so the agent must guess at the expected form.

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?

States a specific verb and resource ('Search the indexed documents and return the most relevant passages') and immediately scopes itself as retrieval-only, which cleanly separates it from the sibling rag_answer. An agent can pick between the two without opening either schema.

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?

Gives an explicit positive condition ('Prefer it when you want source material to read and quote yourself') and an explicit alternative with the condition that selects it ('Use rag_answer instead only if you want the service to compose the answer'). It also names the follow-up tool rag_get_document and the chunk_id needed to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.