Skip to main content
Glama

recall

Search long-term associative memory for known facts about a user, project, or topic before replying or when the topic changes. Returns ranked key clusters and a top memory.

Instructions

Search long-term memory for what is already known about the user, project, or topic — call this before your first reply and whenever the topic shifts. Always pass the active namespace when known. Returns {status, query, namespace, keys, memories}: ranked key clusters plus one passive Top-1 memory selected under the top key. The memory includes validity, matched_key, and connected_keys, each with a relevance score (cosine of that key to your query/context, sorted high→low). Before answering, check whether the Top-1 memory supplies every fact the question needs. If a fact is missing, follow an unvisited connected key that fits that fact with read_key(key_id, missing_fact_query, namespace), then read_memory on a relevant handle; recheck and continue only while a required fact and promising path remain. If no connected key fits, recall the missing fact directly. Do not add hops to a complete single-fact answer. Passive recall never reinforces links or changes access, depth, aliases, or confirmation — except: when context is a strong restatement of the returned memory, it is auto-confirmed (memories[0].auto_confirmed: true) without a separate confirm_memory call. An empty result includes empty keys/memories and nearest_keys.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
top_kNo
contextNoThe raw user utterance or sentence this lookup serves. Keep query as short noun keywords; pass the sentence here — it drives content matching, which measures higher on sentence-shaped cues.
explainNoWhen true, also return namespace_memory_count; status distinguishes found, no_match, and empty_namespace.
max_charsNoTruncate the returned memory's content to this length.
namespaceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.30.0
    • removedInput schema / properties / inject
      Removed value: -{
      -  "type": "boolean"
      -}
    • removedInput schema / properties / inject_explore_shallow
      Removed value: -{
      -  "type": "boolean"
      -}
    • removedInput schema / properties / inject_max_chars
      Removed value: -{
      -  "type": "number"
      -}
    • removedInput schema / properties / inject_min_rel_score
      Removed value: -{
      -  "type": "number"
      -}
    • removedInput schema / properties / inject_prefer_depth
      Removed value: -{
      -  "type": "boolean"
      -}
    • removedInput schema / properties / inject_top_k
      Removed value: -{
      -  "type": "number"
      -}
    • addedInput schema / properties / max_chars
      Added value: +{
      +  "description": "Truncate the returned memory's content to this length.",
      +  "type": "number"
      +}
  2. Changed2 schema fields changedv0.29.0
    • addedInput schema / properties / context
      Added value: +{
      +  "description": "The raw user utterance or sentence this lookup serves. Keep query as short noun keywords; pass the sentence here — it drives content matching, which measures higher on sentence-shaped cues.",
      +  "type": "string"
      +}
    • addedInput schema / properties / explain
      Added value: +{
      +  "description": "When true, also return namespace_memory_count; status distinguishes found, no_match, and empty_namespace.",
      +  "type": "boolean"
      +}
  3. Changed2 schema fields changedv0.17.1
    • addedInput schema / properties / inject_max_chars
      Added value: +{
      +  "type": "number"
      +}
    • addedInput schema / properties / inject_min_rel_score
      Added value: +{
      +  "type": "number"
      +}
  4. First observedv0.14.8

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses that passive recall never reinforces links or changes access, depth, aliases, or confirmation, documents the one exception (auto-confirmation on strong restatement via memories[0].auto_confirmed), and describes the empty-result shape (empty keys/memories plus nearest_keys).

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?

Front-loaded with purpose, timing, and return shape before the procedural hop-by-hop guidance; every sentence carries distinct instruction, though the mid-section chain (recheck, follow connected keys, continue while promising path remains) is longer than a tool description strictly needs.

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?

For a 6-parameter, no-annotation, no-output-schema tool, the description supplies the return structure, retrieval semantics, side-effect profile, and escalation path — everything an agent needs to invoke and follow up correctly.

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 50%, and the description compensates for part of the gap by explaining namespace usage ('Always pass the active namespace when known') and the query/context division of labor (short noun keywords vs. the driving sentence). top_k remains undocumented in both description and schema, so the gap is only partially closed.

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 specific verb and resource — 'Search long-term memory for what is already known about the user, project, or topic' — and clarifies scope that distinguishes it from browse_keys/read_memory by casting itself as the entry-point search that feeds them.

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?

Explicit triggering conditions ('call this before your first reply and whenever the topic shifts'), an explicit do-not condition ('Do not add hops to a complete single-fact answer'), and named alternatives to escalate to (read_key, then read_memory, or recall the fact directly).

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