Skip to main content
Glama

search_memories

Search and retrieve top-ranked memories by blending semantic similarity with recency decay. Filter by type to find relevant agent or user memories.

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
Behavior4/5

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

With no annotations provided, the description carries full burden. It explains the ranking algorithm (semantic similarity + recency decay), alpha blend, and memory_type filter. It does not explicitly state that the tool is read-only, but the lack of side effects is implied. Overall, it provides good behavioral context beyond the schema.

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 front-loaded with the purpose, then a list of parameters. It is slightly verbose due to the parameter explanations, but each sentence is necessary given the lack of schema descriptions. No wasted content.

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 complexity (6 parameters, 3 required, algorithm details, no annotations), the description covers the search algorithm, all parameters, defaults, and output (ranked with scores). The output schema exists, so detailed return structure is not needed. The description is complete for correct tool invocation.

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 description coverage is 0%, so the description compensates fully. It explains each parameter's meaning, valid ranges, defaults, and special cases (e.g., alpha weight, memory_type filter). This adds significant value beyond the schema's type/default information.

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: 'Search memories using semantic similarity + recency decay. Returns top-k ranked results with scores.' This distinguishes it from siblings like count_memories, delete_memory, and store_memory by specifying the search and ranking functionality.

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 implied usage through parameter explanations, but lacks explicit guidance on when to use this tool versus alternatives. For example, it doesn't state that count_memories should be used for counting or delete_memory for deletion. No when-not-to-use or alternative recommendations 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