Skip to main content
Glama

Mem0 Cloud

Search your stored memories by meaning, like mem0's search

search_memories

Search your stored memories by meaning, like mem0's search: embeds the query and returns the closest memories with a relevance score from 0 to 1. Only memories stored under the same memory_key (your secret string; required) are searched. filters must name at least one of user_id, agent_id, app_id, run_id. Returns {results:[{id, memory, score, metadata, ...}]}. Price: $0.004 a call (3 free calls a day without an API key).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesWhat to look for, in natural language (up to 500 characters)
top_kNoHow many memories to return, 1-100 (default 10)
filtersYesmem0 filters: at least one of user_id, agent_id, app_id, run_id, each a string, "*" or {"in": [up to 20 strings]}; AND lists of those. OR and NOT are not supported.
thresholdNoMinimum relevance score, 0-1 (default 0.1; 0 disables)
memory_keyYesYour secret: a random string of 16-256 characters that you generate once and keep (also accepted as the X-Memory-Key header). Memories are stored and searched only under its hash, so nobody who lacks it can read them, whatever user_id they send. Lose it and the memories are unreachable.
show_expiredNoInclude memories whose expiration_date has passed (default false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full behavioral burden and does well: it discloses the embedding mechanism, the 0-1 relevance score range, the memory_key isolation guarantee, filter constraints, a pricing/free-tier note, and the return shape. This is exactly the extra context an agent needs for a paid, isolation-scoped search.

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?

Four compact sentences front-loaded with purpose, then scope, then constraints, then price. Dense but every clause carries weight; the mem0 framing verges on filler.

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 no output schema, the description helpfully sketches the return shape and covers cost, scoping, and filter rules. Minor gap: pagination/behavior on empty results is unstated, but for a 6-param tool this is close to complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents every parameter in detail; the baseline is 3. The description reinforces required memory_key and the filters constraint but adds no syntax or defaults 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?

State a specific verb (search) and resource (stored memories via semantic similarity), and the analogy to mem0 plus 'by meaning' distinguishes it from the literal retrieval implied by siblings like get_memories.

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?

Clearly frames this as the semantic search path and names the memory_key scoping constraint and filters requirement, which implicitly routes the agent away from get_memories. It does not explicitly name when to prefer siblings, keeping it just below a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources