Skip to content

fix(serve): honor --palace; fix MCP unknown-tool message; document sweep#9

Merged
quangdang46 merged 1 commit into
mainfrom
devin/1779022609-fix-serve-palace-and-mcp-error-msg
May 17, 2026
Merged

fix(serve): honor --palace; fix MCP unknown-tool message; document sweep#9
quangdang46 merged 1 commit into
mainfrom
devin/1779022609-fix-serve-palace-and-mcp-error-msg

Conversation

@quangdang46
Copy link
Copy Markdown
Owner

Three release-blocker findings from end-to-end testing:

  1. mpr --palace

    serve silently ignored --palace and always used the global ~/.config/mempalace/config.json. Thread palace_arg through run_server and let it override config.palace_path so users connecting their AI client to a project palace can do so without re-init'ing the global config. ~/ expansion mirrors resolve_palace_path.

  2. tools/call for an unknown tool name returned JSON-RPC -32601 with message='tools/call' (echoing the method name, not the bad tool). Switch to -32602 (invalid_params, which is what a bad 'name' param actually is) and surface 'Unknown tool: ' so MCP clients get an actionable error.

  3. mpr sweep had no description in --help. Add a clap doc comment so it stops looking like an undocumented hidden command.

Adds 4 regression tests:

  • test_unknown_tool_returns_invalid_params_with_tool_name
  • test_resolve_palace_override_expands_tilde_home
  • test_resolve_palace_override_absolute_path_passthrough
  • test_resolve_palace_override_relative_path_passthrough

cargo fmt clean, clippy -D warnings 0, 424 tests pass.

Three release-blocker findings from end-to-end testing:

1. mpr --palace <dir> serve silently ignored --palace and always used
   the global ~/.config/mempalace/config.json. Thread palace_arg through
   run_server and let it override config.palace_path so users connecting
   their AI client to a project palace can do so without re-init'ing the
   global config. ~/ expansion mirrors resolve_palace_path.

2. tools/call for an unknown tool name returned JSON-RPC -32601 with
   message='tools/call' (echoing the method name, not the bad tool).
   Switch to -32602 (invalid_params, which is what a bad 'name' param
   actually is) and surface 'Unknown tool: <name>' so MCP clients get
   an actionable error.

3. mpr sweep had no description in --help. Add a clap doc comment so
   it stops looking like an undocumented hidden command.

Adds 4 regression tests:
- test_unknown_tool_returns_invalid_params_with_tool_name
- test_resolve_palace_override_expands_tilde_home
- test_resolve_palace_override_absolute_path_passthrough
- test_resolve_palace_override_relative_path_passthrough

cargo fmt clean, clippy -D warnings 0, 424 tests pass.
@quangdang46 quangdang46 merged commit 98a8b83 into main May 17, 2026
4 checks passed
@quangdang46 quangdang46 deleted the devin/1779022609-fix-serve-palace-and-mcp-error-msg branch May 17, 2026 13:19
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.

1 participant