tan-memory
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DSH_HOME | No | Compatible with the DSH layout; `$DSH_HOME/memory` is used as the fallback storage directory when TAN_MEMORY_HOME is not set. | |
| DSH_MEMORY_HTTP | No | Set to `0` to disable the local management page. | |
| DSH_MEMORY_PORT | No | Sets the loopback management page port, default `37346`. | |
| TAN_MEMORY_HOME | No | Preferred storage directory environment variable. Points to the memory library directory; `~/` expands to home. Resolution order is `--home` → $TAN_MEMORY_HOME → $DSH_HOME/memory; defaults to ~/.dsh/memory if unset. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| memory_searchA | Search long-term memory for facts, preferences and decisions recorded in earlier conversations. Call this whenever the user refers to something from before, instead of assuming you do not remember. Use it for 方案是什么 / 怎么做的 / 长期事实 / 偏好 / 决策. Do NOT use it for 什么时候做的 / 哪个窗口 / 结没结 / 还有哪些没落 — those are timeline questions, use journal_recall. Do NOT use it for 原话 / 逐字引用 — use session_search. (选我:一句话事实/偏好。要四源全景用 memory_recall;要时间线/窗口用 journal_recall;要逐字原话用 session_search.) |
| memory_recallA | Search all four memory sources at once: topic cards, fact entries, journal (what we talked about last time), and raw session archive. Returns them grouped, not merged. Use this first when you need the whole picture; drill down with memory_get / session_get. (选我:四源全景。只要一句话事实用 memory_search;要时间线/窗口用 journal_recall;要逐字原话用 session_search.) |
| memory_addA | Record one durable fact, preference or decision the user stated explicitly. Do not record one-off moods, guesses, or anything the user merely implied. |
| memory_forgetB | Delete one memory entry by id. |
| memory_restoreB | Restore a soft-deleted memory entry by id (from trash). |
| session_syncB | Sync DSH session logs into the archive (L3). Deleted sessions are removed from the archive too. Returns counts. |
| memory_statsA | Return counts for the memory store: entries, topic cards, scope distribution, 7-day growth, refs, archive sessions and audit lines. |
| memory_summarizeA | Save a stage summary as a topic card when the user asks to remember this stretch of conversation. Use it for project progress, plot or character archives, and decision history — not for one-line facts, which belong in memory_add. |
| memory_getA | Read one memory item in full by id: a topic card (topic_*) or a fact entry (mem_*). Use it when memory_search returns a topic card clipped with an ellipsis and a "memory_get" hint. |
| session_searchA | Search the raw session archive (L3) for exact phrases or keywords. Use when memory_search has no confident hit, or when you need to see the original wording. Returns session title/date plus a context window around the hit. Use it for 原话 / 逐字引用 / 「他当时怎么说的」. Do NOT use it for 方案结论 / 长期事实 — use memory_search first; and not for 时间线 / 未决状态 — use journal_recall. (选我:逐字原话/「他当时怎么说的」。要全景用 memory_recall;只查时间线用 journal_recall.) |
| session_getA | Read a slice of one archived session by id (from session_search). |
| reminder_writeA | Manage the user-named reminder list (~/.dsh/memory/reminders.md). ONLY call this when the user explicitly asks to be reminded or chased (提醒我 / 催我 / 记得问我). Do NOT put ordinary loose ends here — those stay in journal as history. Pass keywords that should trigger the reminder: it is injected only when the user text mentions one of them. When the user says the matter is settled, remove it by id. |
| journal_recallA | Query the cross-window journal index by structured fields: date range, window id, status, or a keyword. Use it for questions like 什么时候做的 / 哪个窗口 / 结没结 / 还有哪些没落 / 最近改了什么. Do NOT use it for 方案是什么 / 怎么做的 / 长期事实 — those belong to memory_search. This tool only reads ~/.dsh/memory/journal/index.md and never does content ranking. (选我:时间线/窗口/状态/未决。要方案用 memory_search;要四源全景用 memory_recall;要逐字原话用 session_search.) |
| journal_writeA | Append 收尾 entries to the cross-window journal (~/.dsh/memory/journal/). This is the only write path available in 对话模式, so use it whenever a session wraps up, the user says 收尾/换窗口/晚安, or before compacting context. If the window covered several distinct topics, pass them all in ONE call as |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 14 tools
The four retrieval tools overlap by design, but their descriptions draw explicit boundaries and give routing hints, so an agent can usually choose correctly. Some cognitive load remains between memory_search, memory_recall, session_search, and journal_recall.
All names use snake_case with clear domain prefixes (memory_, session_, journal_, reminder_) and mostly action suffixes. Minor inconsistencies such as memory_stats being a noun and mixed search/recall verbs keep it below perfect.
Fourteen tools fit a multi-layer memory system spanning facts, topics, journal, sessions, reminders, and admin maintenance. Each tool maps to a distinct operation, and the count stays within a reasonable range.
The surface covers create, read, search, delete, restore, summarization, journaling, session sync, and stats. It lacks an explicit update/edit path for existing facts or topic cards and a dedicated reminder list/delete tool, though forget-and-re-add and reminder_write provide workarounds.