Skip to main content
Glama

Product Memory

コーディングエージェント向けの、MCP 上で動作する what/why メモリサーバーです。システムの一部が 意味する ことと、なぜそのように構築されたか を、関数レベルまで掘り下げて答えます。これにより、エージェント(またはあなた)が、誰かがすでに行った決定を再導出したり、壊したりすることを防ぎます。現在のコードは どのように のソース・オブ・トゥルースであり続けます。このストアは決してそれを置き換えようとはしません。

このリポジトリには小さな合成デモストア(memory-store/)が同梱されています。orbitcart(チェックアウト/支払い)と beacon(通知配信)という2つの架空のサービスがあり、pm eval、テスト、MCP ツールがすべて、誰かの実際のコードベースを参照せずにすぐ動作します。実際に使うには、projects.yaml を自分のリポジトリに向けてください。

実行方法 — コーディング経験は不要

1. ダウンロードする。 どちらか簡単な方を選んでください:

  • Git をお持ちの場合: Terminal を開いて git clone <this repo's URL> を実行

  • お持ちでない場合: GitHub ページで緑の Code ボタンをクリック → Download ZIP を選択し、解凍します。

2. ダウンロードしたフォルダ内でターミナルを開きます。

  • Mac: Finder でフォルダを探し、右クリックして New Terminal at Folder を選択します(または Terminal を開いて cd と入力し、フォルダをドラッグ&ドロップして Enter を押します)。

  • Windows: ファイルエクスプローラーでフォルダを開き、Shift を押しながらフォルダ内で右クリックし、Open PowerShell window here を選択します。

  • Linux: ファイルマネージャーでフォルダ内を右クリックし、Open Terminal Here を選択します(デスクトップによって異なります)。

3. セットアップスクリプトを実行します。

  • Mac / Linux: bash setup.sh と入力して Enter を押します。

  • Windows: .\setup.ps1 と入力して Enter を押します。スクリプトがブロックされたと表示された場合は、最初に Set-ExecutionPolicy -Scope CurrentUser RemoteSigned を一度実行してから、もう一度試してください。

これだけです。このプロジェクトが必要とするすべてをインストールし(システム全体には何も変更せず、管理者パスワードも不要)、同梱のデモをビルドして、実際に検索を実行して動作を確認します。次のような表示がされます:

✓ Python 3 found (3.13.5)
✓ uv found
✓ Dependencies installed
✓ Demo memory store indexed

Trying a real search against the demo store...
  8.75  [adr/verified] adr-0004-idempotency-keys-generated-client-side
        ADR-0004: idempotency keys are generated client-side, not server-side

Claude Code がすでにマシンにインストールされている場合、スクリプトは Product Memory をそれに接続するかどうかを尋ねます。「はい」と答えて Claude Code を再起動すると、すべてのプロジェクトで使用できるようになります。インストールされていない場合や、別のコーディングエージェントを使用している場合は、下の MCP ツール を参照し、エージェントの MCP 設定を uv run --directory <this folder> python -m product_memory.server に指定してください。

起動したら、次を試してください:

uv run pm serve             # a local web page to browse the memory
uv run pm search "your question here"

実際に(デモではなく)使う準備ができたら、projects.yaml を開いて自分のリポジトリを指定してください。

Related MCP server: SyncContext

2つの設計上の賭け

エージェントが書いたものは、到着時点では信頼されません。 propose_memory を介して提案されたすべての事実は、人間が pm review を実行するまで status: proposed のままになり、決して verified にはなりません。誤ったメモリを信頼することは、正しいメモリを見逃すことよりもコストがかかるため、デフォルトは「真」ではなく「書き込まれた」です。

ランキングは推測ではなく測定されます。 pm eval は、既知の回答を持つ固定された実際の質問群に対して、キーワード検索(SQLite FTS5 上の BM25)とセマンティックベクトルインデックスのどちらが良いかをスコアリングし、一度で決めずに毎回の実行で再チェックします。どちらが良いランクかは この実行 で決定され、そのランクが採用されます。作者のプライベートコーパス(1,192 項目)では、キーワードが MRR 0.785 で、セマンティックのみの 0.436 を上回ります。ベクトルインデックスはその下に追加の再現率としてのみ追記され、キーワードの結果を並べ替えることはありません。このリポジトリの小さな12問のデモセットでは、キーワードだけで12問すべてが見つかります(pm eval → 0.819 MRR, 12/12)。比較にセマンティック/フュージョンの行も含めたい場合は、最初に pm embed を実行してください。eval/queries.json と product_memory/evaluate.py を参照してください。

メモリがどのように蓄積されるか

完全なバックフィルは行いません。完了する前に古くなってしまうからです。4つのチャネルがあります:

#

チャネル

タイミング

登録される内容

1

ドキュメントインポート

リポジトリごとに1回

CLAUDE.md、CONVENTIONS.md、計画ドキュメントへのポインタ/要約 — フォークしたコピーは一切含まない

1b

ドキュメントツリーインポート

大きなドキュメントツリーごとに1回

ハードフィルタリング付きの一括インポート(ベンダードキュメント、スタブ、重複、「✅ Fixed!」セッションレポートは破棄)

2

変更時キャプチャ

エージェントのタスク完了ごと

エージェントが propose_memory を呼び出す → proposed として登録 → pm review で承認

3

質問時バックフィル

「なぜ X はこのように動作するのですか?」と尋ねたとき

エージェントが一度調査し、回答し、その回答をメモリとして提案する

レイアウト

memory-store/           canonical store — markdown files in git, one fact each
  _inbox/               agent proposals awaiting human promotion (or auto-approved, see below)
  <project>/<repo>/     verified + promoted items
demo-repos/             tiny stub repos the demo store's code_symbol entries point at
projects.yaml           registry: project -> repos -> disk paths
product_memory/
  models.py             data contracts (MemoryItem, TaskContext, WhyCard, ...)
  store.py              parse/iterate/propose store files
  index.py              SQLite FTS5 build + ranked search (disposable index)
  semantic.py           chunking + vector index, used for recall only
  evaluate.py           `pm eval` — MRR per retrieval mode, the ranking gate
  conventions.py        derive a repo's house style (declared + observed)
  retrieval.py          packet assembly (deterministic, no LLM)
  staleness.py           flags memories whose source code/doc changed since
  server.py             FastMCP stdio server — the MCP tools
  webapp.py             FastAPI local server (`pm serve`), loopback only
  dashboard.py          the review queue UI
  ingest/                importers + secret redaction
  cli.py                `pm` — the commands below
eval/queries.json       retrieval cases with known answers
tests/

コマンド

pm serve                 # live local server: real search, feedback, persisted marks
pm dashboard --open      # generate the standalone review-queue file
pm search "query"        # ranked search from the terminal
pm eval                  # score retrieval against eval/queries.json — run before ranking changes
pm conventions --project beacon --repo beacon   # derive a repo's house style
pm review                # the only path from proposed to verified
pm index && pm embed     # rebuild the keyword index and the chunked vector index
pm stale                 # notes whose source moved on

MCP ツール

get_task_context · search_product_memory · get_project_overview · get_domain_rules · get_related_decisions · why_code(file, symbol) · get_recent_work · propose_memory (proposed を書き込みます。またはリダクション付きで自動承認します — 代わりに隔離を強制するには PM_REVIEW=1 を参照)

セットアップ

はじめてで、とにかく動かしたいだけなら、bash setup.sh(Windows では .\setup.ps1)を使ってください。上の 実行方法 を参照してください。以下の手動手順は同じことを詳しく説明したものです:

git clone <this repo>
cd product-memory
uv sync
uv run pytest
uv run python -m product_memory.cli eval   # or: pm eval, once installed

# register for ALL repos (user scope):
claude mcp add --scope user product-memory -- \
  uv run --directory "$PWD" python -m product_memory.server

その後、projects.yaml を自分のリポジトリに向け、デモの orbitcart/beacon エントリを削除または残し、作業中に propose_memory で実際のメモリを記録し始めてください。

シークレット

ストアに書き込まれるものはすべて redact_secrets を通過します。これは既知リテラルのリスト(secret-literals.txt、gitignore されている、または PM_SECRET_LITERALS)に加えて、一般的な認証情報の形状ヒューリスティック(ラベル + 近接する高エントロピー値)です。デモストアにはリダクション対象は何も含まれていません。pm eval のテストスイートには、それを正確に検証する CI ガード(test_demo_store_is_clean)が含まれています。

ライセンス

MIT — LICENSE を参照してください。

Available Tools

9 tools
get_domain_rulesA

Verified invariants for a domain operation (e.g. 'wallet' / 'reverse transaction'). MANDATORY before money-path/auth/tenancy changes.

ParametersJSON Schema
NameRequiredDescriptionDefault
domainYes
projectNo
operationYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.7/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 burden of behavioral disclosure. It adds that the invariants are 'verified' and that the call is mandatory before sensitive changes, but it does not state whether the tool is read-only, whether it enforces anything, or what happens if invariants are violated.

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 terse sentences with no filler. It front-loads the core definition and then states the mandatory usage context, making it highly scannable and efficient.

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

Completeness3/5

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

The description provides essential usage context and examples, and an output schema exists to cover return values. However, with no annotations and no schema-level parameter descriptions, the project parameter remains ambiguous and the tool's behavioral profile is incompletely specified.

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 0%, so the description must compensate. The examples give some semantics for 'domain' and 'operation', but the optional 'project' parameter is left completely unexplained, and valid values are not enumerated.

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 states that the tool returns verified invariants for a domain operation and gives concrete examples ('wallet' / 'reverse transaction'). This clearly differentiates it from sibling tools like get_recent_work or get_project_overview, though it does not explicitly name an alternative.

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 explicitly says this is MANDATORY before money-path/auth/tenancy changes, providing a clear trigger condition. It does not mention when not to use it or point to alternative tools, so it stops short of a 5.

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

get_project_overviewB

Product purpose, service map, boundaries, and critical rules for a project/repository. Call when entering a repo for the first time.

ParametersJSON Schema
NameRequiredDescriptionDefault
projectYes
repositoryNo

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description bears the full burden. It discloses neither safety/side effects nor output format, authentication, pagination, or data volume. The 'get' name implies read-only behavior, but the description itself doesn't confirm this or any limitations.

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 sentences with no filler. The content list is front-loaded, and the usage trigger is stated separately. Every sentence earns its place.

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

Completeness3/5

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

For a simple 2-parameter read tool, the description is reasonably complete, but it doesn't define parameter semantics or distinguish itself from overlapping sibling tools. With no output schema and no annotations, an agent is left to guess the exact call shape and return style.

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

Parameters2/5

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

Schema description coverage is 0%, and the schema only provides parameter titles. The description's phrase 'a project/repository' touches on the domain but does not explain the distinction between 'project' and 'repository', their optionality, or behavior when 'repository' is null.

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 names the resource ('project/repository') and enumerates the deliverable contents ('Product purpose, service map, boundaries, and critical rules'), which clearly distinguishes it from sibling tools. It lacks an explicit retrieval verb, but the tool name plus content list make the action clear.

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?

It gives an explicit trigger: 'Call when entering a repo for the first time.' This is clear context but doesn't mention when not to use it or contrast it with overlapping siblings like get_domain_rules or read_memory.

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

get_recent_workC

Worklog: what was done and why, newest first. since = ISO date.

ParametersJSON Schema
NameRequiredDescriptionDefault
sinceNo
projectNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.9/5.0
Behavior3/5

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 result content and sort order, and hints that 'since' is an ISO date, but it does not explain that 'since' filters entries or describe the effect of omitting it. The read-only nature is implied by the verb 'get' but not made explicit.

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

Conciseness4/5

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

The definition is short and front-loaded with the core purpose, with no filler. The 'since = ISO date' note is terse but acceptable, so it loses a point only for being cryptic rather than explanatory.

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

Completeness2/5

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

An output schema exists, so return-value documentation is not required. However, the description fails to document the 'project' parameter and does not clarify what 'since' actually does. For a two-parameter read tool this is an incomplete guide.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for both parameters. It only covers 'since' with a format hint (ISO date) but not its filtering semantics, and it omits the 'project' parameter entirely.

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 identifies the resource (worklog), the content ('what was done and why'), and the ordering ('newest first'). It distinguishes itself as a worklog tool among memory/decision siblings, though it does not name a contrasting tool.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus the sibling tools. There are no alternatives named and no exclusions stated, so an agent must guess when a worklog lookup is appropriate.

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

get_task_contextA

Compact task-specific packet: architecture, business rules, gotchas, code pointers, risks, verification steps. Call BEFORE planning.

ParametersJSON Schema
NameRequiredDescriptionDefault
taskYes
pathsNo
projectNo
repositoryNo
incident_idNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
risksNo
gotchasNo
conflictsNo
freshnessNo
architectureNo
verificationNo
relevant_codeNo
business_rulesNo
integration_rulesNo
task_understandingYes

TDQS

A3.6/5.0
Behavior3/5

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 usefully reveals what the returned packet contains and that it should precede planning, but it does not explicitly state whether the operation is read-only, whether it has side effects, or what permissions/inputs beyond the obvious are needed. Some transparency is present, but the safety profile is left implicit.

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 a single compact sentence with a colon-delimited list of contents followed by a direct, imperative usage rule. It is front-loaded, scannable, and contains no filler or redundant restatement of the tool name.

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 presence of an output schema, the description does not need to explain return values, and it covers the main high-level contents and invocation timing well. It is slightly incomplete in that it omits guidance on optional scoping parameters and sibling-tool differentiation, but it is adequate for a task-context retrieval tool.

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

Parameters2/5

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

Schema description coverage is 0%, and the description provides no parameter-level guidance. The field names (task, paths, project, repository, incident_id) are partially self-explanatory, and 'task-specific' aligns with the required 'task' parameter, but the description does not clarify how optional parameters interact, which combinations are valid, or what values are expected. In a low-coverage situation, the description should compensate and does not.

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 identifies a specific resource—a task-specific packet—and enumerates its contents (architecture, business rules, gotchas, code pointers, risks, verification steps), which makes the tool's purpose fairly clear. It stops short of a strong action verb like 'retrieve' or 'build', but the intent is unambiguous and distinct from broader sibling tools like get_project_overview.

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 explicit 'Call BEFORE planning' gives clear temporal guidance, telling an agent when in the workflow this tool should be invoked. It does not explicitly compare against alternatives or state when not to use the tool, but the timing guidance is strong enough for a 4.

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

propose_memoryA

Record a new memory. Auto-approved by default; set PM_REVIEW=1 to queue it for pm review instead.

Auto-approve is the default because a proposal sitting in the inbox is a fact the next session does not have — the queue was the thing between writing a memory and being able to use it. Redaction and collision-safety are NOT relaxed by it: secrets are still stripped before the write (the store is committed to git) and an id clash still suffixes rather than overwrites. Auto-approved entries record verified_by="auto", so a reader can tell a machine-approved note from one a person checked.

Use at task completion: one type='code_symbol' entry per function you added or meaningfully changed (body: WHAT: / WHY: / NEED: / WHY THIS WAY: / GOTCHA:), passing refs with the PRD, spec or ticket that asked for it, plus one type='worklog' entry for the task itself. Also use to record the answer when the user asks "why does X work this way?".

Never include credentials, tokens, or passwords — this store is committed to git.

ParametersJSON Schema
NameRequiredDescriptionDefault
fileNo
refsNo
tagsNo
typeYes
titleYes
sourceNo
symbolNo
contentYes
projectYes
repositoryNo

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations present, the description carries the full burden and it delivers: it discloses auto-approval default, the PM_REVIEW=1 escape hatch, that redaction/collision-safety are NOT relaxed, that secrets are stripped because the store is committed to git, that id clashes suffix rather than overwrite, and that auto-approved entries carry verified_by='auto'. It also warns against credentials — comprehensive side-effect disclosure well beyond the minimum.

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

Conciseness4/5

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

Four dense paragraphs, front-loaded with the action and the one flag (PM_REVIEW=1) an agent must know first; the rationale sentence explains why auto-approve is the default, which prevents the agent from second-guessing the contract. Minor redundancy exists ('committed to git' appears twice) and the middle rationale paragraph could be tightened, but no sentence is wasted.

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?

For a 10-parameter write tool with no annotations and no output schema, the description covers the essential ground: purpose, approval behavior, safety constraints, usage recipes, and the required refs/content formats. The gaps are the unexplained parameters (symbol, source, file, repository, tags) and the absence of any statement about return values or success signals, though the behavioral contract is unusually complete.

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 0%, so the description must compensate — and it does for the high-stakes parameters: type is given concrete values ('code_symbol', 'worklog'), refs is explained as PRD/spec/ticket references, and content gets a full WHAT/WHY/NEED/WHY THIS WAY/GOTCHA template. However, symbol, source, file, repository, and tags get no semantic explanation, leaving ambiguity around the symbol/file/repository distinction.

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?

Opens with 'Record a new memory' — a specific verb plus resource — and immediately extends into the behavioral contract (auto-approved by default, PM_REVIEW=1 queue). All eight siblings are read/query tools (get_, search_, read_, why_), so the write verb clearly separates this tool; the concrete use cases (code_symbol per function, worklog entry, 'why does X work this way?' answers) make the purpose unmistakable.

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 third paragraph is a direct usage instruction: 'Use at task completion' with a precise recipe — one type='code_symbol' entry per changed function, the WHAT/WHY/NEED/WHY THIS WAY/GOTCHA body format, refs pointing at PRD/spec/ticket, plus a worklog entry — and a second trigger ('record the answer when the user asks why does X work this way?'). It doesn't name read-sibling alternatives explicitly, but the write-vs-read split plus the concrete triggers make when-to-use unambiguous.

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

read_memoryA

The FULL body of one memory, by the id a search hit returned.

The counterpart to snippet results: search gives you the passage that matched and enough to choose from, this gives you the whole note once you have chosen. Returns None when the id is unknown, which is the honest answer for a stale id from an older session rather than a guess at the nearest match.

ParametersJSON Schema
NameRequiredDescriptionDefault
memory_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A5/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden. It clearly discloses that this returns the full note rather than a snippet, and that it returns None for unknown/stale ids instead of guessing a nearest match. This is precise and honest behavioral disclosure.

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, each earning its place: the core behavior, the relationship to search, and the edge-case return behavior. The most important information is front-loaded, and there is no filler.

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?

The tool is simple, has one parameter, and has an output schema. The description covers the source of the id, the return behavior, and the stale-id edge case, so nothing essential is missing for an agent to call it correctly.

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

Parameters5/5

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

The schema only provides a string type and parameter name, so the description must compensate. It does so by explaining that memory_id is specifically the id a search hit returned, and that stale ids from older sessions are possible. This adds essential meaning not present in 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 states a specific verb and resource: it reads the FULL body of one memory by id. It also distinguishes itself from search_product_memory by positioning itself as the counterpart to snippet results.

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 explicitly says to use this tool after search has returned a hit and enough context to choose, then calls out that this retrieves the whole note. It names the alternative workflow (search gives the passage) and the correct sequencing.

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

search_product_memoryA

Ranked search over all verified product/architecture/incident memory.

Returns a SNIPPET of each hit — the passage that matched — plus store_path. Read the file when a snippet turns out to be the thing; full=True returns whole bodies, which costs roughly five times as much for a list you are mostly scanning to choose from.

ParametersJSON Schema
NameRequiredDescriptionDefault
fullNo
limitNo
queryYes
projectNo
repositoryNo

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?

With no annotations, the description carries the burden and does well: it states the tool returns snippets plus `store_path`, explains the cost tradeoff of `full=True` ('costs roughly five times as much'), and implies read-only behavior through 'search' and 'returns.' It does not detail rate limits or authorization, but for a search tool the key behavioral aspects (output format, performance) are covered.

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 compact (about 60 words), front-loaded with the core purpose, and each subsequent sentence adds vital operational detail (return format, follow-up action, cost tradeoff). There is no filler or repeated schema 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?

Despite the lack of parameter descriptions and annotations, the description covers the essential agent workflow: search by query, inspect snippets, read a file when relevant, or request full bodies at a known cost. The presence of an output schema excuses deeper return-value detail, but the intended meaning of project/repository filters remains under-specified.

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 0%, so the description must compensate. It explains the `full` parameter meaningfully (snippets vs. whole bodies, cost), but `query`, `limit`, `project`, and `repository` receive no elaboration—their meanings are left to inference from names and types. The description adds some semantic value but leaves significant gaps for filtering 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 opens with 'Ranked search over all verified product/architecture/incident memory,' naming a specific verb (search), a distinct resource (verified memory), and a clear scope. This differentiates it from siblings like read_memory (which reads files by path rather than searching content) without needing to reference them explicitly.

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 gives actionable workflow guidance: 'Read the file when a snippet turns out to be the thing' and explains when to use `full=True` versus scanning snippets. This effectively contrasts the tool with file-read alternatives, though it does not explicitly discuss when to prefer search_product_memory over other sibling search-like tools such as get_related_decisions.

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

why_codeA

WHAT/WHY/WHY-THIS-WAY/GOTCHA card for a function or file. Call before rewriting existing code so past decisions aren't undone blindly.

ParametersJSON Schema
NameRequiredDescriptionDefault
fileYes
symbolNo

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 carries the full burden. It communicates an informational purpose and implies a safe read-only operation, but it does not explicitly state that it has no side effects, what happens when no card exists, or any 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.

Conciseness5/5

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

The description is a single front-loaded sentence that wastes no words. It packs the tool's purpose, output type, and usage timing into a compact, readable form.

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 only two parameters, an output schema, and a clear usage directive, the description is largely complete for invocation. The main gap is not explaining how it differs from closely related siblings like get_related_decisions, but that is not required for a correct call.

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 0%, so the description must compensate. 'Function or file' loosely maps to the `file` and optional `symbol` parameters, but the description never explicitly connects those concepts to the parameter names or explains the optional/nullable behavior of `symbol`.

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 identifies the tool as a 'WHAT/WHY/WHY-THIS-WAY/GOTCHA card' for a function or file, with the explicit purpose of surfacing past decisions before rewriting. This distinguishes it from sibling retrieval tools like read_memory or get_project_overview by anchoring it to code-specific rationale.

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?

It explicitly states when to call: 'before rewriting existing code.' It does not list exclusions or name alternative sibling tools, but the when-to-use guidance 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.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 9 tool updatesv0.1.0
    • First observedget_domain_rules
    • First observedget_project_overview
    • First observedget_recent_work
    • First observedget_related_decisions
    • First observedget_task_context
    • First observedpropose_memory
    • First observedread_memory
    • First observedsearch_product_memory
    • First observedwhy_code

TDQS

A3.7/5.0

Scored across 9 tools

Disambiguation4/5

The tools have mostly clear, distinct purposes: search vs. read, context retrieval vs. rule retrieval, and write vs. read. However, the context-retrieval tools (get_project_overview, get_task_context, get_domain_rules, get_related_decisions) overlap somewhat and rely on descriptions to tell them apart, and search_product_memory with full=True partially duplicates read_memory.

Naming Consistency4/5

Most tools follow a consistent get_/search_/read_/propose_ verb pattern, which makes the set predictable. why_code breaks the pattern as a noun-style tool name, and the mix of get_ with search_/read_ is a minor deviation.

Tool Count5/5

Nine tools is well within the ideal range for a product memory server, and each tool covers a distinct retrieval or write need. The count feels appropriately scoped without being bloated or thin.

Completeness4/5

The surface covers the core lifecycle well: search, read, targeted context retrieval, recent work, and recording new memories. There is no explicit update/delete/invalidation tool for memories, though the append-only/id-suffix design suggests this may be intentional; still, explicit correction would make it more complete.

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    A
    maintenance
    Persistent memory MCP server that captures coding session context and automatically injects relevant memories into prompts using hybrid search for OpenCode and Claude Code.
    14
    73
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server that captures and recalls coding session memory (failures, decisions, diffs) for AI agents, enabling cross-agent continuity and preventing repeated mistakes.
    68 npm
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    MCP server that gives coding agents persistent, verified memory of codebase decisions, conventions, and skills, with evidence-based claims that are re-checked via git hooks and human-gated review. Enables memory search, propose/approve, chat harvesting, and critique across MCP-compatible tools.
    21
    294 npm
    1
    MIT