Skip to main content
Glama

search_memory

Retrieve memories by query, tag, or filter, with scoring and pagination. Automatically blend in items due for review to reinforce retention.

Instructions

Search for memories with optional filters and scoring.

This tool implements natural spaced repetition by blending memories due for review into results when they're relevant. This creates the "Maslow effect" - natural reinforcement through conversation.

Pagination: Results are paginated to help you find specific memories across large result sets. Use page and page_size to navigate through results. If a search term isn't found on the first page, increment page to see more results.

Args: query: Text query to search for (max 50,000 chars). tags: Filter by tags (max 50 tags). top_k: Maximum number of results before pagination (1-100). window_days: Only search memories from last N days (1-3650). min_score: Minimum decay score threshold (0.0-1.0). use_embeddings: Use semantic search with embeddings. include_review_candidates: Blend in memories due for review (default True). page: Page number to retrieve (1-indexed, default: 1). page_size: Number of memories per page (default: 10, max: 100).

Returns: Dictionary with paginated results including: - results: List of matching memories with scores for current page - pagination: Metadata (page, page_size, total_count, total_pages, has_more)

Some results may be review candidates that benefit from reinforcement.

Examples: # Get first page (10 results) search_memory(query="authentication", page=1, page_size=10)

# Get next page
search_memory(query="authentication", page=2, page_size=10)

# Larger page size
search_memory(query="authentication", page=1, page_size=25)

Raises: ValueError: If any input fails validation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo
tagsNo
queryNo
top_kNo
min_scoreNo
page_sizeNo
window_daysNo
use_embeddingsNo
include_review_candidatesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description discloses several behavioral traits: the 'Maslow effect' blending of review candidates, pagination mechanics, and the possibility of review candidates in results. It also mentions ValueError on validation failure. It doesn't explicitly state whether the operation is read-only or modifies scheduling state, but it provides more detail than most.

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-organized with clear sections (pagination, args, returns, examples, raises) and front-loaded with a one-line summary. It is somewhat verbose and repeats the page/page_size explanation in both the pagination paragraph and the Args section, but the structure and examples keep it usable.

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 tool with 9 parameters, no annotations, and an output schema, the description covers the essential aspects: parameter semantics, pagination, return structure, examples, and error behavior. It could better address when to prefer this over search_unified or clarify side effects, but it is largely complete.

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?

The Args section describes every parameter with meaningful constraints and defaults, e.g., 'query: Text query to search for (max 50,000 chars)' and 'page_size: Number of memories per page (default: 10, max: 100).' Since the schema provides zero parameter descriptions, this fully compensates.

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?

The description clearly states it searches memories with optional filters and scoring, and explains the unique spaced repetition behavior. However, it doesn't distinguish itself from the sibling tool 'search_unified', so it falls short of a 5.

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?

The description provides usage guidance for pagination ('If a search term isn't found on the first page, increment page to see more results') and explains the review-candidate blending. But it never says when to use this tool over alternatives like search_unified, and there are no exclusions.

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/fastmcp-me/mnemex'

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