Skip to main content
Glama

search_knowledge

Search a knowledge base to retrieve ranked, deduplicated facts with source attribution and confidence scores before answering. Pending results surface what was captured recently but not yet consolidated.

Instructions

Search the knowledge base. Call this BEFORE answering questions that might benefit from what this store knows. If you have not called get_session_context (or loaded memory://briefing) this conversation, do that first — otherwise you start without this store's context. Returns facts ranked by relevance with source attribution and confidence scores.

Three fields come back. results is integrated knowledge: deduplicated, reconciled against everything else known, entities resolved. Each result carries speaker_role when the primary event is known (user, assistant, system, or tool) and speaker when the transcript named the person — who uttered it, not who it is about. pending is what was captured recently and not yet consolidated — real, and usually the most recent thing you were told, but not yet checked against existing knowledge, so it may duplicate or contradict a fact in results. Trust results first; use pending to avoid forgetting something you were told minutes ago. episodes is filled only when results are empty: a short raw-log window around a keyword hit in the copied transcript, not yet extracted. It is not knowledge of the same standing — do not report it as an integrated fact.

When semantic search is enabled, results also matches on meaning, so a query can surface a fact that shares none of its words. pending and episodes never do — they are keyword-only. A just-captured fact is findable by its own words but not yet by a paraphrase of them.

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
queryYesWhat to search for
domainNoPrioritise a domain. Domains are whatever this store uses — they are not a fixed list, so call get_schemas to see them rather than guessing. This biases ranking rather than filtering: facts in the domain are surfaced and rank higher, but a strong match elsewhere still appears. Domains are assigned by a classifier and are approximate, so a hard filter would hide a fact filed under a near-synonym. Omit it to search everything.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.34.0
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv0.30.1

TDQS

A4.1/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full disclosure burden and does so well: relevance ranking, source attribution, confidence scores, deduplication/reconciliation of `results`, the unconsolidated nature of `pending`, and the raw-log provenance of `episodes`. It also discloses a non-obvious behavioral asymmetry — semantic matching applies only to `results`, while `pending` and `episodes` are keyword-only — which is exactly the kind of trait no schema or annotation would 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?

Well structured and front-loaded: action and prerequisite first, then the three return fields, then the semantic-search caveat. It is on the long side for a two-parameter search, and the closing paragraph on semantic vs keyword matching partly restates the `pending`/`episodes` discussion, costing some tightness.

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?

There is no output schema, so the description must explain return values — which it does field by field, including the conditional population of `episodes` when `results` is empty. For a search tool of this complexity, the only real omission is result-count or pagination behavior, which is minor compared to what is covered.

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 coverage is 100% and the `domain` property already documents that it biases rather than filters ranking, so the description adds no parameter-level detail beyond the schema. It does supply adjacent context (use get_schemas to discover domains, semantic vs keyword matching tied to the query), but that is behavioral rather than parameter semantics, so the baseline 3 applies.

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?

The opening verb+resource ("Search the knowledge base") is specific, and the description goes further by decomposing the return into `results`, `pending`, and `episodes`, which reveals the tool's scope. It does not, however, distinguish itself from lookalike siblings such as get_context, get_entity, or get_events, so an agent still has to infer which retrieval tool applies.

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 explicit timing ("Call this BEFORE answering questions that might benefit from what this store knows") plus a hard prerequisite and a named fallback ("get_session_context (or loaded memory://briefing)"). What is missing is any negative guidance — when a targeted lookup like get_entity or get_events would be preferable to a broad search.

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