Sunset SemanticCodeSearchService MCP tool
What this does
Replaces the custom Mcp::Tools::SemanticCodeSearchService MCP tool with the auto-generated MCP tool backed by the REST endpoint GET /projects/278964/search/semantic
(added in !227817 (merged)),
discovered via route_setting :mcp — the same ApiTool mechanism as get_issue, create_merge_request, search, etc.
It also removes the now-fully-rolled-out mcp_semantic_code_search_use_rest_api feature flag (enabled globally on GitLab.com — Slack rollout).
This is a clean recreation of !227818 (closed) on current master.
Changes
- Empty
EE_CUSTOM_TOOLS—semantic_code_searchis now discovered as a RESTApiTool. - Remove the dead flag branch (
use_rest_api_for_mcp_tool?) fromget_tool/build_ee_tools. - Delete
ee/app/services/mcp/tools/semantic_code_search_service.rband its spec. - Delete the
mcp_semantic_code_search_use_rest_apifeature flag definition. - Update
manager_spec/list_tools_specto assert the ApiTool-backed tool.
Net: +30 / −1532 (mostly the deleted service + its 1115-line spec).
Behavior change to note
The old custom service was hidden from tools/list when semantic search wasn't available for a project (it subclassed BaseService, which the list handler gates on available?). The REST ApiTool is not gated this way, so semantic_code_search is now always listed and availability is enforced at execution time (authorization + indexing checks still apply). This matches how every other REST-backed MCP tool behaves.
Screenshot — semantic_code_search returning results via MCP
Related
- Supersedes !227818 (closed) (closed)
- REST endpoint: !227817 (merged) (merged)
- Flag introduced: !228569 (merged) (merged)
- Closes https://gitlab.com/gitlab-org/gitlab/-/work_items/593917 https://gitlab.com/gitlab-org/gitlab/-/work_items/593918
