Skip to main content
Glama

recall

Search long-term memory for known facts about a user, project, or topic before replying or when the topic shifts; pass the active namespace to get ranked key clusters and a Top-1 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 exactly matches the normalized full text 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

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 to lean on, the description carries the full load and does so richly: it discloses that passive recall never reinforces links or alters access/depth/aliases/confirmation, spells out the one auto-confirm exception, and describes the empty-result shape. This is exactly the behavioral context an agent needs for a memory tool.

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?

Purpose is front-loaded in the first sentence and return shape follows, with no filler sentences. It is dense and long for a tool description, embedding a full hop-following policy, but each clause is actionable rather than decorative.

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?

With six parameters, 50% schema coverage, and no output schema, the description still supplies the return structure ({status, query, namespace, keys, memories}), the Top-1/passive-recall model, and the follow-up protocol. An agent has everything needed to invoke and chain it 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% (query, top_k, namespace lack schema descriptions), so the description must compensate and largely does: it explains namespace usage ('Always pass the active namespace when known') and the special context semantics that trigger auto_confirmed. It does not clarify top_k or query beyond the schema's context note.

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 with scope: 'Search long-term memory for what is already known about the user, project, or topic.' It is clearly distinguished from siblings because it names read_key, read_memory, and confirm_memory and assigns each a different role in the flow.

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 explicit triggers ('call this before your first reply and whenever the topic shifts') and explicit stop conditions ('Do not add hops to a complete single-fact answer'). It also routes the agent to named alternatives (read_key, read_memory) with the condition that selects each.

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