Skip to content

fix: MCP server dispatch — add proper tools/call handler#12

Merged
alderpath merged 1 commit into
masterfrom
fix-mcp-dispatch
Jun 16, 2026
Merged

fix: MCP server dispatch — add proper tools/call handler#12
alderpath merged 1 commit into
masterfrom
fix-mcp-dispatch

Conversation

@alderpath

Copy link
Copy Markdown
Contributor

Problem

The MCP server advertised 7 tools in tools/list but had no tools/call handler. Every tool invocation via standard MCP protocol returned method not found. The code was checking for non-standard method names like tools/search and tools/compress that no MCP client ever sends.

Fix

  • Added tools/call handler that dispatches by params.name (e.g., reliary_search, reliary_compress)
  • Results wrapped in MCP-standard content: [{ type: "text", text: ... }] format
  • tool_definitions() extracted as shared function used by both tools/list and dispatch logic
  • Proper required fields in all tool schemas
  • Unknown tool names return standard -32601 error code

Tests

  • 5 unit tests (tool definitions validation, response format, compress/unknown/search handlers)
  • 3 e2e tests (full tool list + call cycle, error handling, old dispatch rejection)
  • All pass in both debug and release

…ocol

- tools/list now serves tool metadata under reliary_* names
- tools/call dispatches by params.name to the correct handler
- All 7 tools (search/compress/risk/fix/dead/heal/prior) work over MCP
- E2E tests cover initialize, tools/list, tools/call, and old-dispatch rejection
@alderpath alderpath merged commit 22f0710 into master Jun 16, 2026
4 checks passed
@alderpath alderpath deleted the fix-mcp-dispatch branch June 16, 2026 19:46
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