Skip to main content
Glama

add_memory

Store a fact, rule, or user preference into the agent's long-term memory. Accepts plain text or raw conversation to infer structured facts, organized by memory type and optional user or agent IDs.

Instructions

Store a memory. Prefer infer=false with a self-contained third-person fact.

memory_type: decision | convention | anti_pattern | user_preference | task_learning | environmental | identity | rule | project
infer=true lets mem0 extract facts from raw conversation; skip for explicit facts.
Never store secrets. Skip small talk, tool dumps, and one-shot commands.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
inferNo
user_idNo
agent_idNo
memory_typeNo
metadata_jsonNo

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

A3.9/5.0
Behavior3/5

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

With no annotations, the description must fully disclose behavior. It explains how infer works (fact extraction vs. explicit input) and warns about content to avoid. However, it omits details like whether the tool is idempotent, what happens on duplicate text, or any authentication/permission requirements. The output schema exists but the description doesn't mention what is returned. This is adequate but not comprehensive.

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: three bullet-pointed sentences plus a list of memory types. Every sentence earns its place – first states purpose, second gives infer guidance, third lists what to avoid. The memory type list is efficiently presented. No filler or repetition.

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 6 parameters (1 required) and no schema descriptions, the description covers the core but not all. It explains text, infer, and memory_type well, but user_id, agent_id, and metadata_json are unaddressed. The output schema exists so return values need not be explained, but the missing parameter semantics reduce completeness. Adequate for basic use but not for full parameter understanding.

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 0% so the description bears the full burden. It explains text (self-contained third-person fact), infer (extraction mode), and lists memory_type options. However, user_id, agent_id, and metadata_json are not described at all. The description adds value for three key parameters but leaves three others undocumented, which is a gap given the lack of schema descriptions.

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 opens with 'Store a memory' – a clear verb+resource pair that immediately identifies the tool's purpose. It distinguishes from sibling tools (update, search, etc.) by its creation focus, and adds context about preferred usage ('Prefer infer=false with a self-contained third-person fact'). This is specific and unambiguous.

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 explicit guidance: when to use infer=false vs infer=true, what memory types are available, and what not to store (secrets, small talk, tool dumps). It implies this tool is for new memories but does not explicitly contrast with update (e.g., 'use update_memory to modify'). Still, the guidance is actionable and reduces misuse.

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