You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove the read_note title-lookup paging loop #1958
read_note's title fallback (src/basic_memory/mcp/tools/read_note.py) walks up to _TITLE_LOOKUP_MAX_PAGES pages of title-search results looking for an exact title. The loop was added because bm25 ranked longer titles that repeat the query above the exact title, which could push the exact match past page 1.
#1957 (fixing #1956) makes title search sort an exact, case-insensitive title match first on both backends, so one page is enough.
Remaining case
On SQLite, lower() folds ASCII only, while read_note compares with str.casefold(). A non-ASCII title queried with different case (café notes for Café Notes) is not boosted. It can still land past page 1 when more than 10 fuzzy titles outrank it. Postgres lower() is Unicode-aware and is not affected.
Proposal
Replace the loop with a single title lookup, and delete _TITLE_LOOKUP_MAX_PAGES and test_read_note_title_lookup_stops_at_page_cap. Either accept the SQLite non-ASCII case-mismatch edge case, or close it in the search query instead of paging.
read_note is no longer a registered MCP tool; it stays in core because Basic Memory Cloud still imports it. If Cloud drops that import first, delete the module instead and close this issue.
Type: Enhancement (cleanup and simplification). I applied the enhancement label.
Component: MCP tools (read_note title fallback). It is not Cloud-specific, so no cloud label. Cloud's import of the module is a constraint, not the subject of the issue.
Delete _TITLE_LOOKUP_MAX_PAGES and test_read_note_title_lookup_stops_at_page_cap.
Keep 100% coverage.
Duplicates: I searched for similar issues and found none.
Notes
The decision to make is how to handle the SQLite non-ASCII case-mismatch edge case (café notes vs Café Notes):
Accept it. This is the smallest change.
Close it in the search query, for example by matching on a casefolded title. That is better than paging, but it touches the search layer and needs a migration or an index-time column to be reliable on SQLite.
Which option you pick affects the scope, and it's not stated in the issue. I'd accept the edge case unless you've seen it hit in practice.
This module stays only because Cloud still imports it. If Cloud drops that import first, deleting the module is cleaner and would close this issue.
Per the triage scope, I have made no code changes.
Activity
claude commentedon Oct 29, 2026
Claude finished @phernandez's task in 22s —— View job
Triage
enhancementlabel.read_notetitle fallback). It is not Cloud-specific, so nocloudlabel. Cloud's import of the module is a constraint, not the subject of the issue._TITLE_LOOKUP_MAX_PAGESandtest_read_note_title_lookup_stops_at_page_cap.Notes
café notesvsCafé Notes):refactor(mcp): remove read_note, edit_note, workspaces and chatgpt to…
refactor(mcp): remove read_note, edit_note, workspaces and chatgpt to…