Skip to main content
Glama

memory_recall

Search stored memories to recall prior decisions, conventions, and bug fixes from past sessions. Retrieve relevant knowledge with fuzzy matching and ranking.

Instructions

Search Cortex memories for durable knowledge relevant to a query.

Use this when you need to recall prior decisions, conventions, bug fixes, user preferences, or lessons learned from past Claude Code sessions. It searches the full Obsidian-backed memory store via SQLite FTS5, ranks results with a multi-signal scorer (relevance + recency + usage + importance), and expands related-memory links.

Behaviour:

  • Read-only. Does not modify any memory, index, or sidecar file. Only side effect is a bump to the access-count telemetry sidecar (~/.cortex/telemetry.json), which influences future ranking.

  • No authentication required. Cortex is local-first; there are no credentials, tokens, or API keys.

  • No rate limits. Typical latency is under 100ms on corpora up to ~10k memories; pathological queries can take up to ~500ms.

  • Data access scope: reads from ~/obsidian-brain/cortex/memories/ and ~/.cortex/search.db. Nothing leaves the local machine.

  • Idempotent: calling twice with the same query returns the same results (modulo the access-count telemetry bump).

  • Failure modes: returns "No memories found for: " on empty result sets. Never raises to the caller; internal errors fall back to a slower file-scan path.

Use memory_recall when:

  • You need specific facts ("what auth library did we pick?")

  • You want to check if a topic has prior context before making a decision

  • You're debugging and want to find if this bug was fixed before

Do NOT use for:

  • Session-level what-I-did-today logs (use transcript_search instead)

  • On-demand query-tailored briefings (use context_assemble instead)

  • Listing every memory (use memory_list instead)

Returns: Markdown-formatted memory entries, grouped under a "### Memories" header. Each entry has the memory title and body excerpt. If no matches are found, returns "No memories found for: ".

Example: memory_recall(query="jwt auth algorithm", limit=5) → returns the top 5 memories mentioning JWT auth, such as a memory documenting the decision to use RS256 in production.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of top-ranked memories to return. Results are ranked by 50% FTS relevance + 15% recency + 15% access history + 20% importance. Linked memories may be expanded beyond this limit.
queryYesNatural-language query describing what you want to find. Can be a question ("how did we handle auth?"), a topic ("jwt rotation"), or a fragment of a decision you vaguely remember. Keyword match is fuzzy (FTS5 + synonym expansion) so approximate terms work.
scope_idNoProject scope to search within. Defaults to "default" which searches across all projects. Pass a specific project name to narrow the search to that project's memories only.default

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Even without annotations, the description thoroughly covers behavior: read-only, no auth, no rate limits, idempotence, data scope, failure modes, and the minor side effect of access-count telemetry. It fully discloses all behavioral traits an agent needs.

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?

The description is well-structured with clear sections and an example. It is fairly long but every sentence adds value. Minor redundancy could be trimmed, but overall it is efficient and front-loaded.

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?

Given the tool's moderate complexity (3 parameters, output schema implied), the description covers purpose, usage, behavior, return value, failure mode, and an example. No gaps remain for an agent to infer.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds significant value: explains the ranking formula for 'limit', fuzzy matching and synonym expansion for 'query', and project narrowing for 'scope_id'. This goes well beyond the schema descriptions.

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?

The description clearly states the tool searches Cortex memories for relevant knowledge, with a specific verb 'Search' and a precise resource 'Cortex memories'. It differentiates from siblings by listing concrete use cases and explicitly naming alternative tools for different scenarios.

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?

The description includes explicit guidance on when to use (specific facts, prior context, debugging) and when not to use, with clear references to sibling tools 'transcript_search', 'context_assemble', and 'memory_list'. This helps the agent choose correctly.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TT-Wang/memem'

If you have feedback or need assistance with the MCP directory API, please join our Discord server