Repository navigation
feat(memory): sharpen MCP tool descriptions for reliable invocation - #399
Merged
Merged
Conversation
Search previously gated recall behind "non-trivial task", which agents
resolve by skipping, and gave no trigger for the highest-value moment:
hitting an error mid-task. Store gave a vague post-work cue and treated
dedupe as a preference rather than a procedure.
- memory_searchKnowledge: trigger on ANY task plus IMMEDIATELY on
errors/test failures, with an error-text example and a narrow
skip-only clause
- memory_storeKnowledge: explicit AFTER-completing + post-error/post-
gotcha triggers, procedural search-first-then-update routing, and a
one-line do-not-store list
- Schema fields: query accepts pasted error text; title written so a
future agent knows when it applies
- memory_updateKnowledge: cover additive updates ("or incomplete")
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Actual file changes for the previous commit (its pre-commit hook failure left the index unstaged, producing an empty commit). Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Actual file changes for the earlier empty commit (pre-commit hook failure had left the index unstaged). Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Actual file changes for the earlier empty commits (the pre-commit suite resets the index mid-run, producing empty commits). Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tightens the always-loaded MCP tool metadata in
packages/memory/src/server.tsso agents retrieve memory before work and store after — without being told. Implements the top recommendations from the tool-metadata evaluation.Two invocation failures being fixed:
Before / after
memory_searchKnowledgememory_storeKnowledgememory_updateKnowledgesearch.queryfieldstore.titlefieldserver.descriptions.test.tsupdated to pin the new phrasing while preserving its original intent (timing cue + example + dedupe cue); it now also asserts the error trigger and the store→update cross-reference.Test plan
packages/memory: vitest — 23 files / 171 tests passfmt:check,lint,test(all 8 projects incl. Rust) passgit diff origin/main— onlyserver.ts+ the descriptions test changedGenerated with Devin