Skip to main content
Glama

Recall memories

zenbrain_recall
Read-only

Search long-term memory across episodic, semantic, procedural, and core layers to find relevant past-session context before answering. Returns ranked results by score, id, and layer.

Instructions

Search long-term memory for anything relevant to a query. By default it searches the episodic, semantic, procedural and core layers; working memory (the most recent stores, held only while the server runs, up to five results) is searched only when named in layers. Returns results sorted by score, each with its id and the layer it came from; zenbrain_forget takes both. The score runs from 0 to 1 and says how well a result matches the query; a layer in which nothing matches returns recent memories (or its most successful procedures) at 0, behind every hit, and minScore above 0 leaves them out. Every core block scores 0.5 or 0.8, so a block can rank above a weak hit. Use this before answering when the user refers to something from an earlier session. To see how much is stored rather than what, use zenbrain_health; to save something, use zenbrain_store.

Input Schema

NameRequiredDescriptionDefault
limitNoHow many results to return at most, after ranking (default 10).
queryYesWhat to look for, in plain language.
layersNoRestrict the search to these layers. Defaults to episodic, semantic, procedural and core; add 'working' to include the most recent stores held in memory (up to five, ranked by the query).
minScoreNoLeave out results scoring below this value (default 0 keeps all). Any value above 0 drops the score-0 fallbacks that a layer returns when nothing in it matches.
minConfidenceNoLeave out results whose confidence is below this value. Applied before the final ranking, so fewer than `limit` results may come back. Facts use their stored confidence, procedures their success rate; core blocks, episodes and working-memory items count as 1 and are kept.

Output Schema

NameRequiredDescriptionDefault
countYesHow many memories were returned.
resultsYesMemories sorted by score (0 to 1), highest first; 0 means nothing in that layer matched.
skippedYesRows without readable content that this server left out of `results`. When recall finds more than one row, the coordinator drops such rows while deduplicating, before they reach this count.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.6.0
    • changedInput schema / properties / layers / description
      Previous value: -"Restrict the search to these layers. Defaults to episodic, semantic, procedural and core; add 'working' to include the most recent stores held in memory (returned whatever the query)."New value: +"Restrict the search to these layers. Defaults to episodic, semantic, procedural and core; add 'working' to include the most recent stores held in memory (up to five, ranked by the query)."
    • addedInput schema / properties / minScore
      Added value: +{
      +  "description": "Leave out results scoring below this value (default 0 keeps all). Any value above 0 drops the score-0 fallbacks that a layer returns when nothing in it matches.",
      +  "maximum": 1,
      +  "minimum": 0,
      +  "type": "number"
      +}
    • changedOutput schema / properties / results / description
      Previous value: -"Memories sorted by score, highest first; scores are per layer (see the tool description)."New value: +"Memories sorted by score (0 to 1), highest first; 0 means nothing in that layer matched."
    • addedOutput schema / properties / results / items / properties / duplicates
      Added value: +{
      +  "description": "Memories with (nearly) the same content that recall left out in favour of this one, e.g. the fact consolidated from this episode. Present only when there are any.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "id": {
      +        "type": "string"
      +      },
      +      "layer": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "layer"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  2. Changed3 schema fields changedv0.5.2
    • changedInput schema / properties / layers / description
      Previous value: -"Restrict the search to these layers. Defaults to episodic, semantic, procedural and core; add 'working' to include recently stored items held in memory."New value: +"Restrict the search to these layers. Defaults to episodic, semantic, procedural and core; add 'working' to include the most recent stores held in memory (returned whatever the query)."
    • changedOutput schema / properties / results / description
      Previous value: -"Matching memories, most relevant first."New value: +"Memories sorted by score, highest first; scores are per layer (see the tool description)."
    • changedOutput schema / properties / skipped / description
      Previous value: -"Rows that carried no readable content and were left out of `results`."New value: +"Rows without readable content that this server left out of `results`. When recall finds more than one row, the coordinator drops such rows while deduplicating, before they reach this count."
  3. Changed2 schema fields changedv0.5.1
    • addedOutput schema / properties / results / items / properties / id
      Added value: +{
      +  "description": "Pass it with `layer` to zenbrain_forget to delete this memory.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / results / items / required
      Previous value: -[
      -  "content",
      -  "layer",
      -  "score"
      -]New value: +[
      +  "id",
      +  "content",
      +  "layer",
      +  "score"
      +]
  4. Changed1 schema field changedv0.4.10
    • changedInput schema / properties / minConfidence / description
      Previous value: -"Leave out results whose stored confidence is below this value; results stored without a confidence count as 1 and are kept."New value: +"Leave out results whose confidence is below this value. Applied before the final ranking, so fewer than `limit` results may come back. Facts use their stored confidence, procedures their success rate; core blocks, episodes and working-memory items count as 1 and are kept."
  5. Changed4 schema fields changedv0.4.9
    • removedInput schema / properties / includeContext
      Removed value: -{
      -  "description": "Boost results whose stored context (time of day, weekday, task type) matches the current one.",
      -  "type": "boolean"
      -}
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum results (default 10)."New value: +"How many results to return at most, after ranking (default 10)."
    • changedInput schema / properties / minConfidence / description
      Previous value: -"Drop results below this confidence."New value: +"Leave out results whose stored confidence is below this value; results stored without a confidence count as 1 and are kept."
    • removedInput schema / properties / taskType
      Removed value: -{
      -  "description": "Current task, e.g. 'coding', 'writing'. Only has an effect together with `includeContext: true`.",
      -  "type": "string"
      -}
  6. Changed3 schema fields changedv0.1.7
    • changedInput schema / properties / includeContext / description
      Previous value: -"Boost results matching the current context."New value: +"Boost results whose stored context (time of day, weekday, task type) matches the current one."
    • changedInput schema / properties / layers / description
      Previous value: -"Restrict the search to these layers. Defaults to all but working."New value: +"Restrict the search to these layers. Defaults to episodic, semantic, procedural and core; add 'working' to include recently stored items held in memory."
    • changedInput schema / properties / taskType / description
      Previous value: -"Current task, e.g. 'coding', 'writing' — used for context matching."New value: +"Current task, e.g. 'coding', 'writing'. Only has an effect together with `includeContext: true`."
  7. First observedv0.1.5

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds real behavioral detail not in annotations: default layer set, working-memory volatility and five-result cap, sort order, score range 0–1, per-layer fallback behavior at score 0, and core-block fixed scores of 0.5/0.8.

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, then defaults, then return semantics, then alternatives. Several sentences are dense but each earns its place; the core-block scoring sentence is the only one bordering on niche 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 read-only ranked search with an output schema present, the definition covers defaults, ranking, score semantics, fallback behavior, and cross-tool routing. Return values needn't be explained given the output schema. Coverage of `limit`/`minConfidence` behavior is left to the schema.

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 bar is a baseline 3; the description nonetheless adds semantics for `layers` (working is opt-in and held only while the server runs) and `minScore` (values above 0 drop score-0 fallbacks) that reinforce and contextualize the schema text. It does not explain `limit` or `minConfidence`, keeping it from a 5.

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+resource ('search long-term memory') and immediately scopes the default layers, so the agent knows exactly what it retrieves. It also explicitly names sibling alternatives (zenbrain_health, zenbrain_store) for adjacent needs.

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 an explicit when-to-use trigger ('before answering when the user refers to something from an earlier session') and routes non-matching needs to siblings ('to see how much is stored… use zenbrain_health; to save something, use zenbrain_store').

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