MCP Codebase Tool Bug Returns Wrong Function Data With No Error Signal
A developer discovered a silent bug in an MCP codebase-intelligence server after a reader described unexpected behavior in a similar tool. When queried about a function, the server returned data for a shadow definition in an experiments folder instead of the real one in src, because the lookup used a first-match search on function name alone. Unlike previously fixed issues involving stale data (issue #102) or failed source reads (issue #101), this flaw — logged as issue #103 — returns fully valid, fresh, correctly sourced data, just for the wrong candidate. The core problem is that the lookup destroys evidence a choice was made at all, meaning no metadata flag can reliably warn the caller that an ambiguous match occurred. The fix requires scoping lookups to file-qualified node IDs rather than relying on name matching alone.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in