Skip to main content
Glama
xiuxiansk

mcp-local-rag

by xiuxiansk

query_documents

Search ingested documents using hybrid keyword and semantic matching. Returns ranked results with file path, snippet, and relevance score.

Instructions

Search ingested documents with hybrid keyword + semantic matching. Returns results sorted by relevance, each with filePath, chunkIndex, text, fileTitle, score (0 = best, higher = worse), and source (for ingest_data items).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax results (default 10, range 1-20). Lower favors precision, higher recall.
queryYesSearch query. Preserve specific user terms (for keyword match); add context when the query is vague (for semantic match).
scopeNoOptional absolute path prefix(es) — one string or a list (unioned) — restricting results to a filePath equal to or under a prefix. "/docs/api" matches "/docs/api/auth.md" but not "/docs/apiv2". Must be absolute (server OS style); a relative prefix matches nothing — derive one from a filePath returned by an earlier query, or omit scope.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds value by explaining the score semantics (0 = best, higher = worse) and the special 'source' field for ingest_data items. It does not mention side effects, but 'search' inherently implies a read-only operation.

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 exactly two sentences: the first states the purpose, the second details the return structure. Every word earns its place, with no redundancy or filler.

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?

Given the tool's moderate complexity (3 parameters, no output schema, no annotations), the description is adequate. It explains the return format and score meaning, while the schema covers parameter semantics. It does not mention pagination, but the limit parameter implicitly addresses that.

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%, so the schema already documents all parameters comprehensively. The description adds no parameter-specific details beyond implying the query benefits from both keyword and semantic matching. A baseline score of 3 is appropriate.

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 ingested documents') with a distinctive approach ('hybrid keyword + semantic matching'), clearly distinguishing it from sibling tools like list_files or read_chunk_neighbors. It also lists return fields, making the tool's purpose unambiguous.

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

Usage Guidelines3/5

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

The description implies the tool is for searching documents but does not explicitly state when to use it versus alternatives. No pruning or exclusions are given, leaving usage context solely to the user's judgment.

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/xiuxiansk/mcp-local-rag'

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