Skip to main content
Glama

rag_search

Search a local knowledge base with hybrid dense and keyword retrieval to find relevant document chunks. Returns ranked results with source paths and scores, enabling answers grounded in your documents.

Instructions

Search the local knowledge base using hybrid retrieval (dense MiniLM embeddings + BM25 keyword matching, fused via Reciprocal Rank Fusion). Returns up to top_k ranked chunks with source file paths, chunk indices, and relevance scores. Read-only: never modifies the index. If results are empty, call rag_index first to populate the knowledge base. Prefer this over rag_status when answering a user's question about their documents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe natural-language question or keywords to search for.
top_kNoMax results to return (default 5, max 25)
Behavior4/5

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

No annotations are provided, so the description carries full behavioral burden. It clearly discloses the read-only nature ('never modifies the index') and the output structure (chunks, source paths, indices, scores). It also notes the empty‑result behavior and suggests a follow‑up action. It omits potential error conditions or performance nuances, but the disclosure is substantial for a search tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized—four sentences, each contributing distinct information: mechanism, output, read‑only guarantee, and usage routing. It is front-loaded with the core purpose and avoids 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?

With no output schema, the description supplies essential return information (file paths, chunk indices, scores) and explains the retrieval approach. It also addresses the empty‑index scenario and distinguishes from sibling tools. Minor gaps (e.g., exact result JSON structure, authentication) are not critical for a tool of this simplicity.

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 100% for both parameters. The description reiterates the role of top_k ('up to top_k ranked chunks') but does not add syntax, formats, or constraints beyond the schema's own descriptions ('default 5, max 25'). The hybrid retrieval detail is tool-level, not parameter-specific. Minimal added value per baseline.

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 action ('Search the local knowledge base'), the retrieval method (hybrid), and the output (ranked chunks with file paths, indices, scores). It explicitly contrasts with sibling tools by noting 'Prefer this over rag_status when answering a user's question about their documents', making the tool's role unmistakable.

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?

Provides explicit guidance: when to use (answering a user's question about documents), when not to (prefer rag_status for other purposes), and a conditional fallback ('If results are empty, call rag_index first to populate the knowledge base'). This fully equips the agent to choose and sequence the tool correctly.

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/Ayush-yadav11/quillrag'

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