Skip to main content
Glama

engram_recall

Retrieve relevant memories ranked by a hybrid score combining similarity, recency, and confidence. Use at session start or to look up specific facts.

Instructions

Retrieve memories relevant to a query, ranked by a hybrid score. Embeds the query, gathers candidates (FTS5 top-20 plus in-namespace embeddings, optionally time-filtered), and scores each by similarity×0.45 + recency×0.15 + confidence×0.15 + access×0.05 + feedback×0.10 + a 0.1 FTS boost, then filters by category/threshold and returns the top results. If embedding generation fails it falls back to FTS-only search. Reading a memory bumps its last_accessed and access_count. Returns: an array of memory objects — each with id, content, category, entity, confidence, namespace, tags, timestamps, score, and scoreBreakdown — or an empty array if nothing clears the threshold (with a time_filter, the array also carries timeRange metadata). Use at session start or to look up a specific fact; prefer engram_context when you want a ready-to-inject block instead of raw results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum memories to return, 1–20 (default 5). Keep low to avoid context pollution.
queryYesWhat you want to remember. Can be a question ("what is their deployment setup?") or a topic ("docker configuration"). Be specific for better results.
categoryNoOptional filter by memory type (preference/fact/pattern/decision/outcome). Omit to search all types.
namespaceNoOptional project/scope filter. Omit to search across all namespaces.
thresholdNoMinimum relevance score to include a result, 0.0–1.0 (default 0.3). Raise for fewer, more precise results.
time_filterNoRestrict results to a time range by created/updated time. Provide after/before, or a period shorthand. Supports relative times like "3 days ago", "last week", or ISO dates.
Behavior5/5

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

No annotations exist, so description fully bears the burden. It details the scoring formula, fallback to FTS, side effects (bumps timestamps), and return structure. No contradictions.

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?

Long but well-organized: purpose, scoring details, fallback, side effects, return format, usage guidelines. Every sentence adds value; minor trimming possible but still effective.

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?

No output schema, but description fully explains return array structure (fields like id, content, score). Covers input, process, output, side effects, fallback. Complete for a complex tool.

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 baseline is 3. Description adds extra context for query (be specific), limit (keep low), and time_filter (supports relative times), going beyond schema docs.

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 retrieves memories relevant to a query, ranked by a hybrid score, and distinguishes from sibling engram_context by contrasting raw results vs. ready-to-inject block.

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?

Explicitly states when to use ('at session start or to look up a specific fact') and when to prefer an alternative ('prefer engram_context when you want a ready-to-inject block').

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/HBarefoot/engram'

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