Skip to main content
Glama
saivarun161

mcp-docqa-server

by saivarun161

search_documents

Find relevant passages from indexed documents using hybrid, semantic, or keyword search. Returns text chunks with source metadata and relevance scores.

Instructions

Search the indexed document corpus.

Returns the k best-matching text chunks, each with its source metadata: doc_id, chunk_index, title, url, the chunk text, and a relevance score (higher is better; scores are comparable within one response, not across modes). Results may include multiple chunks from the same document. Use fetch_document with a result's doc_id to read the full source document.

Args: query: A natural-language question or search phrase. k: How many chunks to return (default 5, max 25). mode: 'hybrid' (default) fuses semantic and keyword search — best for most questions. 'vector' is semantic-only — best for paraphrased or conceptual questions. 'lexical' is keyword-only — best when the exact term must appear (identifiers, drug names, error codes).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNo
modeNohybrid
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Describes return structure, relevance score comparability (within one response), and multiple chunk possibility. No annotations provided, so description carries full burden; it fully discloses behavior.

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?

Starts with purpose, then return details, then parameter explanations. Every sentence is informative with no fluff.

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 search complexity, output schema existence, and sibling tools, description is complete. Explains result format, score limitation, and mode options.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Adds rich explanation for all three parameters: query is natural language, k has default and max, mode explains three options with use cases. Schema coverage is 0%, so description compensates completely.

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?

Clearly states 'search the indexed document corpus' and returns best-matching chunks with metadata. Distinguishes from siblings fetch_document (full document retrieval) and corpus_stats/ping.

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?

Provides context for using modes (hybrid, vector, lexical) with specific guidance on when each is best. Lacks explicit 'when not to use' but covers alternatives like fetch_document for full docs.

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/saivarun161/mcp-docqa-server'

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