Skip to main content
Glama
arunkumars-mf

mem0-agent-memory

store_memory

Save AI agent memory by storing content with optional metadata, session context, and LLM-based deduplication for persistent knowledge.

Instructions

Store memory content with metadata support.

REQUIRED: Either 'user_id' OR 'agent_id' (if neither provided, auto-detects current user) REQUIRED: 'content' - the information to remember

OPTIONAL: 'metadata' - structured data about the memory (JSON object) OPTIONAL: 'infer' - if True (default), uses LLM to extract facts and dedupe. Set False for faster raw storage. OPTIONAL: 'run_id' - session/run identifier for temporary context OPTIONAL: 'custom_instructions' - per-call instructions to control what gets stored OPTIONAL: 'verbose' - if True, return full details. If False (default), return compact response.

Examples:

  • Store personal info: {"content": "User prefers React over Vue", "user_id": "john"}

  • Store with metadata: {"content": "API endpoint changed", "metadata": {"type": "technical", "priority": "high"}}

  • Fast storage (no LLM): {"content": "Quick note", "infer": false}

  • Session-scoped: {"content": "Current task context", "run_id": "session_123"}

Use for: Storing code patterns, user preferences, project details, technical knowledge.

Note: With infer=True (default), mem0 uses an LLM to extract key facts and intelligently update existing memories. This is slower (~5-15s) but smarter. Use infer=False for faster raw storage (~1-2s) without deduplication.

Config: Set MEM0_INFER_DEFAULT=false in env to disable infer by default. Config: Set MEM0_VERBOSE=true in env to enable verbose responses by default.

Returns: Success message with memory ID (compact) or full details (verbose).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inferNo
run_idNo
contentYes
user_idNo
verboseNo
agent_idNo
metadataNo
custom_instructionsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

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

  1. First observedv1.3.2

TDQS

A4.8/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 burden, and it delivers. It discloses auto-detection of user/agent when neither is supplied, LLM-based fact extraction and deduplication behavior, expected latency differences (5-15s vs 1-2s), environment configuration defaults, and return-behavior compact vs verbose. This is rich, non-obvious behavioral context.

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?

Despite covering eight parameters plus examples and configs, the description is organized with clear REQUIRED/OPTIONAL sections, examples, use-case guidance, and notes. Every section earns its place; no filler or repeated schema metadata.

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 a high-parameter tool, zero schema descriptions, and no annotations, the description is remarkably complete. It covers parameter semantics, edge-case behavior, configuration, performance tradeoffs, and return values, leaving an agent with everything needed to invoke the tool correctly.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate for all 8 parameters, and it does. It explains the conditional user_id/agent_id requirement, content as required, metadata as a JSON object, infer and verbose booleans, run_id for session scoping, and custom_instructions for per-call control, supplemented with concrete input examples.

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?

Description opens with a specific verb and resource: 'Store memory content with metadata support.' It explicitly lists use cases ('storing code patterns, user preferences, project details, technical knowledge'), clearly distinguishing the write-focused intent from the many retrieval/manipulation sibling tools such as search_memories, get_memory, and delete_memory.

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 gives concrete when-to-use context with examples and a 'Use for' list, and it explains the infer=True vs infer=False tradeoff. It does not explicitly name alternatives or when-not-to-use conditions, but the context is strong enough for an agent to select this tool for storing rather than retrieving or deleting memories.

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/arunkumars-mf/mem0-agent-memory'

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