Skip to main content
Glama

search_knowledge

Search the knowledge base before answering to ground responses in verified facts and prior context, ensuring accurate and consistent information.

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.

Input Schema

TableJSON 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. First observedv0.30.1

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description carries full behavioral disclosure, and it delivers: it explains the three return fields, the reliability difference between results and pending, the conditions under which episodes is filled, and the semantic-vs-keyword matching behavior. It also cautions that episodes should not be reported as integrated facts. This is exemplary transparency.

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 long but every sentence earns its place: purpose is front-loaded, usage guidance follows, then return semantics are explained in a structured, scannable way. The prose moves from what to do first, to what comes back, to how to interpret edge cases. No filler is present.

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 what the tool returns — and it does so thoroughly, covering results, pending, episodes, and the semantic-search distinction. It also addresses the prerequisite relationship with get_session_context, making the tool safe and effective to invoke in context. Given the tool's complexity, this is complete.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds meaningful nuance beyond the schema: it explains that query may be a paraphrase when semantic search is enabled, and that domain biases ranking rather than filtering, reinforcing the schema's own explanation. This helps an agent form better queries even though the schema already documents both parameters well.

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 clear verb-resource pair: 'Search the knowledge base.' It then distinguishes its purpose from related operations by detailing what it returns (integrated knowledge vs pending vs episodes), which sets it apart from siblings like get_context and get_session_context. The role of the tool as the pre-answer retrieval step is explicit.

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?

The description explicitly states when to use the tool ('Call this BEFORE answering questions that might benefit from what this store knows') and gives a concrete prerequisite: call get_session_context or load memory://briefing first. It also explains how to interpret results when deciding whether to rely on pending vs results, giving clear operational guidance.

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