Commit f753ec4
* feat(mcp): add fusion_mode to mempalace_search input schema (closes #302)
palace-daemon#107 ships the daemon-side surface for `/search/hybrid?fusion_mode=…`
but the mempalace MCP layer was dropping the parameter via its schema
whitelist before it reached search_memories(). This closes the gap.
Three changes:
1. Add fusion_mode to mempalace_search's input_schema with enum
["convex", "rrf"] and a description matching search_memories' docstring.
2. Add fusion_mode kwarg to tool_search() defaulting to "convex" (same
as search_memories()), and pass it through to the search_memories
call alongside candidate_strategy.
3. Surface fusion_mode in the trace output so callers can confirm which
algorithm answered.
When palace-daemon's `/search/hybrid?fusion_mode=rrf` reaches mempalace
now, the MCP layer accepts it, threads it to search_memories(), and
the RRF code path actually runs. End-to-end A/B testing of convex vs
RRF against the production palace becomes possible.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(docs): tests + fork-changes entry + README/llms-full re-render for #302
PR #310's initial commit added only the 8-line mempalace/mcp_server.py
change, but the CI check-docs gate requires:
- fork-changes.yaml entry + render of FORK_CHANGELOG.md
- README test count bump (3770 → 3773)
- llms-full.txt re-render via scripts/render-llms-full.py
- python-api re-render via scripts/render-api-docs.py
And the change needs test coverage. tests/test_mcp_server.py now has
three new tests against the boundary the bug was filed for:
- fusion_mode reaches search_memories with convex default and rrf override
- fusion_mode survives the MCP handle_request whitelist (the actual #302 bug)
- schema advertises both modes in enum
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 1d19a8b commit f753ec4
7 files changed
Lines changed: 373 additions & 161 deletions
File tree
- docs
- mempalace
- tests
- website
- public
- reference/python-api
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
27 | 89 | | |
28 | 90 | | |
29 | 91 | | |
| |||
0 commit comments