From db6d0dcd9e20c5bb8e3c8749b603fbbd0296dfef Mon Sep 17 00:00:00 2001 From: phernandez Date: Tue, 24 Feb 2026 20:45:42 -0600 Subject: [PATCH] docs: add tag: shorthand limitation note to search_notes docstring The tag: query shorthand doesn't work with hybrid search (default when semantic search is enabled) because it strips the text query. Document the workaround: use search_type="text" or the tags parameter instead. Co-Authored-By: Claude Opus 4.6 Signed-off-by: phernandez --- src/basic_memory/mcp/tools/search.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/basic_memory/mcp/tools/search.py b/src/basic_memory/mcp/tools/search.py index ea0245fa..09b43d1a 100644 --- a/src/basic_memory/mcp/tools/search.py +++ b/src/basic_memory/mcp/tools/search.py @@ -302,6 +302,10 @@ async def search_notes( - `search_notes("work-project", "category:observation")` - Filter by observation categories - `search_notes("team-docs", "author:username")` - Find content by author (if metadata available) + **Note:** `tag:` shorthand requires `search_type="text"` when semantic search is enabled + (the default is hybrid). Alternatively, use the `tags` parameter for tag filtering with + any search type: `search_notes("project", "query", tags=["my-tag"])` + ### Search Type Examples - `search_notes("my-project", "Meeting", search_type="title")` - Search only in titles - `search_notes("work-docs", "docs/meeting-*", search_type="permalink")` - Pattern match permalinks