Skip to content

Commit 72e57b0

Browse files
phernandezclaude
andcommitted
fix(mcp): keep the phrase-and-keyword search example valid Python
The docstring wrote the example with \"exact phrase\" escapes. Python resolves them when the module loads, so the tool description sent to clients (and the generated reference) read search_notes(""exact phrase" AND keyword", ...) which is not valid Python and cannot be copied. Use single outer quotes so the rendered call is valid as written. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014pmKq6bqCi6Zp6BTHuZjrp Signed-off-by: phernandez <paul@basicmachines.co>
1 parent d41dadc commit 72e57b0

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

docs/mcp-tools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ metadata_filters, that value wins.
417417

418418
##### Advanced Pattern Examples
419419
- `search_notes("project AND (meeting OR discussion)", project="work-project")` - Complex boolean logic
420-
- `search_notes(""exact phrase" AND keyword", project="research")` - Combine phrase and keyword search
420+
- `search_notes('"exact phrase" AND keyword', project="research")` - Combine phrase and keyword search
421421
- `search_notes("bug NOT fixed", project="dev-notes")` - Exclude resolved issues
422422
- `search_notes("docs/2024-*", project="archive", search_type="permalink")` - Year-based permalink search
423423

src/basic_memory/mcp/tools/search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ async def search_notes(
868868
869869
### Advanced Pattern Examples
870870
- `search_notes("project AND (meeting OR discussion)", project="work-project")` - Complex boolean logic
871-
- `search_notes("\"exact phrase\" AND keyword", project="research")` - Combine phrase and keyword search
871+
- `search_notes('"exact phrase" AND keyword', project="research")` - Combine phrase and keyword search
872872
- `search_notes("bug NOT fixed", project="dev-notes")` - Exclude resolved issues
873873
- `search_notes("docs/2024-*", project="archive", search_type="permalink")` - Year-based permalink search
874874

0 commit comments

Comments
 (0)