Skip to content

Update the MCP Codebase Search tool name and description

What does this MR do and why?

This changes the Codebase Semantic Search MCP tool:

  • updates tool name from get_code_context to semantic_code_search, which is more descriptive of what it does
  • updates tool description to give more information about what is powering the search + how and when it can be used
  • renames the search_term parameter to semantic_query
  • updates some parameter descriptions to give a better idea of what to specify

These name and descriptions are based on Duo Chat recommendations, with tweaks based on my own understanding of the tool and context engineering best practices.

Caveat

These updates still does not guide the Agentic Chat into preferencing Codebase Semantic Search over the Duo Agent Platform's built-in GitlabSearch tool. As mentioned in #573109 (comment 2807811095), Agentic Chat not picking the more appropriate tool is a larger problem outside of this.

Once GitlabSearch has been migrated from DAP to MCP, putting it in the same group as the Codebase Semantic Search tool, we can look into further improvements (e.g.: adding some guidance about which tool is more appropriate when).

References

Related issues:

Screenshots or screen recordings

Tool on MCP Inspector

Screenshot_2025-10-09_at_15.03.02

Tool usage with Agentic Chat

Agentic Chat still requires some prompting from the user like "using semantic search" in order to invoke the Codebase Semantic Search tool, but as noted above, Agentic Chat not picking the more appropriate tool is a larger problem outside of this.

Example 1 Example 2
Screen_Recording_2025-10-09_at_13.13.01 Screen_Recording_2025-10-09_at_13.15.58

How to set up and validate locally

You just need to verify that the tool has been updated. To do so:

  1. Follow this development guide to setup the MCP server
  2. Follow the guide on debugging with MCP Inspector
  3. On the MCP Inspector browser page:
    1. connect to your local GDK's MCP server
    2. click "List Tools" - there should be a tool called semantic_code_search
    3. click on semantic_code_search and check the descriptions

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Pam Artiaga

Merge request reports

Loading