th-memory-mcp
This server provides a local SQLite-backed memory system for MCP-compatible AI tools, letting you persist, retrieve, organize, and maintain user preferences, lessons, and interaction history.
Save/update preferences with confidence scoring and record lessons from corrections.
Recall memories, search prompt history, get a user profile, and view memory statistics.
Retrieve token-budgeted task context using hybrid search and optional graph expansion.
Manage memory lifecycle: forget entries, update/supersede, merge duplicates, and create typed links.
Consolidate similar memories, extract memory candidates from interactions, and export/import JSON backups.
Inspect recent raw interactions and use the same database from the CLI via
MEMORY_DB_PATH.
Click on "Deploy 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., "@th-memory-mcpremember that I prefer pnpm over npm"
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.
th-memory-mcp
Requirements
Node.js 22.23.4+, 24.22.1+, or 26.12.1+ — patched releases only; the server uses Node-only APIs (
better-sqlite3native build,import.meta.url). Node.js 20 is EOL and unsupported. CI tests the minimum patched version of each supported line (22/24/26).npm — for
npm install,npm run build,npm test. No external services, accounts, or API keys — everything lives in a single local SQLite file.OpenCode — the host that loads the MCP server and the auto-capture plugin (any build with MCP over stdio + plugins). The plugin uses
node:sqliteon OpenCode Desktop/Node 22.5+ and falls back tobun:sqliteon the Bun-based CLI.OS: Windows / macOS / Linux — cross-platform (Node); Windows: set
MEMORY_DB_PATHwithsetx, macOS/Linux:exportin your shell profile.
Security: Use a patched Node.js release — check your runtime with
npx is-my-node-vulnerable.npm auditcovers npm dependencies only, not Node.js core CVEs.
Related MCP server: MCP Vector Memory
Quick Start
Fastest path: npm run quickstart (after cloning) builds, wires opencode.json/opencode.jsonc, deploys the plugin, and sets MEMORY_DB_PATH — the steps below are the manual equivalent. npm alternative: npm install -g th-memory-mcp (or npx th-memory-mcp) and point mcp.command to th-memory-mcp instead of dist/index.js (plugin still from this repo; not on GitHub Packages anymore).
# 1. Clone and build
git clone https://github.com/worakorn-prince/th-memory-mcp.git
cd th-memory-mcp && npm install && npm run build
# 2. Share one DB between the server and the plugin
setx MEMORY_DB_PATH "$PWD/data/memory.db" # Windows (PowerShell)
# export MEMORY_DB_PATH="$PWD/data/memory.db" # macOS/Linux — add to your shell profile (~/.zshrc)Merge this into
~/.config/opencode/opencode.json(replace<REPO>with the absolute clone path; ready-made block inopencode.example.json).MEMORY_DB_PATHmust be the SAME file for server and plugin — a system/user-level env var covers both;environmentbelow covers the server only. Example rules:AGENTS.memory.example.md(attachable at project level).
{ "instructions": ["<REPO>/AGENTS.memory.example.md"],
"mcp": { "memory": { "type": "local", "command": ["node", "<REPO>/dist/index.js"], "enabled": true, "environment": { "MEMORY_DB_PATH": "<REPO>/data/memory.db" } } } }(Optional) Auto-capture: deploy the dual-mode plugin to a directory (OpenCode V2 only auto-discovers local plugins from a folder) —
src/plugin/learning-capture.ts→~/.config/opencode/plugins/learning-capture/index.tsRestart OpenCode (config loads at startup only), then try: "Remember that I prefer pnpm" → new session → "What package manager do I prefer?"
The plugin works in both modes: OpenCode V2 calls the default export's id + setup(ctx) (domain hooks for prompt/tool/compaction/failure events), while V1 (1.18.29+) calls the same default export's server(), which returns the legacy hook object. One file, no runtime import of @opencode/plugin (types only), so it loads under both Node and Bun.
If startup reports Failed to load plugin ... Received protocol 'bun:' or the plugin is silently ignored on V2, you are on an older install layout. Re-deploy the current src/plugin/learning-capture.ts to ~/.config/opencode/plugins/learning-capture/index.ts; a legacy ~/.config/opencode/plugins/learning-capture.ts is renamed to .bak-<timestamp> by npm run quickstart (never deleted). It loads node:sqlite first and only falls back to bun:sqlite under Bun.
Architecture
OpenCode loads the plugin learning-capture (dual-mode V1/V2, Node/Bun) — auto-captures prompt/tool/error into the DB, injects the profile on compaction — and the MCP server th-memory-mcp (Node stdio) exposing the 16 tools on that same SQLite DB; global rules (memory-protocol.md) teach the AI to use them.
Why th-memory-mcp?
Context-based learning, not fine-tuning — captures your preferences, corrections, and habits, then recalls them next session; no data leaves your machine.
100% local & private — one SQLite file, no cloud, no external API; secrets (
api_key=,password:,token) filtered before storage.Low overhead & resilient — tool calls are capped (latency < 10 ms, bounded output) and degrade gracefully if the DB is unavailable.
Open & extensible — MIT licensed; 16 documented tools, rule-based distill, auto-capture plugin; Node +
better-sqlite3only (no extra native extensions).
Highlights
Structured memory — preferences with confidence scoring plus
lessonrecords (situation → mistake → correction), not just flat facts.Lifecycle, temporal & conflict-aware — states (active/stale/superseded/archived), confidence/importance/salience scoring, per-type decay, validity intervals for point-in-time truth and supersession chains; duplicate/contradiction resolution keeps both sides of ambiguous evidence.
Hybrid retrieval —
get_contextblends FTS5 keyword search with dependency-free lexical fuzzy matching (hashed n-gram similarity, 512-dim FNV-1a) via RRF fusion, then assembles a token-budgeted context with optional memory-graph expansion.Consolidation — clusters similar memories into derived ones with full provenance (
derived_fromlinks).First-class Thai / i18n — Thai-aware tokenization in distill; Thai and English accepted interchangeably.
Works with other harnesses
A standard MCP server: 16 tools anywhere MCP-over-stdio works; all harnesses share one SQLite file via MEMORY_DB_PATH. Auto-capture needs a hook runtime (built into OpenCode, bridged for Claude Code).
Feature | OpenCode | Claude Code | Qwen Code | Codex | Cursor |
16 MCP tools | ✅ | ✅ | ✅ | ✅ | ✅ |
Auto-capture (background) | ✅ plugin | ✅ hooks | ⚠️ adapter | ❌ manual | ❌ Rules |
Profile injection | ✅ compaction | ✅ UserPromptSubmit | ❌ | ❌ | ❌ |
Lexical fuzzy matching | ✅ (v2.0) | ✅ (v2.0) | ✅ (v2.0) | ✅ (v2.0) | ✅ (v2.0) |
Claude Code (CLAUDE_CODE_HOOKS.md) — drop-in hooks replace the plugin: capture + profile injection on
UserPromptSubmit/PreCompact, distill onSessionEnd. Qwen Code (QWEN_SETUP.md) — MCP fully; hooks need a small Gemini-CLI adapter. Codex (CODEX_SETUP.md) · Cursor (CURSOR_SETUP.md) — manual tools.
Scripts
Command | Description |
| compile TypeScript → |
| run the MCP server (stdio) from |
| interactions → profile sections + prune old data ( |
| build + full suite (46 files, 148 tests: 147 pass, 1 skip) |
| run one suite: |
| end-to-end smoke test over JSON-RPC (16 tools) |
Tools (16)
Tool | Description |
| upsert preference (category+key); re-save +0.1 confidence (cap 1.0) |
| search preferences + lessons (FTS5) + recent matching interactions — run before a new task |
| profile sections + top preferences + 5 most recent lessons |
| record a lesson from a correction (situation / mistake / correction) |
| search past prompts by keyword (200-char snippets) |
| delete one row (preference/lesson/interaction) by id (+type avoids cross-table id clash) |
| counts by kind, DB size, oldest/newest interaction, profile sections |
| recent raw interactions (filter by kind) — Smart Distill feedstock |
| export to JSON under |
| task-relevant memories via hybrid retrieval (+ graph expansion), token-budgeted |
| cluster similar memories via embedding similarity; optionally create derived memories linked via |
| typed link between two memories: supports/contradicts/supersedes/derived_from/related_to/caused_by/depends_on |
| merge a duplicate into canonical memory (source superseded; provenance in |
| update fields in place, or create a superseding memory when |
| import from JSON (validates type, dedupes, never overwrites blindly); dry-run by default, |
| scan recent interactions for memory-intent phrases, propose candidates (deterministic, no LLM); dry-run by default, |
CLI (th-memory)
Binary | Entry | Purpose |
|
| MCP server (stdio) — the 16 tools above |
|
| zero-dep local CLI (same DB via |
Usage: th-memory [--db <path>] [--json] [--plain] <command> [options] — per-command help via th-memory <command> --help. highlight/recall --highlight: matches underlined (ESC[4m) on a color TTY, else [mem]…[/mem] markers (piped, --plain, --json).
Flag | Effect |
| use this SQLite file (sets |
| print JSON |
| disable colors |
| show help / print version |
Command | Usage |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
th-memory remember --category coding_pref --key package_manager --value pnpm
th-memory recall pnpm --limit 5
echo "I prefer pnpm for installs" | th-memory highlight -q pnpmDaily usage
The AI accepts Thai and English interchangeably; long-term care: npm run distill summarizes stats and prunes interactions older than 30 days.
"Remember that..." →
remember— save a preference"Summarize memory" / "distill memory" → Smart Distill — AI reads
get_recent_interactions, finds patterns, saves insights itself"How is my memory?" / "memory status" →
memory_stats"Export memory" / "backup memory" →
export_memory"Search history..." →
search_history· "Forget..." →forget
data/ structure
data/
├── memory.db # SQLite (WAL mode) — main DB (+ .db-wal, .db-shm); path overridable via MEMORY_DB_PATH
└── exports/ # JSON files from export_memory (writeable only in this dir)
# everything in data/ is git-ignoredKnown Limitations
No encryption at rest —
data/memory.dbis plain, unencrypted SQLite (WAL mode,better-sqlite3); "100% local & private" means no cloud/network exfiltration, not encrypted at rest — anyone with filesystem access can read it. For sensitive data: OS full-disk encryption (BitLocker / FileVault / LUKS) or an opt-in SQLCipher build (native rebuild + key management); no in-code encryption by default (src/db/index.tsdocuments this).Single-user, no auth layer (Batch B-3) —
userId/sessionId/projectIdare caller-supplied with no authentication or authorization check inside the server; scope isolation (retrieval,get_context, graph,consolidate,link_memory,merge_memory) binds only to caller-sent values, so any scope is readable/writable by passing a different id. Suitable for a single-user local process; do not share one server/DB across untrusted users without an auth layer in front enforcing the correctuserId(projectId/sessionId). No auth is built in by design.
License
Available Tools
16 toolsconsolidateConsolidate memoriesB
Cluster similar memories via embedding similarity and optionally create derived/consolidated memories linked via 'derived_from'. Use during periodic consolidation.
| Name | Required | Description | Default |
|---|---|---|---|
| derive | No | Create a derived memory for each cluster | |
| userId | No | Scope to a user (USER scope) | |
| projectId | No | Scope to a project | |
| sessionId | No | Scope to a session (SESSION scope) | |
| threshold | No | Cosine similarity threshold for clustering (default 0.7) | |
| minClusterSize | No | Minimum members to report a cluster (default 2) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses the clustering mechanism and optional derived creation, but does not state whether original memories are modified, whether the operation is reversible, what side effects occur (e.g., deleting clusters), or any permission requirements. The lack of such context leaves the agent guessing about the tool's impact.
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 with no redundancy. The core purpose is front-loaded, and the usage hint is appended. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool performs clustering and optional derived memory creation, but the description lacks details on return values (no output schema), impact on existing memories, threshold behavior, and what 'consolidation' entails. An agent would need more context to call this correctly and understand its effects.
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 all six parameters are already documented in the schema. The description adds a small amount of context about 'derived_from' linking but does not clarify parameter interactions or defaults beyond what the schema provides. 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 states a specific action (cluster similar memories via embedding similarity) and a resource (memories), with an optional derived-memory creation linked via 'derived_from'. This clearly distinguishes it from sibling memory tools like merge_memory or link_memory by focusing on clustering and derived creation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides a timing hint ('Use during periodic consolidation') but does not specify when to avoid this tool or how it compares to alternatives like merge_memory or link_memory. The guidance is minimal and lacks exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
export_memoryExport memory to JSONA
Export preferences, lessons, profile (and optionally raw interactions) to a JSON file under data/exports/. Only writes inside that directory. Returns the file path, size in bytes and a JSON preview.
| Name | Required | Description | Default |
|---|---|---|---|
| filename | No | Output file name inside data/exports/ (only A-Z a-z 0-9 . _ - allowed, must end with .json). Defaults to memory-export-YYYYMMDD-HHmmss.json | |
| includeInteractions | No | Include raw interaction rows in the export (file gets bigger) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the burden of exposing behavior. It discloses an important safety constraint ('Only writes inside that directory') and states what the tool returns (file path, size, JSON preview). It does not mention overwrite behavior or permissions, but it covers the most material side effect for an export tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with no filler. The first sentence front-loads the core action and target location; the second adds the safety guard and return-value summary. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given there is no output schema, the description compensates by naming return values (file path, size, JSON preview). Combined with full parameter documentation in the schema and the directory-restriction detail, the agent has enough context to call the tool correctly.
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 input schema already documents both filename and includeInteractions. The description adds only the phrase 'optionally raw interactions,' which restates the includeInteractions parameter rather than adding new meaning. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description identifies a specific action ('Export'), a concrete resource (preferences, lessons, profile, optionally raw interactions), and a target destination (JSON file under data/exports/). This clearly distinguishes it from sibling tools like import_memory or recall, making its purpose unmistakable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage — you would call this when you want a JSON export of memory data — but it does not explicitly state when to prefer this tool over alternatives like import_memory or get_recent_interactions. It gives clear context but no exclusions or alternative routing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
extract_memoriesExtract memories from interactionsA
Scan recent captured interactions for memory-intent phrases and propose memory candidates (deterministic, no LLM). Dry-run by default; pass apply=true to create them (source=captured).
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | Interaction kind to scan (default prompt) | |
| apply | No | Create the proposed memories (default false = propose only) | |
| limit | No | Max recent interactions to scan (default 50) | |
| userId | No | Scope extracted memories to a user (USER scope) | |
| sessionId | No | Filter by captured session id (default: all sessions) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and mostly does: it discloses the non-mutating default, the mutation trigger (apply=true), the mechanism (deterministic, no LLM), and the provenance stamped on created records (source=captured). It omits deduplication behavior on repeated runs and what the proposal output contains.
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, zero filler, and the safety-critical fact (dry-run by default) arrives before the opt-in mutation flag.
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?
Five parameters, no output schema, and no annotations, yet the description still conveys the scan target, safety default, and write side effect adequately. It could be slightly more complete about what a 'memory candidate' looks like and whether re-applying creates duplicates.
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 kind, apply, limit, userId, and sessionId are already documented in the schema. The description adds only the source=captured provenance tied to apply, which is a genuine but small increment beyond structured data; baseline 3 applies.
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?
States a specific verb and resource ('scan recent captured interactions for memory-intent phrases and propose memory candidates') plus the mechanism ('deterministic, no LLM'). The propose-vs-create distinction implicitly separates it from sibling tools like remember and get_recent_interactions.
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?
Gives clear operating context: default is dry-run, and apply=true is the condition for persistence. It does not name alternatives or exclusions (e.g., when to use remember instead, or how this relates to get_recent_interactions), so the agent must infer the boundary.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
forgetForget a memory entryA
Delete one memory row (preference, lesson or interaction) by id and sync the search index. Pass type when you know it (ids from remember are preference ids, from save_lesson are lesson ids).
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Which table the id belongs to. Recommended whenever known, because numeric ids can coincide across tables. | |
| target_id | Yes | Row id to delete (id returned by remember/save_lesson) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry the full behavioral burden. It usefully discloses that the operation destroys a row and has a side effect ('sync the search index'), but says nothing about irreversibility, required permissions, or behavior when the id does not exist.
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 tightly written sentences with zero filler, and the core delete semantics and side effect are front-loaded before the optional-parameter advice.
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 two-parameter delete tool with no output schema, the description covers purpose, the key side effect, and parameter sourcing. It could add error/not-found behavior, but nothing essential for correct invocation 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?
Schema coverage is 100% and already explains why type matters across tables, but the description adds genuinely new mapping information: 'ids from remember are preference ids, from save_lesson are lesson ids'. That source-to-type mapping is not derivable from 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?
States a specific verb and resource ('Delete one memory row ... by id') and names the entity types it can target, which clearly separates it from read-side siblings like recall and update_memory. It stops short of naming which sibling to use when the goal is modification instead of deletion, so it does not reach full sibling routing.
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?
Gives conditional guidance for the optional parameter ('Pass type when you know it') and explains where the ids come from. It never states when to prefer forget over update_memory or merge_memory, so the when-to-use-this-tool question is only implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_contextGet assembled contextA
Assemble relevant memories for the current task via hybrid retrieval (+ optional memory-graph expansion), with token budgeting. Use to load memory into context before a task.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of seed memories (default 10) | |
| query | No | Optional focus query to seed hybrid retrieval | |
| userId | No | Scope context to a user (USER scope) | |
| maxTokens | No | Token budget for assembled context (default 2000) | |
| projectId | No | Scope context to a project | |
| sessionId | No | ||
| includeGraph | No | Expand seeds with memory-graph neighbors | |
| includeHistory | No | Include superseded/archived memories |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden. It discloses the use of hybrid retrieval, optional graph expansion, and token budgeting, but does not clarify read-only behavior, return format, or what happens when the token budget is exceeded.
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 dense sentences with no filler: the core mechanism is front-loaded, followed by a usage cue. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 8 parameters, no annotations, and no output schema, the description gives a good high-level purpose but omits important operational details: what the assembled context looks like, how scoping params (userId/projectId/sessionId) interact, and how it differs from recall/search_history. The schema covers param semantics but not these behaviors.
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 88%, so the schema already documents most parameters. The description adds little beyond alluding to query via 'hybrid retrieval' and maxTokens via 'token budgeting'; it does not explain parameter interactions or the effect of includeGraph/includeHistory.
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 states a specific verb (assemble), resource (relevant memories), and method (hybrid retrieval with optional memory-graph expansion and token budgeting). It clearly identifies the tool's purpose beyond the title, though it does not explicitly distinguish it from sibling retrieval tools like recall or search_history.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides an explicit usage cue: 'Use to load memory into context before a task.' This gives clear when-to-use guidance. However, it does not mention alternatives or state when not to use this tool, leaving some sibling ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_profileGet user profileA
Get the distilled user profile: profile sections, top preferences by confidence (max 15), and the 5 most recent lessons. Optional userId/sessionId/projectId scope the auto-projected memories; without them only GLOBAL memories are included.
| Name | Required | Description | Default |
|---|---|---|---|
| userId | No | Include GLOBAL plus this user's USER-scoped memories | |
| projectId | No | Include GLOBAL plus this project's PROJECT-scoped memories | |
| sessionId | No | Include GLOBAL plus this session's SESSION-scoped memories |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations present, the description carries the full burden and does well: it discloses the exact shape of the response (sections, capped preference list of 15, 5 lessons) and the default GLOBAL-only scoping behavior. It omits any statement about permissions, cost, or whether the call is purely read-only, but 'Get' plus the content list makes the operation's nature clear.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two dense sentences with no waste: the first front-loads what is returned, the second front-loads the scoping rule. Nothing is repeated from the schema verbatim.
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?
With no annotations and no output schema, the description must supply both behavior and return shape, and it does: return contents are enumerated and the default scope is stated. Only minor gaps remain (read-only confirmation, auth or timing expectations) for a tool this simple with three optional params.
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 baseline is 3; the description earns one extra by explaining the collective effect of the params ('scope the auto-projected memories') and the no-param default (GLOBAL only), which the per-field schema descriptions only imply individually.
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?
States a specific verb and resource ('Get the distilled user profile') and enumerates the returned contents: profile sections, top preferences by confidence (max 15), and the 5 most recent lessons. This clearly separates it from data-heavy siblings like recall or search_history, though it never names those siblings directly.
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 second sentence gives a real usage rule: 'without [scope params] only GLOBAL memories are included,' which tells the agent how scoping changes results. However, there is no explicit guidance on when to choose get_profile over recall, get_context, or search_history, so the agent must infer the alternative.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_recent_interactionsRecent interactionsA
List recently captured raw interactions (newest first) as [id] ts [kind] content lines. Optionally filter by kind. Use for auditing history or before distilling memory.
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | Filter by kind (prompt / tool_call / error) | |
| limit | No | Max rows (default 20, max 100) | |
| sessionId | No | Filter by captured session id (default: all sessions) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. It discloses that results are newest first and formatted as '[id] ts [kind] content lines', but does not explicitly state read-only behavior, pagination semantics beyond the schema's limit, or any authorization constraints.
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 compact sentences, front-loads the main action and output shape, then gives usage context. Every sentence earns its place with no wasted text.
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?
With no output schema, the description usefully explains the returned line format and ordering. All parameters are covered by the schema, and no required parameters exist. It is nearly complete, though it could explicitly frame the operation as read-only and clarify session filtering behavior.
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 all three parameters are already documented in the schema. The description repeats the optional kind filter but adds no additional parameter semantics beyond what the schema provides, making the baseline 3 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 uses a clear verb and resource: 'List recently captured raw interactions' with ordering and output format. It does not explicitly differentiate itself from the sibling search_history tool, though 'raw interactions' and 'before distilling memory' imply a distinct audit/log purpose.
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?
It gives clear usage context: 'Use for auditing history or before distilling memory.' It does not specify when not to use it or name search_history as an alternative, so it stops short of full routing guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
import_memoryImport memoriesA
Import memories from a JSON array or a .json file inside data/exports/. Validates type, dedupes against existing memories, and never overwrites active memory blindly. Dry-run by default; pass apply=true to insert.
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Path to a .json export file (must be inside data/exports/) | |
| json | No | Inline JSON: an array of memory objects, or { memories: [...] } | |
| apply | No | Actually insert memories (default false = dry run, just report) | |
| userId | No | Scope imported memories to a user (USER scope); overrides per-item userId | |
| trusted | No | Trusted import (default false). Auxiliary data (preferences/lessons/profile) is restored only when true; per-item trusted flags are ignored |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does well: it discloses validation, dedupe against existing memories, a non-blind overwrite policy, a safe dry-run default, and the explicit opt-in required to write. It stops short of describing the dry-run report contents, partial-failure/rollback behavior, or permission requirements.
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 compact sentences, front-loaded with the input sources and then the safety/default behavior; nothing is filler. 'Never overwrites active memory blindly' is the one phrase that is a bit fuzzy rather than precise.
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 5-param, zero-required mutation tool with no annotations and no output schema, the description covers the two things that matter most: safety default and dedupe behavior. It leaves a gap around what the dry-run result reports back and whether file and json are mutually exclusive or combined.
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 every parameter already has a descriptive string, so the schema does the heavy lifting. The description's 'apply=true' note merely restates the apply parameter, and userId, trusted (and the auxiliary-data restoration rule) are left entirely to 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 names a specific verb and resource (import memories) plus the two accepted input sources (JSON array or a .json file inside data/exports/), which is concrete enough to act on. It does not distinguish itself from siblings like export_memory, extract_memories, or remember, so the agent gets no routing signal between them.
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?
'Dry-run by default; pass apply=true to insert' is real operational guidance for choosing the safe mode first. However there is no statement of when to prefer this tool over remember/extract_memories, no prerequisites, and no guidance on choosing file vs inline json.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
link_memoryLink two memoriesB
Create a typed relationship between two memories in the graph (supports/contradicts/supersedes/derived_from/related_to/caused_by/depends_on).
| Name | Required | Description | Default |
|---|---|---|---|
| relation | Yes | Link relation (supports/contradicts/supersedes/derived_from/related_to/caused_by/depends_on) | |
| sourceId | Yes | Source memory id | |
| targetId | Yes | Target memory id |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description bears the full burden of disclosure, but it only says 'create a typed relationship.' It does not reveal side effects, whether existing links are overwritten, directionality of source/target, validation behavior, or whether memories must already exist.
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 one compact sentence with the action front-loaded and the relationship types listed inline. There is no fluff or redundant commentary.
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 three-parameter tool with a fully documented schema, the description is minimally viable, but it leaves gaps: no return behavior, no effect on existing links, and no semantics for the relation types. Given the lack of annotations and output schema, more context would be helpful.
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 little beyond the schema: 'between two memories' reinforces the meaning of sourceId/targetId, and the relation list mirrors the enum exactly. No additional semantic detail is provided.
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 states a specific action – 'Create a typed relationship between two memories in the graph' – and enumerates the valid relationship types. This clearly distinguishes it from sibling tools like update_memory, merge_memory, or consolidate by focusing on inter-memory graph links.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given about when to use link_memory versus alternatives such as consolidate, merge_memory, or update_memory. The description only states what it does, without exclusions, prerequisites, or an explicit 'when to use' cue.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_statsMemory statisticsA
Summarize memory usage: interaction counts by kind, preference/lesson totals, DB file size, oldest/newest interaction timestamps, and profile sections.
| 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 carries the transparency burden. The verb 'Summarize' clearly implies a non-mutating read-style operation, but the description does not explicitly state that it makes no changes, nor does it describe any other behavioral details like cost or freshness.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that leads with the core action and then enumerates the exact delivered statistics. Every word adds useful information, with no filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description serves as the sole source of return-value expectations, and it enumerates counts, totals, file size, timestamps, and profile sections. Some terms like 'profile sections' remain somewhat vague, but for a simple zero-parameter stats tool this 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?
The tool has zero parameters, so there is no parameter semantics to clarify. The schema coverage is trivially 100%, and the description reasonably focuses on the output content instead.
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 a specific verb ('Summarize') and identifies a clear resource (memory usage) with a detailed list of metrics included in the output. It is distinct from sibling tools in content, though it does not explicitly contrast with them.
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 this tool is for retrieving high-level memory statistics and summaries rather than detailed records or management actions. However, it provides no explicit when-to-use or when-not-to-use guidance, nor does it name alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
merge_memoryMerge memoriesA
Merge a duplicate/near-duplicate memory into a canonical one. The source becomes superseded and provenance is recorded in metadata.merged_from.
| Name | Required | Description | Default |
|---|---|---|---|
| sourceId | Yes | Memory to merge away (becomes superseded) | |
| targetId | Yes | Canonical memory to keep (becomes active) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
There are no annotations, so the description carries the full burden. It clearly discloses the key side effect: the source becomes superseded and provenance is recorded in metadata.merged_from. It does not mention reversibility or permissions, but the most important behavioral outcome for an agent to know is explicitly stated.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single well-formed sentence with no fluff. It front-loads the main action and then states the two important behavioral results (source supercoded, provenance recorded). Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter merge tool with no annotations and no output schema, the description gives enough to call it correctly: what it does, which parameter plays which role, and the expected side effects. It could add nuances like whether the operation is reversible, but nothing essential is missing for a typical invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents both sourceId and targetId clearly. The description adds context about the canonical relationship but does not add detailed parameter-level semantics beyond what the schema provides. 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 uses a specific verb ('Merge'), a clear resource ('memory'), and a precise scope ('duplicate/near-duplicate memory into a canonical one'). It distinguishes itself from sibling tools like forget, update_memory, and consolidate by clarifying that this operation is about canonicalization of near-duplicates.
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 when to use the tool: when a memory is a duplicate or near-duplicate of another canonical memory. It does not explicitly name alternatives or give when-not conditions, so it falls just short of a 5, but the trigger condition is clear and actionable.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
recallRecall memoryA
Search preferences + lessons via full-text index, plus recent matching interactions. Use before starting a new task.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max preference/lesson matches (default 8) | |
| topic | Yes | Topic to recall from memory |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the behavioral disclosure burden. It does disclose that the tool searches a full-text index and returns recent matching interactions, but it does not state whether the operation is read-only, how results are ranked, or whether recent interactions are subject to the limit parameter. This is adequate for a search tool but leaves some behavioral details implicit.
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 sentences with no filler. The core search scope is front-loaded, and the usage guidance is immediately actionable. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a two-parameter tool with no output schema, the description covers the key elements: what is searched, the retrieval scope, and when to use it. It does not describe the exact return structure, but it gives enough context for an agent to invoke recall correctly before starting a task.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents both 'topic' and 'limit'. The description adds minimal semantic value beyond the schema, only clarifying that the search targets preferences and lessons. Baseline 3 is appropriate given full 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?
The description states a specific verb ('Search') and resource ('preferences + lessons via full-text index, plus recent matching interactions'), which clearly identifies what the tool does. It is specific enough to distinguish recall from siblings like search_history or get_recent_interactions, even without naming them.
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 gives explicit guidance on when to use the tool: 'Use before starting a new task.' It does not mention alternatives or exclusions, but the timing guidance is clear and actionable for an agent deciding whether to call it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
rememberRemember preferenceA
Save or update a user preference (category+key upsert). Re-saving the same key increases confidence by 0.1 (cap 1.0). Returns the row id for forget().
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Short stable key, e.g. package_manager | |
| value | Yes | The preference value | |
| category | Yes | Preference category |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description fully carries the behavioral burden. It discloses the upsert semantics, the confidence increment on re-saving the same key, the 1.0 cap, and the return value (row id) needed by forget(). This is unusually transparent for a write 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?
Three tight, front-loaded sentences with no filler. Every sentence adds distinct value: what the tool does, how repeat calls behave, and what the caller receives.
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 3-parameter tool with no output schema, the description covers the action, the uniqueness semantics, the confidence side effect, and the return contract. Nothing essential is missing for an agent to invoke it correctly.
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 baseline is 3. The description adds meaningful extra semantics by explaining that category+key together form the identity for the upsert and that re-saving the same key affects confidence, which is not captured in the schema 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 description states a clear action: 'Save or update a user preference' and specifies the uniqueness mechanism as 'category+key upsert'. This differentiates it from generic memory tools like update_memory and the recall/search siblings.
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 intended use case is implied: call this when you need to persist or update a user preference. However, it does not explicitly state when to prefer this over siblings like update_memory, save_lesson, or link_memory, nor does it describe exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
save_lessonSave lessonA
Record a lesson learned from a correction: what situation, what mistake, what is the correct way. Call immediately after the user corrects your work.
| Name | Required | Description | Default |
|---|---|---|---|
| mistake | Yes | What was done wrong | |
| situation | Yes | The original situation/context | |
| correction | Yes | The correct approach |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden, and it does supply useful behavioral context: the operation is a write ('Record') and carries a timing constraint (only after a correction). It does not disclose persistence semantics — whether the lesson is stored permanently, surfaced by recall or search_history, or deduplicated on repeated saves — which an agent would need to anticipate downstream 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?
Two sentences, both purposeful: the first defines what the record captures, the second states when to invoke the tool. No wasted words, and the most operationally important guidance ('immediately after the user corrects your work') is prominent.
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 three simple string params, full schema documentation, and no output schema, the description covers the essentials: what to record and when to call it. The only gap is explicit boundary-setting against the closely related write-siblings (remember, extract_memories, update_memory), which is implied by the correction-specific language but never stated.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all three parameters, setting the baseline at 3. The prose ('what situation, what mistake, what is the correct way') merely restates the parameter meanings rather than adding format, examples, or edge-case nuance, so the description adds marginal value 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 states a specific verb and resource ('Record a lesson learned from a correction') and enumerates the three captured elements ('what situation, what mistake, what is the correct way'), which map directly to the required schema parameters. This correction-specific framing clearly distinguishes it from generic memory siblings like remember and recall.
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?
'Call immediately after the user corrects your work' provides an explicit, unambiguous trigger for invocation. However, it does not name alternatives (e.g., extract_memories or remember) or state when not to use this tool, so it stops short of full routing guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_historySearch prompt historyB
Search past user prompts (kind='prompt') by keyword. Returns timestamped snippets truncated to 200 chars each.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max results (default 10) | |
| query | Yes | Text to search in past prompts | |
| sessionId | No | Filter by captured session id (default: all sessions) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the behavioral disclosure burden. It usefully states the return format (timestamped snippets truncated to 200 chars), but does not cover permissions, rate limits, pagination, or scope beyond the basic search behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two compact sentences with the core purpose front-loaded and no wasted wording. It is appropriately sized for a simple search tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a low-complexity read-only search tool with a fully documented schema, the description is nearly complete: it explains the search scope and result format. The main missing element is explicit guidance about when to use this tool versus related memory retrieval siblings.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the parameters already documented in the schema do not need repeating. The description adds minor context about keyword searching and result truncation, but does not provide meaningful additional semantics for query, limit, or sessionId 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 states a specific verb and resource: search past user prompts by keyword, scoped to kind='prompt'. It is clear what the tool does, though it does not explicitly differentiate from siblings such as recall or get_recent_interactions.
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 the tool is used for keyword searching of past prompts, but gives no explicit when-to-use guidance, prerequisites, or alternatives. It does not say when another sibling tool would be more appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
update_memoryUpdate a memoryA
Update mutable fields (summary/importance/confidence/valid_from/valid_until/metadata) in place. If content changes, a superseding memory is created by default (set supersede=false to edit in place).
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Memory id to update | |
| content | No | New content. When provided, a superseding memory is created (supersede=true) unless supersede=false. | |
| summary | No | New summary | |
| metadata | No | New metadata object (replaces) | |
| supersede | No | If content changes, create a superseding memory instead of editing in place (default true) | |
| validFrom | No | ISO timestamp or null to clear | |
| confidence | No | ||
| importance | No | ||
| validUntil | No | ISO timestamp or null to clear |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it does disclose the single most important non-obvious trait: changing content creates a superseding memory by default rather than mutating the row. It still omits permissions requirements, reversibility, and what happens to the prior memory (invalidation vs retention), so it is strong but not complete.
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 dense sentences with zero filler; the in-place scope comes first and the default-fork side effect second, so the most consequential behavior is front-loaded. Nothing repeats the title or wastes tokens.
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 9-parameter mutation tool with no annotations and no output schema, the description covers field mutability and the supersede default but says nothing about the response (does the returned id change when a superseding memory is created?) or about failure modes such as an unknown id. Adequate, but gaps remain for an agent to call it confidently.
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 78%, so most parameters are already documented in the schema, including the supersede flag and the content/supersede interaction. The description restates the field set (with snake_case names that differ from the schema's camelCase) and adds no format or constraint detail beyond the schema, so it sits at the baseline.
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?
States a specific verb (update) and resource (memory), and enumerates the mutable fields plus the in-place vs supersede distinction. This separates it from write siblings like remember and merge_memory, but it never names an alternative explicitly, so an agent must infer routing from the field list alone.
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?
Usage is implied by 'Update mutable fields ... in place' and by the supersede=false escape hatch, which tells the agent how to force an edit rather than a fork. However, there is no explicit when-to-use vs remember/merge_memory/consolidate guidance and no stated preconditions (e.g. that the id must exist and be live).
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.
3 tool updates
v2.4.0- Changed
extract_memories1 field changed- added
Input schema / properties / sessionIdAdded value: +{ + "description": "Filter by captured session id (default: all sessions)", + "maxLength": 200, + "type": "string" +}
- Changed
get_recent_interactions1 field changed- added
Input schema / properties / sessionIdAdded value: +{ + "description": "Filter by captured session id (default: all sessions)", + "maxLength": 200, + "type": "string" +}
- Changed
search_history1 field changed- added
Input schema / properties / sessionIdAdded value: +{ + "description": "Filter by captured session id (default: all sessions)", + "maxLength": 200, + "type": "string" +}
2 tool updates
v2.3.5- Changed
get_profile4 fields changed- added
Input schema / additionalPropertiesAdded value: +false - added
Input schema / properties / projectIdAdded value: +{ + "description": "Include GLOBAL plus this project's PROJECT-scoped memories", + "type": [ + "string", + "null" + ] +} - added
Input schema / properties / sessionIdAdded value: +{ + "description": "Include GLOBAL plus this session's SESSION-scoped memories", + "type": [ + "string", + "null" + ] +} - added
Input schema / properties / userIdAdded value: +{ + "description": "Include GLOBAL plus this user's USER-scoped memories", + "type": [ + "string", + "null" + ] +}
- Changed
import_memory4 fields changed- added
Input schema / properties / file / maxLengthAdded value: +500 - added
Input schema / properties / json / maxLengthAdded value: +8388608 - added
Input schema / properties / trustedAdded value: +{ + "description": "Trusted import (default false). Auxiliary data (preferences/lessons/profile) is restored only when true; per-item trusted flags are ignored", + "type": "boolean" +} - changed
Input schema / properties / userId / descriptionPrevious value: -"Scope imported memories to a user (USER scope)"New value: +"Scope imported memories to a user (USER scope); overrides per-item userId"
1 tool update
v2.3.0- Changed
consolidate2 fields changed- added
Input schema / properties / sessionIdAdded value: +{ + "description": "Scope to a session (SESSION scope)", + "type": [ + "string", + "null" + ] +} - added
Input schema / properties / userIdAdded value: +{ + "description": "Scope to a user (USER scope)", + "type": [ + "string", + "null" + ] +}
2 tool updates
v2.2.9- Changed
forget1 field changed- changed
Input schema / properties / type / enumPrevious value: -[ - "preference", - "lesson", - "interaction" -]New value: +[ + "memory", + "preference", + "lesson", + "interaction" +]
- Changed
update_memory3 fields changed- added
Input schema / properties / validFromAdded value: +{ + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "ISO timestamp or null to clear" +} - added
Input schema / properties / validUntil / anyOfAdded value: +[ + { + "$ref": "#/properties/validFrom/anyOf/0" + }, + { + "type": "null" + } +] - removed
Input schema / properties / validUntil / typeRemoved value: -[ - "string", - "null" -]
16 tool updates
v2.2.1- First observed
consolidate - First observed
export_memory - First observed
extract_memories - First observed
forget - First observed
get_context - First observed
get_profile - First observed
get_recent_interactions - First observed
import_memory - First observed
link_memory - First observed
memory_stats - First observed
merge_memory - First observed
recall - First observed
remember - First observed
save_lesson - First observed
search_history - First observed
update_memory
TDQS
Scored across 16 tools
Most tools target clearly distinct resources or lifecycle stages, and descriptions clarify the intended use. However, recall vs get_context both retrieve memories for a task, while remember/update_memory and consolidate/merge_memory require reading descriptions carefully to avoid misselection.
Several tools follow a clear verb_noun pattern (link_memory, merge_memory, update_memory, save_lesson, get_profile, search_history), but core operations use bare verbs (remember, forget, recall, consolidate) and one uses a noun form (memory_stats). The set is readable but uses mixed conventions.
At 16 tools the surface is slightly larger than the typical 3-15 sweet spot, but the memory domain is rich enough to justify most tools. Import/export, graph linking, consolidation, and retrieval each earn a place rather than feeling redundant.
The set covers create, read/search, update, delete, linking, import/export, and consolidation lifecycle operations comprehensively. Minor gaps remain, such as no direct get-memory-by-id or bulk clear operation, but agents can work around these through recall/search and targeted deletes.
Maintenance
Related MCP Connectors
Persistent memory for Claude Code and Cursor. Stop re-explaining your project every session.
Persistent cross-session memory shared by Codex, Claude Code, ChatGPT, and other AI agents.
Shared memory for coding agents. Stop re-explaining your codebase every session.
- memoryOAuthcom.leapmemory
Long-term memory for AI assistants. Isolated per-user storage, recall across conversations.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceProvides persistent local memory functionality for AI assistants, enabling them to store, retrieve, and search contextual information across conversations with SQLite-based full-text search. All data stays private on your machine while dramatically improving context retention and personalized assistance.3-
- AlicenseNot gradedqualityNot gradedmaintenanceProvides AI coding agents with persistent, long-term memory through local semantic search and SQLite storage. It enables agents to save and retrieve architectural decisions or project context across different conversation sessions without requiring cloud services.MIT
- AlicenseAqualityDmaintenanceProvides persistent cross-session memory and full-text search for AI coding assistants, storing project context, decisions, and preferences while enabling searchable access to conversation history via local SQLite.81MIT
- AlicenseAqualityBmaintenanceProvides AI coding assistants with persistent memory storage using a local SQLite database. Enables tools to remember project details, notes, and relationships across sessions to maintain context and reduce repetitive explanations.174MIT