Skip to main content
Glama

Search the knowledge base

search_knowledge
Read-onlyIdempotent

Search the store's knowledge base to retrieve the closest passages with similarity scores, verifying whether a question is covered or explaining why the bot answered as it did.

Instructions

Search the store's knowledge base the way the bot does before answering, and return the closest passages with their similarity (0-1). Use it to find out why the bot answered something, or whether the knowledge base covers a question at all.

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": {
      "query": "<query>"
    },
    "name": "search_knowledge"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
queryYes

Output Schema

NameRequiredDescriptionDefault
resultsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is covered. The description adds genuinely new context: results mirror the bot's own pre-answer retrieval, and each passage carries a 0-1 similarity score, which tells the agent how to interpret relevance. It omits any mention of result count or the limit cap, which is a modest gap.

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?

Two sentences, front-loaded with the action and its return value, followed by the usage rationale. No filler, hedging, or repetition of the title.

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?

For a two-parameter read-only search with rich annotations and an output schema (so return values need not be spelled out), the description covers purpose, interpretation of scores, and when to reach for it. The remaining shortfall is input guidance — result-limit behavior and query formulation are left entirely to the schema.

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

Parameters2/5

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

Schema description coverage is 0%, so the description carries the full burden, yet it never explains the 'limit' parameter (default 5, max 20) or what form the 'query' string should take (natural language vs. keywords). The only numeric detail, similarity 0-1, describes output rather than input.

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 verb and resource ('Search the store's knowledge base') and even characterizes the retrieval basis ('the way the bot does before answering') plus the return shape ('closest passages with their similarity (0-1)'). This is unmistakably distinct from the sibling tools that fetch conversations, tool calls, or usage stats.

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?

It gives two explicit motivating scenarios: diagnosing why the bot answered something, and checking whether the knowledge base covers a question at all. That is clear when-to-use guidance, but there is no when-not guidance or named alternative for adjacent needs (e.g., reading the actual conversation via get_conversation).

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