mem0-mcp-selfhosted
A self-hosted persistent memory MCP server for Claude Code that stores, searches, and manages memories across sessions using Qdrant (vector store), Neo4j (knowledge graph), and Ollama/Anthropic (LLMs).
Core Memory Operations
Add memories (
add_memory): Save text or conversation history with LLM-based fact extraction (async) or raw storage (sync); supports metadata, graph extraction, and user/agent/run scopingSearch memories (
search_memories): Semantic vector search with reranking, relevance thresholds, temporal anchoring (as_of), and domain/type filteringBrowse/fetch memories (
get_memories,get_memory): Page through all memories by scope or retrieve a specific memory by UUIDUpdate/delete memories (
update_memory,delete_memory,delete_all_memories): Modify or remove individual or bulk memories within a scope
Document Ingestion
Ingest PDFs and images (
add_document): Async extraction from digital/scanned PDFs and images (via OCR/vision), with page-level provenance chunking, fact extraction, and duplicate detection
Async Queue Management
Task status (
memory_task_status): Poll progress of queued ingestion tasks (pending, processing, done, failed, dead)Queue health (
memory_queue_status): View queue depth, worker liveness, and estimated drain time
Memory History & Provenance
Change history (
memory_history): Full timeline of ADD, UPDATE, SUPERSEDED, and DELETE events for any memory
Entity Management
List/delete entities (
list_entities,delete_entities): Discover users/agents/runs with stored memories; cascade-delete an entity and all associated memories
Knowledge Graph (Neo4j)
Search graph (
mcp_search_graph): Find entities by name/ID with their outgoing relationshipsGet entity relationships (
mcp_get_entity): Retrieve all bidirectional relationships for a named entity
Session Automation
Claude Code hooks automatically inject relevant memories at session start and save session summaries at session end
Flexibility
Supports fully local setups (Ollama for LLM + embeddings) or cloud (Anthropic/Gemini); Neo4j is optional; extensive environment variable configuration
Allows using Google's Gemini API for knowledge graph extraction and splitting in the memory system.
Integrates with Neo4j as a knowledge graph store for entity relationships, enabling graph-based memory features.
Enables fully local operation with Ollama for both embeddings (e.g., bge-m3) and as the main LLM, providing privacy and offline capabilities.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mem0-mcp-selfhostedRemember that I use Hatch for Python packaging"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mem0-mcp-selfhosted
Self-hosted mem0 MCP server for Claude Code. Run a complete memory server against self-hosted Qdrant + Neo4j + Ollama, with your choice of Anthropic (Claude) or Ollama as the main LLM.
Uses the mem0ai package directly as a library, supports both Claude's OAT token and fully local Ollama setups, and exposes 11 MCP tools for full memory management.
Prerequisites
Service | Required | Purpose |
Qdrant | Yes | Vector memory storage and search |
Ollama | Yes | Embedding generation ( |
Neo4j 5+ | Optional | Knowledge graph (entity relationships) |
Google API Key | Optional | Required only for |
Python >= 3.10 and uv.
Authentication: The default setup uses Claude (Anthropic) as the LLM for fact extraction. No API key needed, the server automatically uses your Claude Code session token. For fully local setups, set
MEM0_PROVIDER=ollama. See Authentication for advanced options.
Related MCP server: Recall
Quick Start
Default (Anthropic)
Add the MCP server globally (available across all projects):
claude mcp add --scope user --transport stdio mem0 \
--env MEM0_USER_ID=your-user-id \
-- uvx --from git+https://github.com/elvismdev/mem0-mcp-selfhosted.git mem0-mcp-selfhostedAll defaults work out of the box: Qdrant on localhost:6333, Ollama embeddings on localhost:11434 with bge-m3 (1024 dims). Override any default via --env (see Configuration).
uvx automatically downloads, installs, and runs the server in an isolated environment, no manual installation needed. Claude Code launches it on demand when the MCP connection starts.
The server auto-reads your OAT token from ~/.claude/.credentials.json, no manual token configuration needed.
Fully Local (Ollama)
For a fully local setup with no cloud dependencies, use Ollama for both the main LLM and embeddings:
claude mcp add --scope user --transport stdio mem0 \
--env MEM0_PROVIDER=ollama \
--env MEM0_LLM_MODEL=qwen3:14b \
--env MEM0_USER_ID=your-user-id \
-- uvx --from git+https://github.com/elvismdev/mem0-mcp-selfhosted.git mem0-mcp-selfhostedMEM0_PROVIDER=ollama cascades to both the main LLM and graph LLM providers. Same infrastructure defaults apply (Qdrant on localhost:6333, bge-m3 embeddings). Per-service overrides (e.g. MEM0_LLM_URL, MEM0_EMBED_URL) still work when needed.
Or add it to a single project by creating .mcp.json in the project root:
{
"mcpServers": {
"mem0": {
"command": "uvx",
"args": ["--from", "git+https://github.com/elvismdev/mem0-mcp-selfhosted.git", "mem0-mcp-selfhosted"],
"env": {
"MEM0_PROVIDER": "ollama",
"MEM0_LLM_MODEL": "qwen3:14b",
"MEM0_USER_ID": "your-user-id"
}
}
}
}Try It
Restart Claude Code, then:
> Search my memories for TypeScript preferences
> Remember that I prefer Hatch for Python packaging
> Show me all entities in my knowledge graphCLAUDE.md Integration
Add these rules to your project's CLAUDE.md (or ~/.claude/CLAUDE.md for global use) so Claude Code proactively uses memory tools throughout the session:
# MCP Servers
- **mem0**: Persistent memory across sessions. At the start of each session, `search_memories` for relevant context before asking the user to re-explain anything. Use `add_memory` whenever you discover project architecture, coding conventions, debugging insights, key decisions, or user preferences. Use `update_memory` when prior context changes. Save information like: "This project uses PostgreSQL with Prisma", "Tests run with pytest -v", "Auth uses JWT validated in middleware". When in doubt, save it, future sessions benefit from over-remembering.This gives Claude Code behavioral instructions to actively search and save memories during the session. For best results, combine with Claude Code Hooks, the CLAUDE.md rules tell Claude how to use memory tools mid-session, while hooks handle the automatic injection and saving at session boundaries.
Claude Code Hooks
Session hooks automate memory at session boundaries, injecting memories on startup and saving summaries on exit. This happens automatically without manual tool calls.
Hook | Event | What it does |
| SessionStart ( | Searches mem0 for project-relevant memories and injects them as |
| Stop | Reads the last ~3 user/assistant exchanges from the transcript and saves a summary to mem0 via |
Both hooks are non-fatal, if mem0 is unreachable or any error occurs, Claude Code continues normally.
Install
Install hooks into your project:
mem0-install-hooksOr install globally (all projects):
mem0-install-hooks --globalThis adds the hook entries to .claude/settings.json. The installer is idempotent, running it twice won't create duplicates.
How it works
On session start, the context hook searches mem0 with two queries (project architecture + recent session summaries), deduplicates by memory ID, and formats the results as numbered lines under a # mem0 Cross-Session Memory header. These are injected via the hook's additionalContext response field.
On session stop, the stop hook reads the JSONL transcript, extracts the last 6 user/assistant messages (a sliding window via bounded deque), builds a summary prompt, and calls memory.add(infer=True) to extract atomic facts. Graph is force-disabled in hooks to stay within the 15s/30s timeout budgets.
Entry points
Command | Function | Registered in |
|
| SessionStart hook |
|
| Stop hook |
|
| CLI installer |
Hooks + CLAUDE.md
Hooks and CLAUDE.md are complementary layers that work best together:
Layer | Role | When |
Hooks | Automated data flow, injects stored memories on startup, saves session summaries on exit | Session boundaries (start/stop) |
CLAUDE.md | Behavioral instructions, tells Claude to actively search and save memories during the session | Throughout the session |
Hooks alone give you passive recall (memories appear at startup) and passive saving (summaries saved at exit). CLAUDE.md instructions add active mid-session behavior, Claude searches for relevant memories when encountering new topics, and saves important discoveries immediately rather than waiting for session end.
For the best experience, use both. Hooks ensure memories flow in and out automatically at session boundaries, while CLAUDE.md ensures Claude actively engages with memory tools during the session.
Authentication
The server resolves an Anthropic token using a prioritized fallback chain:
Priority | Source | Details |
1 |
| Explicit, user-controlled |
2 |
| Auto-reads Claude Code's OAT token (zero-config) |
3 |
| Standard pay-per-use API key |
4 | Disabled | Warns and disables Anthropic LLM features |
In Claude Code, priority 2 always wins, the credentials file exists as long as you're logged in. This means ANTHROPIC_API_KEY (priority 3) is never reached. To override the OAT token in Claude Code, use MEM0_ANTHROPIC_TOKEN (priority 1). ANTHROPIC_API_KEY is only useful for non-Claude-Code deployments (Docker, CI, standalone).
OAT tokens (sk-ant-oat...) use your Claude subscription. The server automatically detects the token type and configures the SDK accordingly. OAT tokens are automatically refreshed before expiry: the server proactively checks the token lifetime and refreshes via the Anthropic OAuth endpoint when nearing expiry (default: 30 minutes). On authentication failures, a 3-step defensive strategy kicks in, piggybacking on Claude Code's credentials file, self-refreshing via OAuth, and wait-and-retry, so long-running sessions survive token rotation seamlessly.
API keys (sk-ant-api...) use standard pay-per-use billing.
Tools
Memory Tools (9 core)
Tool | Description |
| Store text or conversation history as memories. Supports |
| Semantic search with optional |
| List/filter memories (non-search). Supports |
| Fetch a single memory by UUID. |
| Replace memory text. Re-embeds and re-indexes in Qdrant. |
| Delete a single memory by UUID. |
| Bulk-delete all memories in a scope. |
| List users/agents/runs with memory counts. Uses Qdrant Facet API. |
| Cascade-delete an entity and all its memories. |
Graph Tools
Tool | Description |
| Search Neo4j entities by name substring. Returns entities + outgoing relationships. |
| Get all relationships for an entity (bidirectional: incoming + outgoing). |
Prompt
The server registers a memory_assistant MCP prompt that provides Claude with a quick-start guide for using the memory tools effectively.
Parameters
All tools use Pydantic Annotated[type, Field(description=...)] for self-documenting parameter schemas. Common patterns:
user_iddefaults toMEM0_USER_IDenv var when not providedenable_graphoverrides the defaultMEM0_ENABLE_GRAPHper-callfilterssupports structured operators:{"key": {"eq": "value"}},{"AND": [...]}All responses are JSON strings via
json.dumps(result, ensure_ascii=False)
Configuration
All configuration is via environment variables. Create a .env file or set them in your MCP config.
Authentication
Variable | Default | Description |
| -- | Anthropic OAT or API token (priority 1) |
| -- | Standard Anthropic API key (priority 3) |
|
| OAT identity headers: |
|
| Seconds before expiry to trigger proactive OAT token refresh |
LLM
Variable | Default | Description |
|
| Top-level provider ( |
| (MEM0_PROVIDER) | Main LLM provider: |
|
| Shared Ollama base URL. Cascades to |
| (per-provider) | Model for the selected LLM provider. Defaults to |
| (cascades) | Ollama base URL for the main LLM. Cascades: |
|
| Max tokens for LLM responses (Anthropic only) |
| (MEM0_PROVIDER) | Graph LLM provider ( |
| (cascades) | Ollama base URL for graph LLM. Cascades: |
| (varies) | Graph model. Inherits |
| -- | Google API key (required for |
|
| Contradiction LLM provider in |
| (provider-aware) | Contradiction model in |
|
| How long Ollama keeps the model in VRAM between calls (e.g., |
|
| Set to |
Embedder
Variable | Default | Description |
|
| Embedding provider ( |
|
| Embedding model name |
| (cascades) | Ollama URL for embeddings. Cascades: |
|
| Embedding vector dimensions |
Vector Store (Qdrant)
Variable | Default | Description |
|
| Qdrant REST API URL |
| -- | Qdrant API key (for Qdrant Cloud) |
|
| Store vectors on disk (reduces RAM, slower search) |
| (client default) | Qdrant REST API timeout in seconds (e.g., |
|
| Qdrant collection name |
Graph Store (Neo4j)
Variable | Default | Description |
|
| Enable graph memory (entity extraction to Neo4j) |
|
| Neo4j Bolt endpoint |
|
| Neo4j username |
|
| Neo4j password |
| -- | Neo4j database name (multi-database setups) |
| -- | Custom Neo4j base label for node type grouping |
|
| Embedding similarity threshold for node matching |
Server
Variable | Default | Description |
|
| Transport: |
|
| Host for SSE/HTTP transports |
|
| Port for SSE/HTTP transports |
|
| Default user ID for memory scoping |
|
| Logging level ( |
| -- | SQLite path for memory change history |
Architecture
Claude Code
|
├── MCP stdio/SSE/streamable-http
│ |
│ ├── env.py ← Centralized env var readers (whitespace-safe)
│ ├── auth.py ← Hybrid token fallback chain + OAT self-refresh
│ ├── llm_anthropic.py ← Custom Anthropic LLM provider (OAT + structured outputs)
│ ├── llm_ollama.py ← Custom Ollama LLM provider (restored tool-calling)
│ ├── config.py ← Env vars → MemoryConfig dict (provider + URL cascades)
│ ├── helpers.py ← Error wrapper, concurrency lock, safe bulk-delete, monkey-patches
│ ├── graph_tools.py ← Direct Neo4j Cypher queries (lazy driver)
│ ├── llm_router.py ← Split-model graph LLM router (gemini_split)
│ ├── __init__.py ← Telemetry suppression (before any mem0 import)
│ └── server.py ← FastMCP orchestrator (11 tools + prompt)
│ |
│ ├── mem0ai Memory class
│ │ ├── Vector: LLM fact extraction → Ollama embed → Qdrant
│ │ └── Graph: LLM entity extraction (tool calls) → Neo4j
│ |
│ └── Infrastructure
│ ├── Qdrant ← Vector store
│ ├── Ollama ← Embeddings
│ ├── Neo4j ← Knowledge graph (optional)
│ └── Anthropic/Ollama ← Main LLM (configurable)
|
└── Session Hooks (subprocess, not MCP)
|
└── hooks.py ← Cross-session memory (SessionStart + Stop hooks)
├── context_main() → Injects memories as additionalContext on startup/compact
├── stop_main() → Saves session summary to mem0 on exit
└── install_main() → CLI to patch .claude/settings.jsonGraph Memory & Quota
Graph memory is disabled by default (MEM0_ENABLE_GRAPH=false) to protect your Claude quota. Each add_memory with graph enabled triggers 3 additional LLM calls for entity extraction, relationship generation, and conflict resolution.
Using Ollama for Graph Operations
To eliminate Claude quota usage for graph ops, use a local Ollama model:
MEM0_ENABLE_GRAPH=true
MEM0_GRAPH_LLM_PROVIDER=ollama
MEM0_GRAPH_LLM_MODEL=qwen3:14bQwen3:14b has 0.971 tool-calling F1 (nearly matching GPT-4's 0.974) and runs in ~7-8GB VRAM with Q4_K_M quantization.
Using Gemini for Graph Operations
Google's Gemini 2.5 Flash Lite is the cheapest option for graph ops while maintaining strong entity extraction accuracy:
MEM0_ENABLE_GRAPH=true
MEM0_GRAPH_LLM_PROVIDER=gemini
MEM0_GRAPH_LLM_MODEL=gemini-2.5-flash-lite
GOOGLE_API_KEY=your-google-api-keyUsing Split-Model for Best Accuracy
The gemini_split provider routes graph pipeline calls to different LLMs based on the operation. Entity extraction (Calls 1 & 2) goes to Gemini for speed and cost; contradiction detection (Call 3) goes to Claude for accuracy.
MEM0_ENABLE_GRAPH=true
MEM0_GRAPH_LLM_PROVIDER=gemini_split
GOOGLE_API_KEY=your-google-api-key
MEM0_GRAPH_CONTRADICTION_LLM_PROVIDER=anthropic
MEM0_GRAPH_CONTRADICTION_LLM_MODEL=claude-opus-4-6Benchmark results across 248 test cases: Gemini scores 85.4% on entity extraction (vs Claude's 79.1%), while Claude scores 100% on contradiction detection (vs Gemini's 80%). The split-model combines the best of both.
Transport Modes
Mode | Use Case | Config |
| Claude Code integration |
|
| Legacy remote clients |
|
| Modern remote clients |
|
For remote deployments, MCP SDK >= 1.23.0 enables DNS rebinding protection by default.
DeepMem0 Vault — client authentication
Anything that can reach streamable-http can read every memory. The vault is a
companion service that issues bearer tokens for the MCP and gives an admin a UI
to manage them.
UI admin (deepmem0-vault, :8080) ──writes──┐
├── vault.db (SQLite WAL, one absolute path)
MCP (:8081) ── BearerTokenMiddleware ───────┘ (verify + touch)Kill switch — MEM0_REQUIRE_AUTH:
Mode | Behavior |
| Delegates without opening the vault. Today's behavior, byte for byte. |
| Verifies every request, touches |
| Unauthorized requests get |
A typo (MEM0_REQUIRE_AUTH=true) raises at boot instead of silently disabling auth.
Setup:
pip install -e ".[vault]" # UI deps; the gate itself needs none
export VAULT_SECRET_KEY=$(python -c 'import secrets; print(secrets.token_urlsafe(48))')
export MEM0_VAULT_DB_PATH=~/.mem0/vault.db # same path in both services
deepmem0-vault bootstrap-admin # explicit, idempotent, never at boot
deepmem0-vault # serve the UI on :8080Then create a user, issue a token, and point a client at it:
claude mcp add --transport http deepmem0 http://localhost:8081/mcp \
--header "Authorization: Bearer dm0_..."Rules that are enforced, not documented: the plaintext token appears in
exactly one HTTP response and is never stored (only sha256 + a 12-char
prefix); every mutation and its audit row share one transaction; rotation
issues a successor and leaves the old token alive for a grace window
(VAULT_TOKEN_GRACE_HOURS, default 24) instead of causing an outage; revocation
applies to new requests, and every MCP tool call is a new request.
Promote shadow → on on positive evidence, and let the vault decide:
deepmem0-vault promotion-check --window-hours 72 # exit 0 = ready, 1 = notEvery ACTIVE token is the inventory — no separate list to keep in sync. The
check is ready only when each of them authorized inside the window AND no
request was denied. Silence is not evidence: a token nobody used is
indistinguishable from a client that would start taking 401s. The same readout
is a panel on the dashboard. Both read durable counters (tokens.use_count,
the auth_denials table), not throttled log lines that vanish on restart.
Per-tool authorization. Tokens carry an optional mem0_user_id. When set,
every one of the 15 tools consults it, under a policy declared in
TOOL_SCOPE_POLICY and enforced by a completeness test (tool #16 cannot ship
without a decision):
Policy | Tools | With a bound token |
| add_memory, add_document, search_memories, get_memories, delete_all_memories, delete_entities | the binding wins; a different |
| get_memory, memory_history, update_memory, delete_memory, memory_task_status | the record's owner decides; someone else's id and a nonexistent id give the same answer |
| list_entities | the enumeration is narrowed to the bound scope |
| memory_queue_status, mcp_search_graph, mcp_get_entity | refused — they report on the whole server |
Sessions are bound to the credential that opened them, so a leaked MCP session
id cannot be reused by a different token. Every token issued today has an empty
mem0_user_id, so all of this is inert until you bind one.
Development
# Install with dev dependencies
pip install -e ".[dev]"
# Run unit tests
python3 -m pytest tests/unit/ -v
# Run contract tests (validates mem0ai internal API assumptions)
python3 -m pytest tests/contract/ -v
# Run integration tests (requires live Qdrant + Neo4j + Ollama)
python3 -m pytest tests/integration/ -v
# Run all tests
python3 -m pytest tests/ -vTest Structure
tests/unit/-- Pure unit tests with mocked dependencies (env, auth, config, config matrix, concurrency, MCP protocol, helpers, hooks, LLM providers, graph tools, LLM router, server)tests/contract/-- Validates assumptions about mem0ai internals (schema detection invariant,vector_store.clientaccess path,LlmFactoryregistration idempotency)tests/integration/-- Live infrastructure tests (memory lifecycle, graph ops, bulk operations, hooks) against real Qdrant + Neo4j + Ollama. Marked with@pytest.mark.integration.
Contract tests catch breaking changes in mem0ai upgrades before they reach production.
Telemetry
All mem0ai telemetry is suppressed. os.environ["MEM0_TELEMETRY"] = "false" is set at package import time, before any mem0 module is loaded. No PostHog events are sent.
License
MIT
Available Tools
15 toolsadd_documentA
Ingest a PDF or image asynchronously: extract text per page (digital PDF via poppler; scanned pages and images via a local vision model), chunk, and extract memorable facts with document/page provenance.
Returns immediately with {"status": "queued", task_id, pages,
chunks_estimate, estimated_wait_s} — a large document takes many
minutes; poll memory_task_status(task_id) for chunks_done progress and
the final memory_ids. Re-submitting the same file returns
{"status": "already_ingested"} unless force=true. There is NO
synchronous fallback: if the queue is unavailable the call errors.
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Re-ingest even if this exact document (same bytes + scope) was already ingested. | |
| infer | No | If true (default), the LLM extracts facts from each chunk; if false, raw chunks are stored as-is. | |
| run_id | No | Run scope identifier. | |
| user_id | No | User scope identifier. Defaults to MEM0_USER_ID. | |
| agent_id | No | Agent scope identifier. | |
| filename | No | Display name stored as source_doc provenance. Defaults to the file's basename. | |
| metadata | No | Extra metadata stored on every memory extracted from this document. | |
| file_path | Yes | Absolute path on the server host (must live under MEM0_DOC_PATH_ALLOWLIST, default $HOME) of a PDF or an image (PNG/JPEG). Scanned PDFs and images need vision on (MEM0_ENABLE_VISION). | |
| enable_graph | No | Graph extraction per chunk. Defaults to FALSE for documents (expensive and noisy). |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description fully discloses behavior: asynchronous operation, immediate return with status, polling mechanism, deduplication logic, error conditions (queue unavailable), and technical details of text extraction (poppler, vision model).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise (4-5 sentences) and front-loaded with the purpose. However, it includes some implementation details (poppler, vision model) that may not be essential for tool selection.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (9 parameters, async, polling, dedup), and absence of annotations and output schema (though return format is described), the description is complete. It covers inputs, process, response, polling, duplicate handling, and failure modes.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, so the description adds minimal meaning beyond what the schema already provides. It mentions 'force=true' and 'file_path' but does not elaborate on other parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: ingest PDF or image, extract text per page, chunk, and extract facts. It specifies the types of inputs (PDF/image) and distinguishes from sibling tools like add_memory by focusing on document ingestion.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context on how to use the tool (asynchronous, poll results, handle duplicates) and mentions no synchronous fallback. However, it does not explicitly compare with sibling tools or specify when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
add_memoryA
Store a new memory. Requires at least one of user_id, agent_id, or run_id.
Response contract (never a bare list):
- {"status": "queued", "task_id", "submitted_at", "queue_depth", "estimated_wait_s"}
— infer=true path; extraction runs in background, poll memory_task_status.
- {"status": "stored", "memory_ids": [...], "results": [...]}
— synchronous path; empty memory_ids carries "reason": "no_new_facts".
- {"error": ...} — failure.
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text to store as a memory. Converted to messages format internally. | |
| infer | No | If true (default), LLM extracts key facts asynchronously: the call returns a queued envelope with a task_id immediately (use memory_task_status to fetch the resulting memory_ids). If false, stores raw text synchronously. | |
| run_id | No | Run scope identifier. | |
| user_id | No | User scope identifier. Defaults to MEM0_USER_ID. | |
| agent_id | No | Agent scope identifier. | |
| messages | No | Structured conversation history (role/content dicts). When provided, takes precedence over text. | |
| metadata | No | Arbitrary metadata JSON to store alongside the memory. | |
| enable_graph | No | Override default graph toggle for this call. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description fully discloses the two execution paths and the exact response contracts for each. It covers both success and error cases. While it lacks details on authentication or rate limits, it provides essential behavioral context for an AI agent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise, front-loaded with the action, and uses a clear bullet-like structure for the response contract. Every sentence provides necessary information without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (8 parameters, 1 required) and the presence of an output schema described inline, the description covers the main behavior, response contracts, and a key prerequisite. It does not elaborate on edge cases like conflicting text and messages, but the schema addresses that. Overall, it is sufficiently complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds value by explicitly stating the constraint that at least one of user_id, agent_id, or run_id is required, which is not present in individual parameter descriptions. This enhances parameter semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Store a new memory', specifying the action and resource. It adds a prerequisite about required identifiers. While it distinguishes from siblings like 'delete_memory' or 'get_memories', it does not explicitly contrast with 'add_document', but the purpose is clear enough.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains when to use the async vs sync path based on the 'infer' parameter and how to poll for async results. It gives a prerequisite (one of user_id, agent_id, run_id). However, it does not provide exclusions for when not to use this tool compared to alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_all_memoriesA
Bulk-delete all memories in the given scope. Requires at least one filter.
NEVER calls memory.delete_all() — uses safe bulk-delete instead.
| Name | Required | Description | Default |
|---|---|---|---|
| run_id | No | Run scope to delete. | |
| user_id | No | User scope to delete. | |
| agent_id | No | Agent scope to delete. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses that the tool does not call raw delete_all but uses a safe bulk-delete, implying safety. However, it omits details on destructiveness, reversibility, or auth needs, which are important for a deletion tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is highly concise: two sentences that front-load the purpose and key constraint (requires filter). Every sentence earns its place with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
While the description covers purpose and filter requirement, it lacks return value information. There is no output schema to compensate, so the agent is left guessing about what the tool returns (e.g., count, confirmation). For a bulk deletion tool, this is a notable gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with clear descriptions for each parameter (run_id, user_id, agent_id). The description adds no additional meaning beyond the schema, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Bulk-delete') and resource ('all memories in the given scope'). It distinguishes from siblings like 'delete_memory' by specifying bulk operation and requiring a filter.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says 'Requires at least one filter,' providing clear usage context. It also notes the safe bulk-delete implementation, but does not explicitly mention alternatives like 'delete_memory' for single deletions or when not to use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_entitiesA
Delete an entity and cascade-delete all its memories.
Functionally equivalent to delete_all_memories in self-hosted mode.
| Name | Required | Description | Default |
|---|---|---|---|
| run_id | No | Run entity to delete. | |
| user_id | No | User entity to delete (cascades to all memories). | |
| agent_id | No | Agent entity to delete. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses cascade-deletion behavior, but does not mention irreversibility, required permissions, or error states. The description is adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences with no fluff. The first states the core action, the second provides helpful context. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description and schema together cover the basic delete behavior, but they do not specify that exactly one entity identifier must be provided. Given the absence of required parameters, this is a notable gap. An output schema exists but its contents are not visible.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already describes each parameter. The description adds 'cascade-delete all its memories' but this is implicitly clear from the schema. No additional semantic value beyond what the schema provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'delete' and resource 'entity', and specifies cascade-deletion of memories. It also distinguishes itself by noting functional equivalence to delete_all_memories, differentiating from sibling tools that delete single memories.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions equivalence to delete_all_memories but does not explicitly guide when to use this tool versus alternatives like delete_memory or delete_all_memories. It lacks explicit when-to-use or when-not-to-use instructions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_memoryB
Delete a single memory.
| Name | Required | Description | Default |
|---|---|---|---|
| memory_id | Yes | Exact memory UUID to delete. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden but only states the destructive action. No details on permissions, reversibility, or side effects are provided.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Extremely concise at 4 words, front-loaded with the action, and no wasted text. Appropriate for a simple tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a straightforward delete tool with one parameter and an output schema, the description covers the basic purpose. However, it lacks any additional context such as requirements or limitations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% for the single parameter, but the description adds no extra meaning beyond the schema's 'Exact memory UUID to delete.' Baseline 3 is appropriate as the description does not enhance parameter understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Delete a single memory' uses a specific verb and resource, clearly distinguishing from sibling tools like delete_all_memories.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives such as delete_all_memories or delete_entities. The description lacks context for usage decisions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_memoriesA
Page through memories using filters instead of search.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of memories to return. | |
| run_id | No | Run scope. | |
| user_id | No | User scope. Defaults to MEM0_USER_ID. | |
| agent_id | No | Agent scope. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It implies a read operation but does not disclose pagination mechanics, ordering, rate limits, or any side effects. The behavioral disclosure is minimal.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single 8-word sentence that is front-loaded and contains no wasted words, perfectly concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Output schema exists, so return values are covered. The description addresses the core purpose but omits details like pagination requiring multiple calls, default limits, or sorting. It is minimally complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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. The description adds only the high-level hint 'using filters', providing no extra meaning. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Page through memories using filters instead of search' clearly specifies the verb ('page through'), resource ('memories'), and contrasts with the sibling tool 'search_memories', making the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states 'instead of search', guiding the agent to use this tool when filtering rather than full-text searching. It gives clear context but does not explicitly list when not to use or describe prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_memoryB
Fetch a single memory by its ID.
| Name | Required | Description | Default |
|---|---|---|---|
| memory_id | Yes | Exact memory UUID to fetch. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, and description only says 'fetch', implying read-only but omitting behaviors like error handling, return format, or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Very concise single sentence, but it lacks necessary context; conciseness is achieved at the expense of completeness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite simple tool (1 parameter, output schema exists), description misses usage context and behavioral details, making it incomplete for effective agent use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with description 'Exact memory UUID to fetch'; description adds 'by its ID' but that's redundant, not adding value beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the verb 'fetch', resource 'a single memory', and method 'by its ID', distinguishing it from siblings like get_memories and search_memories.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like search_memories or when not to use it; usage is only implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_entitiesB
List which users/agents/runs currently hold memories.
Uses Qdrant Facet API (v1.12+) for server-side aggregation, with scroll+dedupe fallback for older versions.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description provides some behavioral context: it uses server-side aggregation with fallback for older versions. However, it doesn't disclose read-only nature, performance implications, or what 'holds memories' entails.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise (two sentences) and front-loads the primary purpose. The technical detail about Qdrant is somewhat jargon-heavy but not excessive. No wasted sentences.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no parameters and an output schema exists, the description is adequate but lacks context about what 'holds memories' means, the scope of the list, or any constraints. It could be more complete for a tool with many siblings.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has no parameters and 100% coverage trivially, so baseline is 3. The description adds no parameter information beyond the schema, which is acceptable since there are no parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists which users/agents/runs hold memories. It uses a specific verb and resource, but doesn't explicitly differentiate from sibling list tools like get_memories or search_memories.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. The description mentions implementation details (Qdrant API) but doesn't help the agent decide when to invoke list_entities over other list/search tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mcp_get_entityA
Get all relationships for a specific entity (bidirectional).
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Exact entity name to look up. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavioral traits. It mentions 'bidirectional', which is useful, but does not clarify if the operation is read-only, requires authentication, has limits, or how the result is structured. Basic transparency but incomplete.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that is front-loaded and purposeful. While very concise, it could be slightly expanded with minimal additional detail without sacrificing structure.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of an output schema (from context signals), the description does not need to detail return values. For a one-parameter tool with simple behavior, the description adequately covers the functionality, though some users might want more detail about the bidirectional aspect.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, and the schema already describes the 'name' parameter as 'Exact entity name to look up.' The description adds no additional semantic value beyond what the schema provides, so baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Get all relationships for a specific entity (bidirectional).' It uses a specific verb ('Get') and resource ('relationships for a specific entity'), and highlights bidirectional behavior, distinguishing it from sibling tools like mcp_search_graph.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when needing all relationships of an entity, but does not explicitly state when to use this tool versus alternatives (e.g., mcp_search_graph) or provide exclusions or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mcp_search_graphA
Search entities by name/id substring matching in Neo4j knowledge graph.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Entity or topic to search for (e.g., 'Python', 'TypeScript'). |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears full responsibility for behavioral disclosure. It mentions 'substring matching' but omits critical details like case sensitivity, scope of search (e.g., nodes/relationships), and whether the tool is read-only. This leaves the agent uncertain about behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no redundant words. It is front-loaded and efficient, earning its place with specific verb and resource.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple (one parameter, output schema exists), but the description does not clarify the substring matching behavior or what entity types are searched. The output schema exists but the agent might benefit from knowing the matching semantics. Overall adequate but has gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% for the single parameter 'query', and the description adds minimal extra meaning beyond the schema's description. It does not provide format, length limits, or examples beyond the schema. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool searches entities by name/id substring matching in a Neo4j knowledge graph. It uses a specific verb ('search') and resource ('entities'), and distinguishes from siblings like 'search_memories' (searches memories) and 'mcp_get_entity' (likely gets a specific entity).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no explicit when-to-use or when-not-to-use guidance. It neither mentions alternatives nor exclusions. Usage is implied (searching entities), but no differentiation from similar tools like 'list_entities' or 'search_memories' is given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_historyA
Full change timeline of a memory: ADD, UPDATE (old vs new text), SUPERSEDED (which fact replaced it) and DELETE events, oldest first.
| Name | Required | Description | Default |
|---|---|---|---|
| memory_id | Yes | Exact memory UUID whose change history to fetch. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses event types and ordering but lacks details on potential behavioral traits like result limits, performance implications, or whether it is read-only (though implied). The output schema likely covers return value structure but this is not mentioned in the description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that efficiently conveys purpose, included event types, and ordering, with zero wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool with an output schema, the description is fairly complete. It explains the content and ordering of results. However, it could mention any time range restrictions or implicit limits, though these may be covered by the output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The single parameter memory_id is described in the schema with 'Exact memory UUID whose change history to fetch.' Since schema coverage is 100%, the description adds no additional meaning beyond what the schema already provides, earning a baseline 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly explains the tool fetches a full change timeline of a memory, listing specific event types (ADD, UPDATE, SUPERSEDED, DELETE) and ordering (oldest first). It distinguishes from sibling tools like get_memory (current state) and update_memory (modify).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for viewing history but does not explicitly state when to use versus alternatives. No exclusions or when-not-to-use guidance is provided, relying on implied context from sibling names.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_queue_statusA
Health of the async ingest queue: depth (jobs waiting or running), per-status counts, age of the oldest pending job, estimated drain time, and whether the background worker is alive.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It clearly describes the output (depth, counts, etc.) and implies a read-only operation. Could explicitly mention it is non-destructive, but the context makes this clear.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence with front-loaded purpose and bullet-like list of metrics. Every phrase adds value, no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given zero parameters and existence of an output schema, the description fully covers what an agent needs: the tool returns queue health metrics. No additional details needed for this simple tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist, and schema coverage is 100%. The description adds context about the output beyond the schema, but parameter semantics dimension is satisfied by the absence of parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description specifies the tool returns health metrics of the async ingest queue, listing specific fields (depth, counts, age, drain time, worker alive). This clearly distinguishes it from sibling tools like add_document or memory_task_status, which have different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for monitoring queue health but does not explicitly state when to use this tool versus alternatives (e.g., after ingestion or periodically). No guidance on exclusion criteria or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_task_statusA
Status of an asynchronous add_memory task.
States: pending | processing | done | failed_retryable | dead.
When done, ``result.memory_ids`` lists the memories created/updated
(fetch them with get_memory) and ``result.events`` includes any
SUPERSEDED markings. ``last_error`` explains failed/dead tasks.
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | Task id returned by a queued add_memory call (tsk_...). |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It transparently lists possible states (pending, processing, done, failed_retryable, dead) and explains result fields including 'result.memory_ids', 'result.events' with SUPERSEDED markings, and 'last_error'. It does not indicate destructive behavior, which is appropriate for a read-only status check.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured paragraph with clear front-loading of purpose. Every sentence adds value: states enumeration, result fields, error explanation. No filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having an output schema, the description provides rich behavioral context (states, result fields, error handling) that fully covers the tool's functionality. It includes details like SUPERSEDED events which add valuable context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, and the description of task_id ('Task id returned by a queued add_memory call (tsk_...).') essentially repeats the schema's description. The description adds no new semantic value beyond the schema, so baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool returns the status of an asynchronous add_memory task, with specific verb 'status' and resource 'memory_task'. It distinguishes from siblings like add_memory and memory_queue_status by focusing on a single task's status.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides guidance on how to interpret results (fetch memories with get_memory, check last_error for failure) and implies use after an add_memory call. However, it does not explicitly contrast with sibling memory_queue_status or give explicit when-not-to-use scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_memoriesB
Semantic search across existing memories.
| Name | Required | Description | Default |
|---|---|---|---|
| as_of | No | Temporal anchor (ISO date or datetime): return what was known/current on that date — memories created later are excluded and facts superseded only after the anchor carry no demotion. | |
| limit | No | Maximum number of results (default 10). | |
| query | Yes | Natural language description of what to find. | |
| domain | No | Keep only memories whose classified domain matches (e.g. career, ai, data, software_engineering, finance, trading, health, education, personal, legal, business, infrastructure). | |
| rerank | No | Whether to apply reranking. Defaults to the server's MEM0_ENABLE_RERANK. | |
| run_id | No | Run scope. | |
| filters | No | Additional structured filter clauses. | |
| user_id | No | User scope. Defaults to MEM0_USER_ID. | |
| agent_id | No | Agent scope. | |
| threshold | No | Minimum relevance score (0.0-1.0). | |
| memory_type | No | Keep only memories of this classified type: semantic, episodic, or procedural. | |
| enable_graph | No | Override default graph toggle. | |
| min_importance | No | Keep only memories whose classified importance is >= this value (0.0-1.0). | |
| sort_by_importance | No | Sort results by classified importance descending. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavioral traits. It only says 'semantic search,' failing to note that it is read-only, does not modify state, or indicate any performance characteristics. The agent cannot infer safe usage from this description alone.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that immediately conveys the tool's function. While it could benefit from more detail, it is front-loaded and contains no unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 14 parameters and an output schema, the description lacks essential context. It does not summarize key capabilities like filtering by domain, user, or importance, nor does it explain the search behavior (e.g., returns ranked results). The agent would need to rely entirely on the schema for guidance.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so every parameter is already described in the schema. The description adds no new semantic value beyond what the parameter descriptions already provide, meriting the baseline score.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it is a semantic search tool over existing memories. This directly communicates its function and distinguishes it from sibling tools like add_memory (creation) or get_memories (retrieval of all memories).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided about when to use this tool versus alternatives. It does not explain when other sibling tools like get_memories or mcp_search_graph would be more appropriate, nor does it mention any prerequisites or conditions for use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
update_memoryA
Update an existing memory's text.
ASYNCHRONOUS by default (when MEM0_ASYNC_INGEST != false): validates the
memory exists, then returns {"status": "queued", "task_id", ...} immediately
while the re-embed + metadata re-classification (a slow llama3.1:8b call) run in
the background worker — so the call never times out the client. Poll
memory_task_status(task_id) for the result (memory_id / UPDATE event);
memory_history(memory_id) shows the old-vs-new diff. An identical re-submit
while the job is still active returns the same task_id (no double-apply). Set
MEM0_ASYNC_INGEST=false for the synchronous path.
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Replacement text for the memory. | |
| memory_id | Yes | Exact memory UUID to update. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description thoroughly covers the async behavior, re-embedding process, no double-apply guarantee, and polling mechanism, providing full transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single well-structured paragraph that front-loads the main action and then explains async details, though it could be slightly more concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of async behavior and an existing output schema, the description provides all necessary context for correct invocation and result handling, including polling instructions.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and parameter descriptions are adequate (e.g., 'Replacement text for the memory.'). The description adds context about the update but does not significantly enhance parameter understanding beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool updates an existing memory's text, with the verb 'update' and the resource 'memory's text', distinguishing it from siblings like add_memory or delete_memory.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains when to use this tool (to update existing memory) and provides context on async behavior and polling, but does not explicitly list when not to use it or alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Most tools are clearly distinct (add_memory vs get_memory vs delete_memory, etc.). However, delete_entities and delete_all_memories are noted as functionally equivalent in self-hosted mode, causing some overlap. Also, mcp_get_entity and mcp_search_graph could be confused for entity lookups.
Many tools follow verb_noun pattern (add_memory, get_memory, delete_memory), but some use noun_first (memory_history, memory_queue_status) and two are prefixed with 'mcp_' (mcp_get_entity, mcp_search_graph), breaking consistency. Overall readable but mixed.
15 tools is well-scoped for a memory server. It covers CRUD, search, history, async task management, entity operations, and document ingestion without excess.
Core memory operations are fully covered (add, get, update, delete, search, history). Entity management and async task monitoring are included. Minor gap: no task cancellation tool. Also, delete_entities is redundant with delete_all_memories.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Private persistent memory for Claude, ChatGPT & Gemini via MCP - semantic search, zero-code setup.
Persistent memory for AI agents across Claude, ChatGPT and any MCP client.
Persistent AI memory shared across Claude, ChatGPT, coding agents, and compatible MCP clients.
Persistent memory for AI assistants. Save once; recall from Claude, ChatGPT, or any MCP client.
Related MCP Servers
- AlicenseAqualityDmaintenanceSelf-hosted mem0 MCP server for Claude Code. Run a complete memory server against self-hosted Qdrant + Neo4j + Ollama while using Claude as the main LLM.11107MIT
- AlicenseNot gradedqualityBmaintenanceA self-hosted MCP memory server with hybrid semantic and keyword search, providing persistent memory for AI coding assistants like Claude Code, Cursor, and Windsurf.203MIT
- AlicenseNot gradedqualityCmaintenanceMCP Memory Server for Claude Code that provides persistent context across sessions using semantic search (RAG).Apache 2.0

mem0-mcpofficial
AlicenseAqualityCmaintenanceSelf-hosted Mem0 MCP server integrating Qdrant, Neo4j, and Ollama for semantic memory search, graph entity relationships, and memory management via OpenMemory API.63MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/fabiolenine/mcp_deepmen0'
If you have feedback or need assistance with the MCP directory API, please join our Discord server