Skip to main content
Glama

search_memories

Retrieve relevant and recent memories by blending semantic similarity with recency decay. Filter by memory type and control ranking with adjustable alpha weight.

Instructions

Search memories using semantic similarity + recency decay. Returns top-k
ranked results with scores.

Args:
    agent_id:     Agent whose memories to search.
    user_id:      User whose memories to search.
    query:        Natural language description of what to recall.
    top_k:        Number of memories to return (1–50). Default: 5.
    alpha:        Blend weight 0.0–1.0. 1.0 = pure semantic, 0.0 = pure recency.
                  Default: 0.7.
    memory_type:  Filter to 'episodic', 'semantic', or 'procedural'. Omit to search all.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYes
user_idYes
queryYes
top_kNo
alphaNo
memory_typeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

The description explains the ranking mechanism and blend weight, but without annotations, it lacks details on side effects, authentication, rate limits, or behavior when no results are found. It adequately describes the core functionality.

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 concise and well-structured with a docstring format. It front-loads the purpose and lists parameters clearly. Could be slightly more concise, but overall efficient.

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 that an output schema exists, the description focuses adequately on input parameters. It covers required and optional parameters with defaults. Missing details like pagination or error handling, but sufficient for a search 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?

The description provides detailed explanations for all parameters, including the meaning of alpha (blend weight) and memory_type filter options. Schema coverage is 0%, so the description adds significant value beyond the schema.

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 memories using semantic similarity and recency decay, returning top-k ranked results with scores. It distinguishes itself from sibling tools like store_memory, delete_memory, and count_memories.

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 explains the parameters and default values but does not provide explicit guidance on when to use this tool versus alternatives. No 'use when' or 'avoid when' instructions are given.

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/ayushagrawal288/memex'

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