Skip to main content
Glama

search_memories

Retrieve relevant context from stored memories using natural language queries. Supports user-specific and session-specific searches to recall past decisions, preferences, and project details.

Instructions

Query stored memories to retrieve relevant context.

Pre-Execution Recall Pattern (IMPORTANT)

BEFORE responding to user, search for relevant memories based on context:

  1. User asks about skills/capabilities? → Search 'user programming language', 'user technical skills'

  2. User mentions location/environment? → Search 'user city', 'user location', 'user timezone'

  3. User asks about preferences? → Search 'user preference', 'user coding preference'

  4. User references past decisions? → Search 'user decision', 'user project choice'

  5. User asks about project context? → Search 'user project framework', 'user project database'

Triggers

  • When starting new tasks (check 'has user worked on this before?')

  • Before giving advice on topics from past sessions

  • When user references something you don't recall

  • After any significant decision or preference is stated

At session start, consider searching 'user preferences', 'project architecture', 'agreed approach' to build context.

Use lower limits (1-3) for specific lookups, higher limits (5-10) for broad context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesNatural language search query (e.g., 'user coding preferences', 'database setup decisions').
user_idNoUser identifier to scope search to specific user.
agent_idNoOptional session filter to find memories from current run.
limitNoMax results (default: 5, increase for broader context).
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It describes retrieval behavior but does not disclose side effects, permissions, or safety profile. It is adequate but not comprehensive.

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

Conciseness2/5

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

The description is overly verbose with extensive bullet points and patterns. While informative, it could be more concise and front-loaded. Many details could be streamlined.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so description should explain return values but does not. It covers usage patterns well but lacks information on result format. Adequate but not fully complete.

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. The description adds practical advice like 'lower limits (1-3) for specific lookups, higher limits (5-10) for broad context' and mentions the default limit, adding 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 'Query stored memories to retrieve relevant context' using a specific verb and resource. It distinguishes itself from sibling tools like add_memory, delete_memory, etc.

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 provides extensive guidelines including triggers, pre-execution recall patterns, proactive search, and limit recommendations. It does not explicitly exclude when not to use, but gives clear usage context.

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/JoeXie/remember-me'

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