Skip to main content
Glama
ribhav-jain

docsonar

by ribhav-jain

search

Find relevant passages in indexed local documents using hybrid, keyword, or semantic search, with optional folder and file type filters.

Instructions

Search all indexed documents and return the most relevant passages.

Use this first whenever the user asks about the content of their local documents. query is free text; full questions work well in hybrid/ semantic mode, plain keywords in keyword mode. top_k (1-50) caps results. folder restricts to one registered folder (pass its path as shown by list_folders); file_type restricts by extension (e.g. "md"). mode: "hybrid" (default — keyword + semantic fused with reciprocal- rank fusion, best for most queries), "keyword" (exact-term BM25, best for identifiers or rare exact words), or "semantic" (meaning-based, best when wording differs from the documents).

Returns {ok, results: [{chunk_id, path, file_type, location, score, snippet}, ...], mode_used, note}. location is a heading path like "Setup > Windows" (or a page for PDFs), usable for citations. score is normalized 0-1 within this result set. A non-null note means the requested mode degraded (e.g. embeddings unavailable) and explains why. Snippets highlight keyword matches with bold; read_file on a result's path gets the full context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNohybrid
queryYes
top_kNo
folderNo
file_typeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description fully carries the transparency burden. It discloses the return format, score normalization (0-1), mode degradation via the `note` field, snippet highlighting with **bold**, and references `read_file` for full context. This gives the agent a clear model of what to expect and how to act.

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?

The description is front-loaded with the core purpose, then organized into logical sections: usage guidance, parameter explanations, and return value details. Every sentence carries meaningful information, with no redundancy or filler.

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?

This is a complex tool with 5 parameters, no annotations, and no schema descriptions. The description covers all parameters, explains return structure and edge cases (degradation note), and provides a next-step pointer (read_file). It is fully self-contained for correct invocation.

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?

Schema coverage is 0%, so the description compensates completely. It explains `query` behavior in each mode, `top_k` range (1-50), `folder` source (path from list_folders), `file_type` extension, and `mode` with three values and defaults. No parameter is left unclear.

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 opens with a specific verb+resource phrase: 'Search all indexed documents and return the most relevant passages.' It also includes scope ('all indexed documents') and a usage cue ('Use this first whenever the user asks about the content of their local documents') that distinguishes it from sibling tools like find_similar.

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?

It explicitly states when to use this tool ('Use this first whenever the user asks about the content of their local documents') and provides detailed mode selection guidance: 'best for most queries', 'best for identifiers or rare exact words', and 'best when wording differs'. This is clear and actionable.

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/ribhav-jain/docsonar'

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