Skip to main content
Glama

explain_memory

Debug unexpected search results by understanding why each memory matched. Reveals retrieval path, freshness, scope, and matched terms for transparency in ranking.

Instructions

Explain why memories matched a query: retrieval path, freshness, scope, and matched terms. Read-only. Use when search results seem unexpected and you need to debug ranking or scope filtering.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query to explain — natural language or keywords, e.g. 'auth migration'
limitNoMaximum number of matched results to analyze and explain (default: 5)
scopeNoRestrict to a specific scope, e.g. 'project:myapp'. Omit to use default scope
sessionIdNoSession identifier to infer session-scoped search, e.g. 'abc123'
allScopesNoSet to true to search across all scopes instead of the default scope
categoryNoFilter results by memory category, e.g. 'preference', 'decision', 'fact'
profileNoRetrieval profile that tunes ranking: 'debug' for technical, 'fact-check' for precision
Behavior4/5

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

The description declares 'Read-only,' which is essential for behavior understanding. It explains what aspects are analyzed (retrieval path, freshness, etc.). Without annotations, the description carries the burden, and it adequately discloses that no modifications occur. However, it could mention that the tool does not alter memory state.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences: the first explains purpose and output, the second provides usage guidance. Every sentence adds value with no wasted words.

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?

Given the 7 parameters and good schema descriptions, the description covers purpose, usage context, and read-only nature. It mentions what the explanation includes (retrieval path, freshness, etc.), but without an output schema, it does not detail the exact return format. Still, it is largely complete for an explainer tool.

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?

All 7 parameters have descriptions in the schema (100% coverage), so the baseline is 3. The description does not add additional meaning beyond the schema; it provides a high-level overview without elaborating on parameter interactions.

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's purpose: 'Explain why memories matched a query: retrieval path, freshness, scope, and matched terms.' The verb 'explain' and resource 'memories matched a query' are specific. It distinguishes from sibling tools like search_memory by focusing on explanation rather than retrieval.

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

Usage Guidelines4/5

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

The description explicitly tells when to use the tool: 'Use when search results seem unexpected and you need to debug ranking or scope filtering.' This provides clear guidance, though it does not explicitly name alternatives or state when not to use it.

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/AliceLJY/recallnest'

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