Skip to main content
Glama
mem0ai

Mem0 MCP Server

Official
by mem0ai

add_memory

Store user preferences, facts, or conversation snippets in the Mem0 MCP Server to maintain consistent programming practices and context across sessions.

Instructions

Store a new preference, fact, or conversation snippet. Requires at least one: user_id, agent_id, or run_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesPlain sentence summarizing what to store. Required even if `messages` is provided.
messagesNoStructured conversation history with `role`/`content`. Use when you have multiple turns.
user_idNoOverride the default user scope for this write.
agent_idNoOptional agent identifier.
app_idNoOptional app identifier.
run_idNoOptional run identifier.
metadataNoAttach arbitrary metadata JSON to the memory.
enable_graphNoSet true only if the caller explicitly wants Mem0 graph memory.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.3/5.0
Behavior2/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 of behavioral disclosure. It mentions the requirement for identifiers but lacks details on permissions, rate limits, whether the operation is idempotent, or what happens on success/failure. For a write operation with no annotation coverage, this leaves significant gaps in understanding the tool's behavior.

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 extremely concise with just two sentences that directly convey the core purpose and a key requirement. Every word serves a purpose, and it's front-loaded with the main action, making it efficient and easy to parse.

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?

Given the complexity of 8 parameters, no annotations, but with a rich input schema (100% coverage) and an output schema present, the description is minimally adequate. It covers the basic purpose and a critical requirement but doesn't address behavioral aspects like error handling or performance, leaving room for improvement despite the structured support.

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 all parameters thoroughly. The description adds minimal value by hinting at the identifier requirement but doesn't provide additional semantic context beyond what's in the schema, such as examples or edge cases. This meets the baseline for high schema coverage.

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 action ('Store') and resource type ('preference, fact, or conversation snippet'), making the purpose evident. It doesn't explicitly differentiate from sibling tools like 'update_memory' or 'get_memories', but the verb 'Store a new' implies creation rather than modification or retrieval.

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 some context by specifying that at least one identifier (user_id, agent_id, or run_id) is required, which implies usage when scoping a memory. However, it doesn't explicitly state when to use this tool versus alternatives like 'update_memory' for modifications or 'get_memories' for retrieval, leaving the guidelines somewhat implied rather than explicit.

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