Skip to main content
Glama

search_knowledge

Retrieve the most relevant cited passages from your knowledge corpus for any natural-language query. Get source details for verification directly from the knowledge base.

Instructions

Retrieve the most relevant passages from the configured knowledge corpus for a natural-language query. Returns the passage text plus a CITATION (source file + heading + chunk index) for each hit so answers are traceable. Auth-scoped to the corpus root and fail-soft: a down/empty store returns a structured error, never an exception. Use when asked to look something up in the knowledge base / docs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNoMax passages to return, 1-20 (default 5).
queryYesNatural-language search query.
Behavior5/5

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

With no annotations, the description fully discloses behavior: auth-scoping to the corpus root, fail-soft behavior (structured error on down/empty store), and the output format. This is comprehensive and goes beyond the schema.

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 purpose and includes only high-value sentences: return format, auth/fail-soft behavior, and usage guidance. 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?

Given the simple 2-parameter tool with no output schema, the description covers purpose, return format, error behavior, and invocation context. It leaves no critical gaps for an agent to understand the tool.

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 baseline is 3. The description adds no extra semantics about how 'query' or 'k' should be used beyond what the schema already provides.

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 ('Retrieve'), resource ('knowledge corpus'), and purpose ('for a natural-language query'). It further clarifies the return value (passage text + CITATION) making its function unambiguous.

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?

Explicitly provides usage guidance: 'Use when asked to look something up in the knowledge base / docs.' This gives clear invocation context, even though no alternative tools are listed.

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

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