fix(mcp): correct dispatch arg names in 7 consolidated modes#149
Merged
Conversation
`tools_consolidated.go` was passing arg names to underlying tool
handlers that the handlers didn't unmarshal, producing permanent
INVALID_INPUT envelopes for 7 modes:
- trace_relationships/{callers,consumers,producers,dependencies,dependents}
passed `node_id` to consumerLikeTool handlers that only read
`target_id`.
- trace_relationships/shortest_path passed `from`/`to` but
find_shortest_path reads `source`/`target`.
- find_in_graph/by_endpoint passed `node_id` but
find_related_endpoints reads `identifier`.
Parity test (PR #139) documented but didn't fix these. This patch
corrects the dispatch sites and flips the test expectations from
`CodeInvalidInput` to dispatch-reached-handler shapes.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
4 tasks
This was referenced May 13, 2026
aksOps
added a commit
that referenced
this pull request
May 14, 2026
Stale doc references after Phase 6 (Java deletion, #132) and the Kuzu 0.7.1 → 0.11.3 bump (#155 + #159). - CLAUDE.md / PROJECT_SUMMARY.md: bump Kuzu 0.7.1 → 0.11.3, go-sqlite3 1.14.22 → 1.14.44, cobra to 1.10.2; note native FTS. - AGENTS.md: rewrite "What this repo is" (no more "REST API"); flip `mvn -B -ntp clean verify` → `go test ./...`; clarify that REST + React SPA were deleted in Phase 6 and won't return. - SECURITY.md: rewrite scope. Drop the dead JAR / serve / REST API / React UI / H2 / Neo4j Embedded references. New in-scope list covers every codeiq subcommand, the 10 MCP tools (with `run_cypher` mutation gate called out), `.codeiq/cache/` (SQLite) + `.codeiq/graph/` (Kuzu), and `read_file` path sandboxing. Add the security CI workflows (CodeQL, Semgrep, OSV-Scanner, Trivy, Gitleaks, SBOM, Socket Security) + perf-gate to the hardening references. - CHANGELOG.md: populate [Unreleased] with the OOM-fix saga (PRs #145-#148), the five correctness fixes (#149-#153), the Kuzu 0.7.1 → 0.11.3 bump (#155-#158), the FTS migration (#159), the Dependabot config rewrite (#154), and the enrich CLI knobs. No code changes. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tools_consolidated.godelegate()calls were passing arg names that the underlying tool handlers don't unmarshal, producing permanentINVALID_INPUTenvelopes for 7 modes:trace_relationships/{callers,consumers,producers,dependencies,dependents}— passednode_idbut handlers readtarget_idtrace_relationships/shortest_path— passedfrom/tobut handler readssource/targetfind_in_graph/by_endpoint— passednode_idbutfind_related_endpointsreadsidentifierThe parity test landed in #139 documented but did not fix these. This patch corrects the dispatch sites and flips the test expectations from
CodeInvalidInputto dispatch-reached-handler shapes.Test plan
cd go && CGO_ENABLED=1 go test ./internal/mcp/... -count=1— 116 passedTestTraceRelationships_AllModesnow exercises the real handler pathsTestFindInGraph_AllModesby_endpointmode now reaches the handler🤖 Generated with Claude Code