Skip to main content
Glama
mem0ai

Mem0 MCP Server

Official
by mem0ai

get_memories

Browse and filter stored coding preferences by user, agent, date, or other criteria using structured queries and pagination.

Instructions

Page through memories using filters instead of search.

    Use filters to list specific memories. Common filter patterns:
    - Single user: {"AND": [{"user_id": "john"}]}
    - Agent memories: {"AND": [{"agent_id": "agent_name"}]}
    - Recent memories: {"AND": [{"user_id": "john"}, {"created_at": {"gte": "2024-01-01"}}]}
    - Multiple users: {"AND": [{"user_id": {"in": ["john", "jane"]}}]}

    Pagination: Use page (1-indexed) and page_size for browsing results.
    user_id is automatically added to filters if not provided.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filtersNoStructured filters; user_id injected automatically.
pageNo1-indexed page number when paginating.
page_sizeNoNumber of memories per page (default 10).
enable_graphNoSet true only if the caller explicitly wants graph-derived memories.

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 the full burden of behavioral disclosure. It effectively describes key behaviors: pagination mechanics (page and page_size), automatic user_id injection into filters, and the default page_size of 10. It also mentions the 'enable_graph' parameter's specific use case. However, it doesn't cover potential rate limits, error conditions, or authentication requirements.

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 well-structured and efficiently written. It starts with the core purpose, immediately provides usage guidance with examples, and ends with important behavioral notes. Every sentence serves a clear purpose—there's no redundant or filler content. The bullet-point examples are appropriately formatted for readability without being verbose.

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 the tool's moderate complexity (4 parameters, filter logic), no annotations, but with 100% schema coverage and an output schema present, the description is quite complete. It covers the tool's purpose, usage patterns, key parameters, and important behaviors like automatic user_id injection and pagination. The output schema handles return values, so the description appropriately focuses on input semantics and usage context. Minor gaps include lack of error handling or performance characteristics.

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 description coverage is 100%, so the baseline is 3. The description adds significant value beyond the schema by providing concrete filter pattern examples (e.g., single user, agent memories, recent memories, multiple users) that illustrate the structure and logic of the 'filters' parameter. It also explains the automatic user_id injection behavior and gives context for 'enable_graph'. However, it doesn't elaborate on 'page' and 'page_size' beyond what's in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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: 'Page through memories using filters instead of search.' It specifies the verb ('page through') and resource ('memories'), and distinguishes it from 'search_memories' by emphasizing the filter-based approach. However, it doesn't explicitly contrast with other siblings like 'get_memory' (singular) or 'list_entities'.

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 clear context for when to use this tool: 'Use filters to list specific memories' and contrasts it with search by stating 'instead of search.' It includes practical examples of filter patterns, which implicitly guide usage. However, it doesn't explicitly mention when NOT to use it or name specific alternative tools beyond the general 'search' reference.

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/mem0ai/mem0-mcp'

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