Skip to main content
Glama

search_memory

Retrieves ranked memory items from long-term AI memory using hybrid lexical and vector search. Supports point-in-time queries for factual lookup and technical recall.

Instructions

Searches long-term memory using hybrid FTS5 BM25 lexical and vector cosine similarity with RRF ranking (read-only). Supports Point-in-Time queries via 'as_of'. Use for factual lookup and technical recall. For active high-level board use 'get_current_state'; for fact revisions use 'get_fact_lineage'. Returns ranked list of scored memory items.

Input Schema

NameRequiredDescriptionDefault
as_ofNoISO 8601 timestamp (e.g. '2026-10-15T12:00:00Z') or date ('2026-10-15') for Point-in-Time retrospective queries. Returns only facts that were active and not yet superseded at that specific moment.
limitNoMaximum number of ranked results to return (1-20). Defaults to 5 when omitted.
queryYesSearch keywords, error messages, concepts, or questions (e.g. 'Proxmox vzdump backup schedule', 'auth token expiration'). Avoid conversational filler.
userIdNoUser or agent namespace to search within. Defaults to 'user_default' when omitted.
historyNoRecent conversation dialogue (e.g. 'User: ... Assistant: ...'). When provided, the internal Query Expander resolves ambiguous pronouns and conversational context into explicit search terms.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.1.2
    • changedInput schema / properties / as_of / description
      Previous value: -"Optional ISO timestamp (e.g. '2026-10-01T00:00:00Z') or date ('2026-10-01') for Point-in-Time retrospective queries. Returns facts as they existed at that exact moment in time."New value: +"ISO 8601 timestamp (e.g. '2026-10-15T12:00:00Z') or date ('2026-10-15') for Point-in-Time retrospective queries. Returns only facts that were active and not yet superseded at that specific moment."
    • changedInput schema / properties / history / description
      Previous value: -"Optional recent conversation history (e.g. 'U: hi\\nA: hello\\nU: what was that thing?'). When provided, the Query Expander uses it to resolve ambiguous references."New value: +"Recent conversation dialogue (e.g. 'User: ... \nAssistant: ...'). When provided, the internal Query Expander resolves ambiguous pronouns and conversational context into explicit search terms."
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum number of results to return (default: 5, max: 20)."New value: +"Maximum number of ranked results to return (1-20). Defaults to 5 when omitted."
    • changedInput schema / properties / query / description
      Previous value: -"Search terms or topic to recall."New value: +"Search keywords, error messages, concepts, or questions (e.g. 'Proxmox vzdump backup schedule', 'auth token expiration'). Avoid conversational filler."
    • changedInput schema / properties / userId / description
      Previous value: -"Optional user ID to scope the search."New value: +"User or agent namespace to search within. Defaults to 'user_default' when omitted."
  2. Changed1 schema field changedv0.1.1
    • addedInput schema / properties / as_of
      Added value: +{
      +  "description": "Optional ISO timestamp (e.g. '2026-10-01T00:00:00Z') or date ('2026-10-01') for Point-in-Time retrospective queries. Returns facts as they existed at that exact moment in time.",
      +  "type": "string"
      +}
  3. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the burden and does so well: it declares the operation read-only, discloses the ranking approach and that Point-in-Time retrospectives are supported, and states the return shape ('ranked list of scored memory items'). It stops short of permission/auth requirements or any rate/limit behavior, keeping it out of the top band.

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?

Four compact sentences with no filler, each doing distinct work: capability, the as_of capability, routing to alternatives, and return shape. The core purpose is front-loaded before any technical detail.

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 five-parameter hybrid-search tool with no output schema, the description covers operation semantics, return format, and routing, and the schema covers every parameter fully. The only real gap is the absence of any note on scope or permissions, which is minor given the documented read-only nature.

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 all five parameters (as_of, limit, query, userId, history) are already fully documented in the schema. The description restates the 'as_of' capability but adds no syntax, format, or edge-case detail beyond what the schema specifies, which is the baseline-3 case.

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?

States a precise verb and resource ('Searches long-term memory') and adds the retrieval mechanism (hybrid FTS5 BM25 + vector cosine with RRF). It explicitly names the siblings it is not for ('get_current_state', 'get_fact_lineage'), so an agent can route without opening any schema.

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?

Gives both a positive use case ('factual lookup and technical recall') and two explicit alternatives with the conditions that select them: high-level board state and fact revisions. When-to-use, when-not-to-use, and alternatives are all present.

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