Skip to main content
Glama

Search a knowledge base

search_knowledge
Read-only

Search one of your knowledge bases for passages that answer a question. Use it for questions the knowledge base may cover. Pass the kb address and a short question or key phrase. Returns the passages valid today (or on filters.as_of), each with a citation like [1] and its validity. A refused answer says why and what to do next.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "kb": "<kb>",
      "query": "<query>"
    },
    "name": "search_knowledge"
  }
}

Input Schema

NameRequiredDescriptionDefault
kbYesAddress of the knowledge base, "owner/name", from list_knowledge_bases.
queryYesWhat to look for: a question or key words. Words in the language of the texts match best.
top_kNoHow many passages to return (the knowledge base's default if left out).
filtersNoOptional filters. Leave out unless the user asks about a date or specific sources.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so safety is covered. The description adds genuinely non-structured behavior: results are the passages valid today (or as_of), each carries a numbered citation like [1] and its validity, and a refused answer explains itself and suggests next steps. That refusal semantics is the kind of operational detail annotations never convey.

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?

Five short sentences, front-loaded with purpose followed by usage, inputs, returns, and failure behavior. The sentence "Pass the kb address and a short question or key phrase" largely duplicates what the required schema properties already say, which is the one piece that does not fully earn its place.

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?

There is no output schema, and the description compensates by sketching the return: passages with [n] citations and validity, plus refusal messaging. For a four-parameter retrieval tool with nested filters and full schema coverage, this is nearly complete; only the alternative retrieval paths (get_document, get_provision) are left unaddressed.

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 kb, query, top_k, and filters.as_of are already fully documented in the schema. The description restates the kb address and short question/phrase, and adds only the as_of default/today framing, which the schema also states. Baseline 3 applies since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Search one of your knowledge bases for passages that answer a question" names a specific verb (search), resource (knowledge base), and result shape (passages answering a question). It reads clearly against list_knowledge_bases but never distinguishes itself from retrieval siblings like get_document or get_provision, so an agent must infer that this is the semantic/question-oriented path.

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?

"Use it for questions the knowledge base may cover" gives an implied usage condition, and the schema points at list_knowledge_bases for the kb address. However, there is no explicit when-not guidance and no named alternative for whole-document or provision lookups, leaving the routing decision to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.