Skip to main content
Glama

recall

Fetch relevant memories by query or topic from a persistent store to give AI agents past-session context.

Instructions

Retrieve memories relevant to a query or topic. Returns matching memories from the persistent store. Use this when you need context from past sessions. Results are re-ranked for diversity (MMR, λ=0.7 by default) so near-duplicate memories on a well-covered topic don't crowd out different ones; the top result is always the most relevant. Pass diversity: 0 for pure relevance order.

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum results to return (default: 10)
queryYesWhat to search for — topic, keyword, or question
projectNoScope to a specific project — pass the project you are currently working in. Enforces scope discipline (t-337): memories tagged to a different project are excluded unless their effective scope is global (user/reference by default, or anything written with scope: "global"). Omit to search without project scoping.
categoryNoFilter to a specific memory category, or omit for all
diversityNoMMR diversity 0..1 (default 0.3 = 1−λ). 0 reproduces the plain relevance ranking; higher trades relevance for coverage of distinct memories.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.5.1
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / project / description
      Previous value: -"Filter to a specific project"New value: +"Scope to a specific project — pass the project you are currently working in. Enforces scope discipline (t-337): memories tagged to a different project are excluded unless their effective scope is global (user/reference by default, or anything written with scope: \"global\"). Omit to search without project scoping."
  2. Changed1 schema field changedv0.5.0
    • addedInput schema / properties / diversity
      Added value: +{
      +  "description": "MMR diversity 0..1 (default 0.3 = 1−λ). 0 reproduces the plain relevance ranking; higher trades relevance for coverage of distinct memories.",
      +  "maximum": 1,
      +  "minimum": 0,
      +  "type": "number"
      +}
  3. First observedv0.4.1

TDQS

A3.7/5.0
Behavior4/5

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

The description adds substantial behavioral context beyond the annotations: MMR re-ranking with a default λ=0.7, the guarantee that the top result is the most relevant, and the effect of diversity: 0. However, it never addresses the readOnlyHint=false signal — a retrieval tool that apparently mutates state (e.g., access tracking) without saying so — which is a real, if non-contradictory, gap.

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 the core purpose, then usage, then ranking behavior. Well-sized overall, though the first two sentences are slightly redundant ('Retrieve memories...' / 'Returns matching memories from the persistent store').

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 5-parameter retrieval tool with no output schema, the description reasonably covers purpose, usage trigger, and notable ranking behavior. The main omission is the state effect implied by readOnlyHint=false; the return shape is only loosely described.

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 the baseline is 3 and the schema already documents limit, query, project, category, and diversity. The description reinforces diversity semantics (MMR/λ) and the guaranteed-top-result behavior, but adds little parameter meaning that the schema does not already carry.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb + resource ('Retrieve memories relevant to a query or topic') and clarifies the source ('persistent store'). The purpose is unambiguous, but it offers no differentiation from closely related siblings such as find_similar, memory_list, or knowledge_recall, which an agent must disambiguate on its own.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use this when you need context from past sessions' gives a genuine when-to-use, but there are no when-not cases and no explicit alternatives, despite a crowded sibling space (find_similar, memory_list, episodes, knowledge_recall). An agent is left to infer which retrieval tool applies.

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