Skip to main content
Glama

search_memory

Read-onlyIdempotent

Find memories matching a natural language query via hybrid semantic and keyword search, returning ranked results with relevance scores for content-based lookup.

Instructions

Find memories matching a natural language query using hybrid semantic + keyword search. Primary retrieval tool for content-based lookup. Uses vector similarity (enhanced mode) or keyword matching (basic mode). Cache-first by default for speed. Returns ranked results with relevance scores. Read-only. Returns: array of Memory objects or 'No memories found' text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum results to return. Range: 1-100. Higher values increase latency. Default: 10.
queryYesNatural language search query. Supports keywords, phrases, or questions. More specific queries yield better relevance ranking.
user_idNoUser namespace to search within. Default: "oliver".
prefer_cacheNotrue: check cache first, fall back to storage. false: query storage directly, then cache results. Default: true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv1.3.2
    • removedInput schema / properties / limit / default
      Removed value: -10
    • addedInput schema / properties / limit / description
      Added value: +"Maximum results to return. Range: 1-100. Higher values increase latency. Default: 10."
    • removedInput schema / properties / prefer_cache / default
      Removed value: -true
    • changedInput schema / properties / prefer_cache / description
      Previous value: -"true = cache-first with fallback, false = cloud-first with caching"New value: +"true: check cache first, fall back to storage. false: query storage directly, then cache results. Default: true."
    • changedInput schema / properties / query / description
      Previous value: -"Search query"New value: +"Natural language search query. Supports keywords, phrases, or questions. More specific queries yield better relevance ranking."
    • removedInput schema / properties / user_id / default
      Removed value: -"oliver"
    • addedInput schema / properties / user_id / description
      Added value: +"User namespace to search within. Default: \"oliver\"."
  2. First observedv1.3.1

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover read-only and idempotent hints, so the description builds on that by adding caching behavior ('Cache-first by default'), search modes ('enhanced mode' vs 'basic mode'), and output specification (ranked results with relevance scores and the exact return type). These details go beyond what annotations provide and add meaningful context.

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?

The description is four sentences with a logical flow: core purpose, positioning, mode and caching details, and return format. It is front-loaded with the main function and avoids redundancy. Every sentence contributes value, making it both concise and well-structured.

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 retrieval tool with no output schema, it adequately describes the return values and modes. It clarifies caching and ranking, but leaves ambiguity regarding how enhanced vs basic mode is selected (no parameter exists) and does not specify pagination beyond the limit parameter. These are minor gaps but do not prevent correct usage.

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?

The input schema covers all parameters with 100% description coverage, so the baseline is 3. The description adds only indirect context (e.g., 'Cache-first by default' aligns with prefer_cache), but does not substantively enhance parameter understanding beyond what the schema already provides. It mentions output but not parameter-specific nuances.

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 clearly states the tool 'Find memories matching a natural language query' and positions it as the 'Primary retrieval tool for content-based lookup,' distinguishing it from siblings like get_memory (likely by ID) and get_all_memories (list all). The verb and resource are specific and immediately convey the core purpose.

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?

The description explicitly labels this as the primary retrieval tool, giving strong contextual guidance on when to use it. It also notes cache-first behavior as a usage consideration. However, it does not explicitly state when to avoid it or name alternatives such as get_memory for ID-based lookup, though the 'primary' designation implies precedence.

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