Skip to main content
Glama
marerem

longmem

by marerem

Cross-project memory for AI coding assistants.
Stop solving the same problems twice.

PyPI Python 3.11+ License: MIT Tests Coverage Open Issues Closed Issues marerem/longmem MCP server


Your AI solves the same bug in a different project six months later. Writes the same boilerplate. Explains the same pattern. You already knew the answer.

longmem gives your AI a persistent memory that works across every project and every session. Before reasoning from scratch, it searches what you've already solved. After something works, it saves it. The longer you use it, the less you repeat yourself.

You describe a problem
        │
        ▼
  search_similar()
  ┌─────────────────────────────────────────────────────┐
  │  1. pre-filter by category (ci_cd / auth / db / …)  │
  │  2. semantic search  (Ollama or OpenAI embeddings)   │
  │  3. keyword search   (SQLite FTS5 exact match)       │
  │  4. merge + rank results                             │
  └─────────────────────────────────────────────────────┘
        │                          │
   score ≥ 85%               score < 85%
        │                          │
        ▼                          ▼
  cached solution           AI reasons from scratch
  + edge cases                      │
  + team knowledge               "it works"
  (any project)                     │
                                    ▼
                          confirm_solution()
                          saved once — surfaces
                          from every future project

Why longmem

longmem

others

Cost

Free — local Ollama embeddings

Requires API calls per session

Privacy

Nothing leaves your machine

Sends observations to external APIs

Process

Starts on demand, no daemon

Background worker + open port required

IDE support

Cursor + Claude Code

Primarily one IDE

Search

Hybrid: semantic + keyword (FTS5)

Vector-only or keyword-only

Teams

Export / import / shared DB path / S3

Single-user

License

MIT

AGPL / proprietary


Related MCP server: Claude Persistent Memory

Quickstart

1. Install

pipx install longmem

2. Setup — checks Ollama, pulls the embedding model, writes your IDE config

longmem init

3. Activate in each project — copies the rules file that tells the AI how to use memory

cd your-project
longmem install

4. Restart your IDE. Memory tools are now active on every chat.

Need Ollama? Install from ollama.com, then ollama pull nomic-embed-text. Or use OpenAI — see Configuration.


How it works

longmem is an MCP server. Your IDE starts it on demand. Two rules drive the workflow:

Rule 1 — search first. Before the AI reasons about any bug or question, it calls search_similar. If a match is found (cosine similarity ≥ 85%), the cached solution is returned with any edge-case notes. Below the threshold, the AI solves normally.

Rule 2 — save on success. When you confirm something works, the AI calls confirm_solution. One parameter — just the solution text. Problem metadata is auto-filled from the earlier search.

The rules file (longmem.mdc for Cursor, CLAUDE.md for Claude Code) wires this up automatically. No manual prompting.

AI forgot to save? Run longmem review — an interactive CLI to save any solution in 30 seconds.

Cold start — getting value from day one

longmem is most useful once it has entries. The fastest way to seed it:

Option 1 — review as you go. After every solved problem this week, run longmem review and describe what you fixed. Ten entries is enough to feel the difference.

Option 2 — team import. If a teammate already has entries, they export and you import:

# teammate
longmem export team_knowledge.json

# you
longmem import team_knowledge.json

Option 3 — shared DB. Set db_path (or db_uri for S3/cloud) to the same location for the whole team. Every save is instantly available to everyone.


CLI

Command

What it does

longmem init

One-time setup: Ollama check, model pull, writes IDE config

longmem install

Copy rules into the current project

longmem status

Config, Ollama reachability, entry count, DB size

longmem export [file]

Dump all entries to JSON — backup or share

longmem import <file>

Load a JSON export — onboard teammates or migrate machines

longmem review

Manually save a solution when the AI forgot

longmem with no arguments starts the MCP server (used by your IDE).


Configuration

Config lives at ~/.longmem/config.toml. All fields are optional — defaults work with a local Ollama instance.

Switch to OpenAI embeddings

embedder       = "openai"
openai_model   = "text-embedding-3-small"
openai_api_key = "sk-..."   # or set OPENAI_API_KEY

Install the extra: pip install 'longmem[openai]'

Team shared database

Point every team member's config at the same path:

# NFS / shared drive
db_path = "/mnt/shared/longmem/db"

Or use cloud storage:

# S3 (uses AWS env vars)
db_uri = "s3://my-bucket/longmem"

# LanceDB Cloud
db_uri = "db://my-org/my-db"
lancedb_api_key = "ldb_..."   # or set LANCEDB_API_KEY

No shared mount? Use longmem export / longmem import to distribute a snapshot.

Team knowledge base

Save facts that are true across your whole stack under project="shared" so they surface from any repo:

save_solution(
  problem="why oauth2-proxy uses port 4181 not default 4180",
  solution="General: 4180 is the oauth2-proxy default. 4181 means something else already occupies 4180.\n\nThis team's setup: Sinfonia always runs on 4180. Every other project uses 4181+ by convention.",
  project="shared",
  category="networking",
  tags=["oauth2-proxy", "ports", "nginx"]
)

search_similar searches all projects — a shared entry surfaces automatically from any repo without needing search_by_project.

Three-layer solution format — write solutions so they work for anyone who finds them:

Layer

Scope

How to save

1. General pattern

Universal — any team

always include in solution text

2. Team-wide fact

Your whole stack

project="shared"

3. Project detail

One repo only

project="<repo>" + enrich_solution

Tuning

similarity_threshold = 0.85   # minimum score to surface a cached result (default 0.85)
duplicate_threshold  = 0.95   # minimum score to block a save as a near-duplicate (default 0.95)

MCP tools

The server exposes 11 tools. The two you interact with most:

  • search_similar — semantic + keyword hybrid search. Returns ranked matches with similarity scores, edge cases, and a keyword_match flag when the hit came from exact text rather than vector similarity.

  • confirm_solution — saves a solution with one parameter. Problem metadata auto-filled from the preceding search.

Full list: save_solution, correct_solution, enrich_solution, add_edge_case, search_by_project, delete_solution, rebuild_index, list_recent, stats.

Call rebuild_index once you reach 256+ entries to compact the database and build the ANN index for faster search.


Category reference

Categories pre-filter before vector search — keeps retrieval fast at any scale.

Category

Use for

ci_cd

GitHub Actions, Jenkins, GitLab CI, build failures

containers

Docker, Kubernetes, Helm, OOM kills

infrastructure

Terraform, Pulumi, CDK, IaC drift

cloud

AWS/GCP/Azure SDK, IAM, quota errors

networking

DNS, TLS, load balancers, timeouts, proxies

observability

Logging, metrics, tracing, Prometheus, Grafana

auth_security

OAuth, JWT, RBAC, secrets, CVEs

data_pipeline

Airflow, Prefect, Dagster, ETL, data quality

ml_training

GPU/CUDA, distributed training, OOM

model_serving

vLLM, Triton, inference latency, batching

experiment_tracking

MLflow, W&B, DVC, reproducibility

llm_rag

Chunking, embedding, retrieval, reranking

llm_api

Rate limits, token cost, prompt engineering

vector_db

Pinecone, Weaviate, Qdrant, LanceDB

agents

LangChain, LlamaIndex, tool-calling, agent memory

database

SQL/NoSQL, migrations, slow queries

api

REST, GraphQL, gRPC, versioning

async_concurrency

Race conditions, event loops, deadlocks

dependencies

Version conflicts, packaging, lock files

performance

Profiling, memory leaks, caching

testing

Flaky tests, mocks, integration vs unit

architecture

Design patterns, service boundaries, refactoring

other

When nothing above fits


Contributing

Contributions are very welcome — this project grows with the community that uses it.

Whether it's a bug fix, a new feature, better docs, or just sharing your use case — all of it helps. If you're unsure whether an idea fits, open an issue first and we'll figure it out together.

Getting started:

git clone https://github.com/marerem/longmem
cd longmem
uv sync --group dev
uv run pytest

Good first contributions:

  • New category suggestions

  • Edge cases you hit in real projects

  • IDE integrations (JetBrains, VS Code, Neovim, etc.)

  • Better error messages

  • Seed datasets — export your own entries and share them as a starter pack

Ways to contribute without code:

  • Star the repo if you find it useful

  • Share it with your team

  • Open an issue if something is confusing — unclear UX is a bug


License

MIT — see LICENSE.

mcp-name: io.github.marerem/longmem

Available Tools

11 tools
add_edge_caseA

Record a context where a cached solution didn't work as-is.

Call this when search_similar returned a match but it needed modification to work in the current project. The edge case is appended to the entry so future suggestions include the caveat.

ParametersJSON Schema
NameRequiredDescriptionDefault
entry_idYesThe id returned by save_solution or search_similar.
edge_caseYesDescribe exactly why the solution didn't work in this context and what had to be done differently. Be specific: include versions, OS, config values, or environment details that matter.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.6/5.0
Behavior4/5

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

Without annotations, the description discloses that edge case is appended to an existing entry and modifies future suggestions. It could mention whether the action is reversible or requires permissions, but overall provides good behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short paragraphs with clear first sentence stating purpose. No extra words, well structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given output schema exists, description doesn't need to detail return values. It covers essential usage and effect. Could hint at return type but sufficient.

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

Parameters4/5

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

Schema coverage is 100% with descriptions. The description adds context by stating entry_id comes from specific tools and edge_case should be specific with details, enhancing the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool records a context where a cached solution didn't work, using specific verb 'Record a context' and resource 'edge case'. It distinguishes from siblings by referencing the search_similar workflow.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says when to call: 'Call this when search_similar returned a match but it needed modification'. Also explains the effect: appended to entry so future suggestions include caveat.

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

confirm_solutionA

Auto-save a confirmed solution using context from the last search_similar call.

Call this after solving a problem instead of save_solution — you only need to provide the solution text. Problem description, category, tags, and language are taken automatically from the last search_similar call.

If save_solution was already called manually this session, this is a no-op (no duplicate will be created).

ParametersJSON Schema
NameRequiredDescriptionDefault
solutionYesThe solution that worked. Include code, commands, or steps. Problem metadata (category, tags, language) are filled in automatically from the last search_similar call.
projectNoRepository or workspace name this was solved in.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.7/5.0
Behavior4/5

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

Discloses auto-filling of problem metadata and no-op behavior, but lacks details on failure modes or side effects beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise paragraphs front-load key information with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers all essential aspects: purpose, when to use, auto-fill behavior, duplicate prevention, and parameter meanings.

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

Parameters4/5

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

Schema has full coverage; description adds context about auto-fill and no-op, enhancing understanding of the 'solution' and 'project' parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool auto-saves a confirmed solution using context from the last search_similar call and distinguishes itself from save_solution.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says to call after solving a problem instead of save_solution, and mentions no-op behavior if save_solution was already called.

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

correct_solutionA

Fix a specific piece of text in an already-saved solution.

Call this when the user corrects a name, term, or detail that was saved incorrectly — for example 'it's not called Paperless-NGX, it's Papertagging'. Replaces all occurrences of find with replace in the solution text.

Use enrich_solution to add new context. Use correct_solution to fix wrong text.

ParametersJSON Schema
NameRequiredDescriptionDefault
entry_idYesThe id returned by save_solution, confirm_solution, or search_similar.
findYesThe exact text to find in the saved solution.
replaceYesThe text to replace it with.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.7/5.0
Behavior4/5

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

The description discloses that it replaces all occurrences of `find` with `replace` in the solution text. With no annotations, it sufficiently covers core behavior, though it could mention whether modifications are in-place or require re-saving.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, front-loaded with purpose, followed by usage guidance and sibling differentiation. Every sentence adds value with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given full input schema coverage and an existing output schema, the description covers purpose, behavior, usage, and parameter sources comprehensively for a simple find-and-replace tool.

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

Parameters4/5

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 context for entry_id (which previous calls provide it) and clarifies that find is exact text, enhancing understanding beyond schema definitions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool fixes specific text in an already-saved solution, distinct from enrichment. It uses a specific verb ('correct') and resource ('solution text'), effectively distinguishing it from siblings like enrich_solution.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to call the tool (user corrects a name, term, or detail saved incorrectly) and when not to (use enrich_solution for new context). Includes an example for clarity.

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

delete_solutionA

Permanently delete a saved entry.

Use this to remove entries that were saved incorrectly, contain wrong information that can't be fixed with correct_solution, or are no longer relevant. This cannot be undone.

ParametersJSON Schema
NameRequiredDescriptionDefault
entry_idYesThe id of the entry to delete.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description must disclose all behavioral traits. It states permanence and irreversibility but does not mention side effects, permissions, or return values (despite having an output schema). Adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences. The first sentence front-loads the core purpose, and the second adds usage context without redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simple signature (one required parameter) and the presence of an output schema, the description covers purpose, usage, and irreversibility. It lacks detail on error scenarios or permissions, but is fairly complete for a delete tool.

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

Parameters3/5

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

The description does not add meaning beyond the input schema, which already has 100% coverage for the single parameter 'entry_id' with a clear description. Baseline score is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Permanently delete a saved entry,' which is a specific verb and resource. It distinguishes from siblings like 'correct_solution' and 'save_solution' but could be more explicit about the domain (e.g., 'saved solution' instead of 'saved entry').

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit when-to-use scenarios (incorrect, unfixable, irrelevant) and names an alternative tool ('correct_solution'). This gives clear guidance for tool selection.

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

enrich_solutionA

Append new context to an already-saved solution.

Call this when a conversation reveals additional details AFTER a solution was already saved — for example, a follow-up clarification that makes the solution more reusable across projects.

This is NOT for failures (use add_edge_case for those). This is for enrichment: new facts, patterns, or context that improve the answer.

ParametersJSON Schema
NameRequiredDescriptionDefault
entry_idYesThe id returned by save_solution, confirm_solution, or search_similar.
contextYesNew information that refines or extends the saved solution. Write as a reusable insight: state the general pattern first, then give specific details. E.g.: 'Port 4181 is used when 4180 is already taken by another auth proxy in the same stack.'

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It mentions 'append' which implies modification, and describes the purpose as enrichment. However, it does not disclose whether the operation is reversible, side effects, or authorization requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is concise with 4 sentences, front-loaded with the primary purpose. Every sentence adds value, and there is no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema, the description does not need to explain return values. It covers purpose, usage distinction, and basic behavior. Could mention what happens if entry_id does not exist, but overall complete for a straightforward append tool.

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

Parameters3/5

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

Schema description coverage is 100%, so baseline is 3. The description does not add new information beyond what the input schema already provides for parameters like entry_id and context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Append new context to an already-saved solution' with a clear verb and resource. It also distinguishes from sibling 'add_edge_case' by mentioning 'This is NOT for failures (use add_edge_case for those).'

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to call: 'when a conversation reveals additional details AFTER a solution was already saved'. Also states when not to: 'This is NOT for failures (use add_edge_case for those).'

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

list_recentA

List the most recently saved memory entries.

Use this to audit what has been saved — for example, to find a recently saved entry whose id is not in context. Results are ordered newest-first.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of recent entries to return. Default 10.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior4/5

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

No annotations are provided, so the description must carry the burden. It states 'Results are ordered newest-first', which is a key behavioral trait. It implies read-only operation. 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core purpose, and includes a concrete usage example and ordering behavior. No superfluous words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one optional parameter) and the presence of an output schema, the description is adequately complete. It covers purpose, ordering, and a use case. Minor gaps like scope or pagination are acceptable.

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

Parameters3/5

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

The only parameter is 'limit', fully described in the input schema (default, min, max). The description adds no further meaning beyond what the schema already provides, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'List the most recently saved memory entries', using a specific verb and resource. This distinguishes it from sibling tools like search_similar or save_solution.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a use case: 'Use this to audit what has been saved — for example, to find a recently saved entry whose id is not in context.' It implicitly differentiates from search tools but could be more explicit about 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.

rebuild_indexA

Rebuild the vector search index for faster similarity search.

LanceDB falls back to brute-force scan when the table has fewer than 256 rows. Once you have 256+ entries, call this once to build an ANN index — subsequent searches will be significantly faster.

Safe to call at any time; existing data is not modified.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

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

Without annotations, the description takes full responsibility for behavioral disclosure. It states the tool is safe, does not modify data, and explains the threshold for benefits. It could elaborate on potential side effects like temporary performance impact or whether the call is idempotent, but overall it provides sufficient transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise, consisting of three short sentences. The main purpose is front-loaded, followed by specific conditions and safety reassurance. Every sentence adds value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (no parameters), the description covers the essential points: purpose, optimal use case, and safety. It could mention if the tool is idempotent or what the output indicates, but overall it's sufficiently complete for an agent to decide when to invoke it.

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

Parameters4/5

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

The tool has zero parameters, so the input schema is fully covered. The description does not need to add parameter details, and the baseline score of 4 applies as per guidelines. No enrichment is necessary.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly specifies the tool's function: rebuilding the vector search index to accelerate similarity search. It distinguishes itself from sibling tools like search_by_project and search_similar, which are search tools, and list_recent, which is for listing. The verb+resource combination is precise and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear usage context: call after having 256+ rows for ANN index benefit, and note that it's safe and non-destructive. However, it lacks explicit when-not-to-use guidance (e.g., don't call if index already built) and does not name alternative tools for similar functionality.

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

save_solutionA

Save a problem/solution pair to the cross-project memory.

Call this after successfully solving a problem so future sessions — in any project — can find and reuse the solution. Returns the entry ID which can be passed to add_edge_case later.

ParametersJSON Schema
NameRequiredDescriptionDefault
problemYesClear description of the problem that was solved.
solutionYesThe solution, including code snippets, commands, or steps. Be specific — this will be reused verbatim in future projects.
categoryYesProblem domain. One of: ci_cd, containers, infrastructure, cloud, networking, observability, auth_security, data_pipeline, ml_training, model_serving, experiment_tracking, llm_rag, llm_api, vector_db, agents, database, api, async_concurrency, dependencies, performance, testing, architecture, other
projectNoRepository or workspace name this was solved in.
tagsNoKeywords for filtering: library names, tools, error types. E.g. ['airflow', 'dag', 'python', 'skip'].
languageNoProgramming language, e.g. 'python'.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior3/5

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

No annotations provided, so description carries burden. Describes saving to memory and returning an entry ID. Lacks details on whether duplicates are overwritten or if confirmation is needed. Adequate for a simple save operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, no filler. Front-loaded with purpose, then usage guidance, then output hint. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers purpose, when to use, output usage. With output schema present, return values are covered. Could mention persistence across projects, but it's implied by 'cross-project memory'. Lacks explicit note on no side effects.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. Description adds value by advising to be specific for reuse in the solution parameter. Also mentions category list implicitly. Adds meaning beyond schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it saves a problem/solution pair to cross-project memory. Specifies use case (after solving) and return value (entry ID). Distinguishes from sibling tools like search_similar and confirm_solution.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says when to call (after successfully solving a problem) and hints at follow-up with add_edge_case. Could be improved by noting when not to use, but the guidance is clear enough.

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

search_by_projectA

List saved entries for a specific project.

Use this at the start of a new conversation when you need to find a project-specific entry to correct or enrich but no entry_id is in context. Returns entry ids, problems, and solutions so you can pick the right one and pass its id to correct_solution or enrich_solution.

ParametersJSON Schema
NameRequiredDescriptionDefault
projectYesRepository or workspace name to look up.
queryNoOptional keyword to filter results — searches problem and solution text. Leave empty to list all entries for the project.
limitNoMaximum number of entries to return. Default 20.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description describes the return format (ids, problems, solutions) and intended workflow, but could be more explicit about being read-only, ordering, or case sensitivity of query.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise at about 5 sentences, front-loads core function, and every sentence adds value without fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simple purpose and presence of output schema, the description provides complete context for a list tool, including workflow integration with siblings.

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

Parameters3/5

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

Schema coverage is 100%, so baseline is 3. The description adds context for the project parameter (linking to sibling tools) but does not significantly enhance parameter meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it lists saved entries for a specific project and explicitly connects to sibling tools (correct_solution, enrich_solution), distinguishing it from alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly says 'Use this at the start of a new conversation when you need to find a project-specific entry to correct or enrich but no entry_id is in context,' providing clear when-to-use and 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.

search_similarA

Search the cross-project memory for solutions similar to the current problem.

Call this FIRST before reasoning about a problem from scratch. If similarity ≥ threshold a cached solution is returned — check edge_cases to see if any known limitations apply to the current context. If no match is found, solve normally and then call confirm_solution.

ParametersJSON Schema
NameRequiredDescriptionDefault
problemYesDescribe the problem you are trying to solve.
categoryNoProblem domain. One of: ci_cd, containers, infrastructure, cloud, networking, observability, auth_security, data_pipeline, ml_training, model_serving, experiment_tracking, llm_rag, llm_api, vector_db, agents, database, api, async_concurrency, dependencies, performance, testing, architecture, other. Use 'other' when unsure.other
tagsNoOptional keywords to narrow the search — library names, framework, error type, tool name. E.g. ['kubernetes','oom','python'].
languageNoProgramming language if relevant, e.g. 'python', 'typescript'.
thresholdNoMinimum similarity (0–1). Defaults to similarity_threshold in config.toml (default 0.85).

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior4/5

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

Describes the core behavior: returns cached solution if threshold met, and mentions checking edge_cases for limitations. No annotations exist, so the description adequately covers the expected workflow and side-effect-free nature.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise: one sentence for purpose, two sentences for usage guidance. Every sentence adds distinct value with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the output schema exists and the description integrates with siblings (edge_cases, confirm_solution), it provides a complete picture for an agent to use the tool correctly in a multi-step workflow.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description does not add significant value beyond the schema's parameter explanations, but it provides useful context about when and how to use the tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches cross-project memory for similar solutions. It distinguishes from siblings like search_by_project and list_recent by specifying 'cross-project' and positioning it as the first step.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly instructs to call this tool before reasoning from scratch, and provides conditional logic for threshold matches and edge-case checks, referencing sibling tool confirm_solution.

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

statsA

Return database statistics: total entries, breakdown by category, and date range.

Useful for understanding the size and composition of the memory store, and for deciding when to call rebuild_index (threshold: 256+ entries).

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.7/5.0
Behavior4/5

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

No annotations provided, so description carries full burden. Clearly indicates read-only (returns statistics), no mention of side effects or safety. Lacks details on consistency or performance, but sufficient for a stats tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no wasted words. Core purpose first, then contextual usage guidance. Perfectly concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given output schema exists, description covers what the tool returns (total entries, breakdown, date range) and why to use it. Connects to sibling rebuild_index with threshold. Complete for this complexity.

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

Parameters4/5

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

Input schema has zero parameters and 100% coverage; description need not add parameter info. Baseline score 4 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb 'return' and resource 'database statistics' with explicit details: total entries, breakdown by category, date range. Clear differentiation from sibling tools like rebuild_index.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use: for understanding size/composition, and when to call rebuild_index (threshold 256+ entries). Connects to a sibling tool with a concrete condition.

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

TDQS

A4.4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: edge cases, confirmation, correction, deletion, enrichment, listing, indexing, saving, project search, similarity search, and statistics. There is no ambiguity between them.

Naming Consistency5/5

All tools use snake_case with a verb_noun pattern (e.g., add_edge_case, confirm_solution). The exception 'stats' is a common shorthand and still fits the pattern as a noun. Overall highly consistent.

Tool Count5/5

With 11 tools, the set is well-scoped for a memory management system. It covers all necessary operations without being bloated or insufficient.

Completeness4/5

The surface covers saving, retrieving, updating, deleting, and searching solutions, plus edge cases and enrichment. Minor gaps exist, such as no direct 'get solution by ID' tool, but this can be worked around via search methods.

Maintenance

ActivityInactive
ResponsivenessSyncing

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

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/marerem/longmem'

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