feat: add recall__suggest tool#174
Merged
Merged
Conversation
added 2 commits
April 24, 2026 23:14
Exposes getSuggestions() as a dedicated MCP tool so Claude can call it directly to get actionable maintenance prompts, rather than only seeing suggestions buried in recall__stats output. Each suggestion includes the item ID, access count / age, a summary excerpt, and an exact command to run (recall__pin or recall__forget). Closes #172
toolSuggest now resolves pin_threshold / stale_days defaults from config internally (matching toolRetrieve's pattern) rather than relying on the server caller. Removes the inconsistency flagged in code review. Also adds .int().positive() to all three Zod params so callers can't pass floats or negative values, matching the constraints on the same fields in the config schema.
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
recall__suggestMCP tool that surfaces actionable maintenance suggestions: items worth pinning (frequently accessed, not yet pinned) and stale items (never accessed, old enough to be noise)recall__pinorrecall__forgetcommand to act on itconfig.store.pin_recommendation_thresholdandconfig.store.stale_item_daysdefaults; all three thresholds are overridable via tool argsgetSuggestions()query inanalytics.ts— no new DB code neededTest plan
bun test tests/tools.test.ts— all 91 tests pass (7 new fortoolSuggest)bun run typecheck— cleanbun test— full suite 664 pass, 0 failrecall__suggestwith an empty store → returns no-suggestions messagepin_threshold: 1after accessing an item → shows that item under "Pin candidates" withrecall__pincommandrecall__forgetcommandCloses #172