LongtermMemory-MCP
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., "@LongtermMemory-MCPRemember that my preferred text editor is VS Code."
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.
LongtermMemory-MCP
A fully local MCP server that gives AI agents persistent, semantic long-term memory — without any cloud dependencies.
Inspired by mcp-mem0, but runs 100% on your machine:
Feature | mcp-mem0 | This project |
Storage | PostgreSQL / Supabase | SQLite (via sql.js WASM) |
Embeddings | OpenAI API | Local transformer (all-MiniLM-L6-v2) |
Vector search | Cloud vector DB | In-process cosine similarity |
LLM dependency | OpenAI / OpenRouter / Ollama | None |
Setup | Database + API keys |
|
Tools
Core
Tool | Description |
| Store text with auto-generated semantic embedding, tags, importance, and type |
| Find relevant memories using natural language queries (cosine similarity) |
| Modify an existing memory's content, metadata, tags, importance, or type |
| Remove a specific memory by ID |
| Wipe all memories (irreversible) |
| List all stored memories (paginated) |
| Get count and database location |
Search
Tool | Description |
| Filter memories by category ( |
| Find memories matching any of the provided tags |
| Find memories created within a specific date range (ISO format) |
Maintenance
Tool | Description |
| Manually trigger a database backup with JSON export |
Related MCP server: local-agent-context
Quick Start
Claude Code Plugin (recommended)
Install via the Claude Code marketplace — this sets up both the MCP server and a companion skill that teaches Claude how to use memory effectively:
/plugin marketplace add MarcelRoozekrans/LongtermMemory-MCP
/plugin install longterm-memory@longterm-memory-marketplaceThis automatically:
Configures the MCP server (no manual JSON editing)
Installs the
long-term-memoryskill (Claude learns to recall context at session start, save insights after tasks, and deduplicate memories)
Use with npx (no install needed)
npx longterm-memory-mcpOr install globally
npm install -g longterm-memory-mcp
longterm-memory-mcpOr from source
git clone https://github.com/MarcelRoozekrans/LongtermMemory-MCP.git
cd LongtermMemory-MCP
npm install && npm run build
npm startConfiguration
Claude Code
If you installed via the plugin marketplace, the MCP server is already configured. For manual setup, add to your MCP settings (~/.claude/settings.json or project .claude/settings.json):
{
"mcpServers": {
"longterm-memory": {
"command": "npx",
"args": ["-y", "longterm-memory-mcp"]
}
}
}Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"longterm-memory": {
"command": "npx",
"args": ["-y", "longterm-memory-mcp"]
}
}
}Agent Instructions
The repo includes agent instructions that teach AI agents how to use memory effectively (automatic recall, save patterns, deduplication):
File | Purpose |
| Self-contained skill — auto-loaded by Claude Code plugin, can be referenced from any MCP client |
Database Location
By default, memories are stored in a shared, user-scoped location:
~/.longterm-memory-mcp/memories.dbThis means every project and every MCP client shares the same memory pool — you save a memory in one project and it's available everywhere.
Per-project database
To isolate memories for a specific project, set the MEMORY_DB_PATH environment variable:
{
"mcpServers": {
"longterm-memory": {
"command": "npx",
"args": ["-y", "longterm-memory-mcp"],
"env": {
"MEMORY_DB_PATH": "/path/to/project/memories.db"
}
}
}
}Memory Types
Each memory has a memory_type that determines how it's categorized and how quickly it decays:
Type | Description | Decay half-life |
| Default catch-all | 60 days |
| Verified information | 120 days |
| User/project preferences | 90 days |
| Conversation context | 45 days |
| Task-related notes | 30 days |
| Short-lived context | 10 days |
Tags & Importance
Tags: Categorize memories with string tags (e.g.
["auth", "backend"]). Search withsearch_by_tags.Importance (1–10): Controls how resistant a memory is to decay. Default is 5. Higher importance decays more slowly.
Protected tags: Memories tagged with
core,identity, orpinnedskip decay entirely.
Decay & Reinforcement
Memories decay over time to keep the store relevant:
Decay: Each memory type has a half-life (see table above). Importance decreases exponentially based on time since last access, with a floor that prevents full deletion.
Reinforcement: Every time a memory is accessed via search, its importance increases by +0.1 (up to a max of 10). Frequently accessed memories stay important.
Lazy evaluation: Decay is calculated on access, not on a timer — no background processes needed.
Content Deduplication
Memory content is hashed (SHA-256) on save. If identical content already exists, the save is rejected with a reference to the existing memory ID. This prevents duplicate entries automatically.
Backups
Backups are managed automatically and can also be triggered manually via the create_backup tool.
Auto-backup: Triggers every 24 hours or when the memory count reaches a multiple of 100.
Retention: The last 10 backups are kept; older ones are pruned automatically.
Format: Each backup is a timestamped directory containing the SQLite database and a JSON export of all memories.
Location:
~/.longterm-memory-mcp/backups/by default, or setMEMORY_BACKUP_PATH:
{
"mcpServers": {
"longterm-memory": {
"command": "npx",
"args": ["-y", "longterm-memory-mcp"],
"env": {
"MEMORY_BACKUP_PATH": "/path/to/backups"
}
}
}
}How It Works
Save: Text is embedded locally using
all-MiniLM-L6-v2(384-dim vectors) and stored in SQLite alongside the raw content, metadata, tags, importance, and type. Content is deduplicated via SHA-256 hash.Search: Your query is embedded with the same model, then compared against every stored memory using cosine similarity. Results above the threshold are returned ranked by relevance. Accessed memories are reinforced automatically.
Decay: Over time, unused memories lose importance based on their type's half-life. Protected and frequently accessed memories resist decay.
Persist: The SQLite database is a single file on disk. No background processes, no servers to maintain.
The embedding model (~30MB quantized) is downloaded once on first use and cached locally.
Architecture
src/ — MCP server source
index.ts — Entry point (stdio transport, DB/backup path resolution)
server.ts — MCP server factory + 11 tool definitions
memory-store.ts — SQLite storage + vector search + decay integration
embeddings.ts — Local embedding engine (Xenova/transformers)
decay.ts — DecayEngine (lazy decay, reinforcement, protected tags)
backup.ts — BackupManager (auto-backup, JSON export, pruning)
types.ts — TypeScript interfaces (Memory, Embedder, config types)
skills/ — Claude Code plugin skill
long-term-memory/SKILL.md — Self-contained agent instructions + skill
.claude-plugin/ — Plugin & marketplace metadata
plugin.json — Plugin manifest
marketplace.json — Marketplace manifest
.mcp.json — Auto-configures MCP server on plugin install
.vscode/mcp.json — VS Code MCP server configBenchmarks
Run with npm run bench. Results from an in-memory store using mock embeddings (isolates store/SQLite performance from model latency):
Cosine Similarity
Operation | Throughput | Notes |
Single computation (384-dim) | ~4.2M ops/s | Matches real embedding dimensions |
128 dimensions | ~8.6M ops/s | |
768 dimensions | ~2.4M ops/s | |
1536 dimensions | ~1.3M ops/s | Scales linearly with dimensions |
Memory Store Operations
Operation | Throughput | Notes |
Save (single) | ~1,120 ops/s | Includes embed + SQLite insert + dedup check |
Save 100 batch | ~18 ops/s | ~55ms per batch of 100 |
Save 1000 batch | ~0.3 ops/s | ~3.1s per batch of 1000 |
Update (content, re-embed) | ~155 ops/s | |
Update (metadata only) | ~344 ops/s | 2.2x faster than content update |
Delete | ~469 ops/s |
Search (semantic, at scale)
Store Size | Operation | Notes |
10 memories | search (limit=5) | Full scan + cosine similarity per memory |
100 memories | search (limit=5) | |
500 memories | search (limit=5) | |
1000 memories | search (limit=5) | Linear scan — scales with store size |
Decay Engine
Operation | Throughput |
Single decay computation | ~21M ops/s |
Single reinforcement | ~25.7M ops/s |
shouldProtect (tag check) | ~22M ops/s |
Development
npm install # Install dependencies
npm run build # Compile TypeScript
npm test # Run all 96 tests
npm run bench # Run benchmarks
npm run test:watch # Watch mode
npm run test:coverage # Coverage reportContributing
This project uses Conventional Commits and semantic-release for automated versioning.
Commit message format
<type>(<optional scope>): <description>
[optional body]
[optional footer(s)]Type | Purpose | Version bump |
| New feature | Minor (0.x.0) |
| Bug fix | Patch (0.0.x) |
| Documentation only | No release |
| Formatting, whitespace | No release |
| Code restructuring | No release |
| Adding/updating tests | No release |
| Maintenance, deps | No release |
| CI/CD changes | No release |
Breaking changes: Add ! after the type (e.g., feat!: remove deprecated API) or include a BREAKING CHANGE: footer. This triggers a major version bump.
Examples
git commit -m "feat: add memory tagging support"
git commit -m "fix: handle empty search query gracefully"
git commit -m "feat!: change default database location"
git commit -m "docs: update configuration examples"Commit messages are validated locally via commitlint + husky git hooks. Non-conforming messages will be rejected.
Releases
Releases are fully automated. When commits are pushed to main:
semantic-release analyzes commit messages
Determines the next version (major / minor / patch)
Generates release notes from commits
Updates
CHANGELOG.mdPublishes to npm
Creates a GitHub Release
No manual version bumps or tags needed.
Dependency Updates
Dependencies are managed automatically by Renovate. Patch and minor devDependency updates are auto-merged after CI passes. Major updates create PRs for manual review.
License
MIT
Available Tools
11 toolscreate_backupA
Create a manual backup of the memory database and export all memories as JSON.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description carries full burden. It mentions creating a backup and exporting JSON but does not disclose potential side effects, such as whether it overwrites previous backups, requires permissions, or is destructive. The word 'manual' hints at user-initiated but lacks depth.
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 that is front-loaded with the action and resource, no extraneous words. Every word contributes.
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 parameterless tool with no output schema, the description is sufficient: it explains the purpose and output format. However, it could mention if the backup is stored locally or in a specific location, whether it is asynchronous, or if it appends to existing backups.
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?
Input schema has zero parameters, so schema coverage is 100%. The description adds value by specifying the output format (JSON), which is not in the schema. Baseline for 0 params is 4.
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 'Create', the resource 'manual backup of the memory database', and the output format 'export all memories as JSON'. This distinguishes it from sibling tools like save_memory or get_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 explicit guidance on when to use this tool versus alternatives (e.g., get_all_memories). The description does not mention contexts where a backup is preferred or any preconditions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_all_memoriesA
Delete ALL stored memories. This action is irreversible. Only use when the user explicitly asks to clear all memories.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses irreversibility of the action. No annotations provided, so description fully covers behavioral traits.
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: two sentences, front-loaded with action, then condition. 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?
Complete for a parameterless tool: states purpose, irreversibility, and usage condition. No output schema needed.
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; schema coverage is 100% (empty). Baseline 3 applies; description adds no param info as none needed.
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?
Clearly states 'Delete ALL stored memories', specifying verb and resource. Differentiates from sibling 'delete_memory' by emphasizing 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?
Explicitly states when to use ('only when user explicitly asks to clear all memories') and notes irreversibility, providing clear usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_memoryA
Delete a specific memory by its ID. Only delete when the user explicitly requests it or when a memory is confirmed outdated or incorrect.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The UUID of the memory to delete |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must convey behavioral traits. It only states the action (delete) without disclosing irreversibility, side effects, or authorization requirements. For a destructive operation, more transparency is needed.
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 two concise sentences: the first states the purpose, the second provides usage guidelines. No unnecessary words 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?
For a simple delete tool with one parameter and no output schema, the description covers the core purpose and usage condition. It lacks details on what happens after deletion (e.g., success/failure response) but overall is reasonably 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% and the parameter 'id' already has a clear description in the schema. The tool description adds no additional meaning beyond what the schema provides, 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 'Delete a specific memory by its ID', which is a specific verb+resource combination. It distinguishes from the sibling tool delete_all_memories by specifying 'specific'.
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 'Only delete when the user explicitly requests it or when a memory is confirmed outdated or incorrect.' This provides clear guidance on when to use the tool and implies not to use it for automatic or arbitrary deletions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_all_memoriesA
Retrieve all stored memories, ordered by most recent first. Results are paginated.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of memories to return (default: 50) | |
| offset | No | Number of memories to skip for pagination (default: 0) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It states ordering and pagination but does not disclose performance implications, rate limits, or handling of empty results. Basic behavioral info is present but 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?
The description is a single, front-loaded sentence with no extraneous words. Every part is necessary and informative.
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 paginated retrieval tool with no output schema, the description covers core functionality adequately. Could mention return format but not essential given simplicity.
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 detailed descriptions for limit and offset. The description adds no extra meaning beyond the schema, aligning with the baseline of 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 uses specific verb 'retrieve' and resource 'all stored memories', with ordering and pagination stated. It clearly distinguishes from sibling tools like search_memory, delete_memory, etc.
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 use for unfiltered retrieval of all memories, but does not explicitly state when not to use it or compare to alternatives like search_memory or search_by_type.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_statsA
Get statistics about the memory store — total count and database location.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description should disclose behavioral traits. It states what data is returned but does not explicitly confirm it is read-only or free of side effects.
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 14 words, front-loaded with action and resource, and no unnecessary content.
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 is adequate for a simple stats tool but could mention the return format or explicitly state it is a read operation. With no output schema, minor detail is missing.
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, so schema coverage is 100%. The description adds context about output but does not describe any 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 it retrieves statistics (total count and database location) about the memory store. It is distinct from siblings that list, search, or modify 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 explicit guidance on when to use this tool versus alternatives, but the purpose is implied. It does not name alternatives or provide usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
save_memoryA
Save information to long-term memory. The content will be embedded locally and indexed for semantic search. Use this to store facts, decisions, preferences, or any context worth remembering across sessions.
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Optional tags for categorization (e.g. ["personal", "preference"]) | |
| content | Yes | The text content to store in memory | |
| metadata | No | Optional key-value metadata to attach to this memory (e.g. { "topic": "auth", "project": "api" }) | |
| importance | No | Importance level 1-10 (default: 5). Higher = more resistant to decay | |
| memory_type | No | Memory category (default: general). Affects decay rate | general |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It discloses that content is 'embedded locally and indexed for semantic search,' which is a behavioral trait beyond a simple save. It also implies persistence across sessions. No destructive behavior is indicated.
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 three sentences: purpose, technical behavior, and usage guidance. It is front-loaded and efficient, with no redundant information. It earns a high score for conciseness.
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 tool with 5 params (one required), nested objects, and no output schema, the description provides sufficient context: it explains the core function, indexing behavior, and appropriate use cases. It does not detail parameter interactions, but the schema covers that.
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 does not elaborate on individual parameters beyond what the schema already provides. It mentions 'facts, decisions, preferences' which loosely map to 'memory_type' but adds no detailed 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 'Save information to long-term memory' and specifies the types of content to store (facts, decisions, preferences). It distinguishes from sibling tools like search_memory and delete_memory by framing it as the primary creation action.
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 when to use: 'store facts, decisions, preferences, or any context worth remembering across sessions.' It does not explicitly mention when not to use, but the context implies temporary data is inappropriate. The sibling tools provide further differentiation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_by_date_rangeB
Find memories created within a specific date range. Use ISO date format.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of results (default: 50) | |
| date_to | No | End date in ISO format (defaults to now) | |
| date_from | Yes | Start date in ISO format (e.g. "2026-01-01" or "2026-01-01T00:00:00Z") |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description should disclose behavioral traits like result ordering, pagination details, or side effects. It only states basic functionality and omits important context for a search operation.
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 very concise with one sentence and a tip. It efficiently conveys the core purpose without unnecessary words, though could be slightly more structured.
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 lacks information about return value format, ordering, or behavior when date_to is omitted (defaults to now is only in schema). Without an output schema, these details are necessary for complete 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%, so baseline is 3. The description adds minor value by mentioning ISO date format and providing an example, but does not significantly enhance 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 verb 'Find' and the resource 'memories' with a specific criterion (date range). It effectively distinguishes this tool from siblings that search by other attributes like type or tags.
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 specifies to use ISO date format, providing basic guidance. However, it does not explicitly state when to use this tool over sibling search tools, lacking a comparison or usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_by_tagsA
Find memories that match any of the provided tags. Returns memories ordered by importance.
| Name | Required | Description | Default |
|---|---|---|---|
| tags | Yes | Tags to search for — matches memories containing ANY of these tags | |
| limit | No | Maximum number of results (default: 20) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses ordering by importance, which is a behavioral trait. No annotations provided, so the description carries the full burden; it adequately informs the agent of the result ordering. No contradictions.
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 sentences, no waste, front-loaded with purpose. Efficient and to the point.
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?
Adequate for a simple search tool, but lacks details about the return structure of memories. Without an output schema, the description could briefly mention what fields are returned (e.g., id, text, tags). Still, the ordering and matching logic are clear.
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 description adds marginal value beyond the schema. It confirms 'any' matching (already in schema) and adds ordering context, but does not significantly enhance understanding of the 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?
Clearly states the action (Find) and resource (memories by tags). Distinguishes from sibling tools like search_by_type and search_by_date_range which search by different criteria.
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?
Implied usage when you have tags, but no explicit guidance on when to use this tool vs alternatives like search_memory or search_by_type. No exclusions or prerequisites mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_by_typeA
Search memories by category type (e.g. fact, preference, conversation). Returns memories ordered by importance.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of results (default: 20) | |
| memory_type | Yes | The memory type to filter by |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. States ordering by importance, but lacks disclosure of read-only nature, authentication needs, rate limits, or pagination behavior. Adequate but not thorough.
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, extremely concise, front-loaded with essential information. 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 simple 2-parameter tool with no output schema, description covers purpose and ordering. Among many sibling search tools, more context would help, but still adequate.
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 covers 100% of parameters with descriptions. Description adds only output behavior (ordering), not parameter-specific meaning. Baseline score due to high schema coverage.
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 uses verb 'Search' with resource 'memories' and dimension 'category type', providing specific examples. Clearly distinguishes from siblings like search_by_tags and search_by_date_range by focusing on type.
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?
Implies usage when filtering by memory type, but no explicit guidance on when to use versus alternatives like search_memory or search_by_tags. No exclusions or when-not-to-use mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_memoryA
Search long-term memory using semantic similarity. The query is embedded locally and compared against all stored memories using cosine similarity.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of results to return (default: 5) | |
| query | Yes | Natural language search query describing what you're looking for | |
| threshold | No | Minimum similarity score threshold, 0-1 (default: 0.3) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full load. It reveals that queries are embedded locally and compared via cosine similarity, giving algorithmic insight. However, it does not disclose how results are ordered, performance implications, or any side effects (expected to be read-only).
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, front-loaded with purpose and key detail. Every sentence adds value 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 3 parameters, no output schema, and no annotations, the description adequately explains the search method. Missing details like result ordering (by similarity) are minor. Overall complete for its simplicity.
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 baseline is 3. The description adds context about the query being natural language and threshold as minimum similarity, but this largely mirrors the schema. No additional semantics beyond the schema's descriptions.
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 action is to search long-term memory using semantic similarity, which distinguishes it from sibling tools that search by tags, type, or date range. However, it does not explicitly differentiate from tools like 'get_all_memories' or 'memory_stats', leaving some ambiguity.
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 use when semantic similarity search is needed, but provides no explicit guidance on when not to use this tool or alternatives. Sibling tools cover other search methods, but no exclusions or comparisons are mentioned.
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. Can modify content (triggers re-embedding), metadata, tags, importance, or memory type.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The UUID of the memory to update | |
| tags | No | New tags array | |
| content | No | New text content (triggers re-embedding) | |
| metadata | No | New metadata object | |
| importance | No | New importance level 1-10 | |
| memory_type | No | New memory category |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It notes that modifying content triggers re-embedding, a useful behavioral detail. However, it does not clarify if updates are partial or full replacement, nor mention authorization or side effects beyond re-embedding.
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 a clear verb and list of modifiable attributes. No redundant information. Front-loaded with the action.
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?
No output schema, so description should hint at return value. None provided. Lacks information on whether the tool returns the updated memory, confirmation message, or nothing. Also missing prerequisites or permission requirements.
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?
With 100% schema coverage, baseline is 3. The description adds value by highlighting that content change triggers re-embedding and listing modifiable fields, providing context beyond the schema's property descriptions.
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 name 'update_memory' and description clearly state the verb and resource. It lists specific modifiable fields, distinguishing it from siblings like save_memory (create) and delete_memory (delete).
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 use for existing memories by requiring an 'id', but does not explicitly state when to use vs alternatives (e.g., save_memory for new, search for retrieval). No when-not-to-use guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
11 tool updates
v1.4.4- First observed
create_backup - First observed
delete_all_memories - First observed
delete_memory - First observed
get_all_memories - First observed
memory_stats - First observed
save_memory - First observed
search_by_date_range - First observed
search_by_tags - First observed
search_by_type - First observed
search_memory - First observed
update_memory
TDQS
Each tool has a clearly distinct purpose: basic CRUD (save, get all, update, delete), specialized searches (type, tags, date range), backup, and stats. No overlaps.
All tool names follow a consistent verb_noun pattern (e.g., save_memory, search_by_type) using snake_case, making it predictable for an agent.
11 tools cover the full scope of memory management without being excessive or insufficient—each tool earns its place.
Covers all major operations (CRUD, search, backup, stats). Minor gap: no explicit 'get single memory by ID' tool, but get_all_memories with pagination can serve that purpose.
Maintenance
Related MCP Connectors
Cloud-hosted MCP server for durable AI memory
An MCP memory server. One memory your agents share — across models, devices and apps.
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
An MCP server that gives your AI access to the source code and docs of all public github repos
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA local MCP server that provides semantic memory storage and retrieval for coding and AI agents, enabling durable context across chat sessions.524-
- AlicenseNot gradedqualityDmaintenanceA local MCP server that gives AI coding agents persistent memory and context across sessions.13MIT
- FlicenseNot gradedqualityCmaintenanceA self-hosted MCP server that gives AI agents persistent, searchable memory with importance scoring, knowledge graphs, and autonomous memory consolidation.1-
- AlicenseNot gradedqualityDmaintenanceAn MCP server that gives AI agents persistent, forgetting memory with layered decay, semantic search via token overlap, and zero external dependencies.MIT
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/MarcelRoozekrans/LongtermMemory-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server