Skip to main content
Glama

search_memories

Find relevant memories by rewriting natural language queries into keywords for semantic matching. Optionally filter by user, agent, or memory type.

Instructions

Semantic search. Rewrite the query to 3-6 keywords matching stored third-person facts.

Do not pass the user's raw message. Drop pronouns and question words.
When useful, run 2-4 parallel searches with memory_type: decision, convention, anti_pattern, or omit for catch-all.
When MEM0_LITE_FEEDBACK_MODE is enabled, responses include ts; rate useful/miss/noise via rate_memory_call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
top_kNo
user_idNo
agent_idNo
memory_typeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description fully discloses critical behaviors: query rewriting requirements, parallel search strategy, memory_type filtering, and post-search rating feedback loop. This surpasses what structured fields alone convey, making the tool's operation highly transparent.

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 5 sentences, each adding unique value: semantic search definition, query rewriting rule, parameter filtering advice, feedback mode instruction. No filler, front-loaded with the core action. Every sentence earns its place.

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 5 parameters (1 required), no annotations, and an output schema exists, the description fully addresses core usage, query preparation, parallel search strategy, and feedback integration. The presence of output schema reduces the need to explain return values, making it complete for a semantic 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?

Schema coverage is 0% (no description in input schema), so the description must compensate. It adds meaning to query (rewrite to 3-6 keywords) and memory_type (decision, convention, anti_pattern, or omit). It does not detail top_k, user_id, or agent_id parameters, leaving some ambiguity, but covers the most critical ones well.

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 explicitly states 'Semantic search' and instructs rewriting queries to 3-6 keywords matching stored third-person facts, distinguishing it from siblings like get_memory_by_id (retrieval by ID) or list_memories (listing without semantic search). It mentions memory_type categories for parallel searches, providing specific verb+resource clarity.

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

Usage Guidelines5/5

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

The description gives clear when-to-use guidance: rewrite query to remove pronouns/question words, run 2-4 parallel searches with specific memory_type values, and when MEM0_LITE_FEEDBACK_MODE is enabled, rate matches via rate_memory_call. This explicitly differentiates from siblings and provides actionable usage rules.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/bdombro/mem0-lite'

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