9e29c221b9
parse_prefixed_name now matches the qualified mcp_<server>_<tool> name against the set of registered server names (connections + configured servers) and prefers the longest matching server name, instead of naively splitting on the first underscore. Tools on servers whose names contain underscores (e.g. "my_db") are now reachable, and an overlapping pair like "my" and "my_db" routes to the correct server. Falls back to the legacy first-underscore split when no registered server matches, preserving backward compatibility. Harvested from PR #2747 by @cyq1017; supersedes the equivalent fix in PR #2746 by @puneetdixit200. Both contributors diagnosed and fixed issue #2744; #2747 landed for its longest-match tie-break test coverage. Fixes #2744. Co-authored-by: cyq1017 <61975706+cyq1017@users.noreply.github.com> Co-authored-by: puneetdixit200 <236133619+puneetdixit200@users.noreply.github.com>