Skip to content

feat: add recall__suggest tool#174

Merged
sakebomb merged 2 commits into
mainfrom
feat/recall-suggest-tool
Apr 25, 2026
Merged

feat: add recall__suggest tool#174
sakebomb merged 2 commits into
mainfrom
feat/recall-suggest-tool

Conversation

@sakebomb
Copy link
Copy Markdown
Owner

Summary

  • Adds recall__suggest MCP tool that surfaces actionable maintenance suggestions: items worth pinning (frequently accessed, not yet pinned) and stale items (never accessed, old enough to be noise)
  • Each result includes the item ID, a summary excerpt, and the exact recall__pin or recall__forget command to act on it
  • Wired to config.store.pin_recommendation_threshold and config.store.stale_item_days defaults; all three thresholds are overridable via tool args
  • Backed by the existing getSuggestions() query in analytics.ts — no new DB code needed

Test plan

  • bun test tests/tools.test.ts — all 91 tests pass (7 new for toolSuggest)
  • bun run typecheck — clean
  • bun test — full suite 664 pass, 0 fail
  • Call recall__suggest with an empty store → returns no-suggestions message
  • Call with pin_threshold: 1 after accessing an item → shows that item under "Pin candidates" with recall__pin command
  • Call with stale item (backdated) → shows under "Stale items" with recall__forget command

Closes #172

Sakebomb 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.
@sakebomb sakebomb merged commit 2232722 into main Apr 25, 2026
3 checks passed
@sakebomb sakebomb deleted the feat/recall-suggest-tool branch April 25, 2026 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: recall__suggest tool — surface pin candidates and stale items to Claude

1 participant