fix: use service alias in MCP tool names for aliased services#224
fix: use service alias in MCP tool names for aliased services#224Bortlesboat wants to merge 1 commit intogoogleworkspace:mainfrom
Conversation
Fixes googleworkspace#162 — when services are aliased (e.g., events, apps-script, admin-reports), build_tools_list used the Discovery document's internal name instead of the user-configured alias, causing tools/list to return names that handle_tools_call couldn't match. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a bug where tools associated with aliased services were not correctly recognized due to a discrepancy in how their names were generated and validated. By standardizing the tool name prefix to use the service alias, the change ensures that all configured services, including those with custom aliases, function as expected within the system's tool handling mechanism. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request correctly fixes a bug in the Model Context Protocol (MCP) server where tool names for aliased services were being generated incorrectly. By using the service alias (svc_name) instead of the discovery document's internal name (doc.name) as the prefix for tool names, the change ensures that generated tools can be correctly validated and executed by handle_tools_call. The fix is well-targeted and resolves the issue for aliased services in 'full' tool mode.
Summary
build_tools_listuseddoc.name(the Discovery document's internal name) as the tool name prefix, buthandle_tools_callvalidates againstconfig.serviceswhich contains user-configured aliasessvc_name(the service alias) so listed tools match what the handler expectsTest plan
eventsfor workspaceevents)tools/listand verify tool names use the alias🤖 Generated with Claude Code