Conversation
Summary of ChangesHello @jhead, 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 an inconsistency in how custom MCP tools handle missing descriptions. Previously, tools without a specified description would use an empty string when passed to LLM providers, causing errors with services like AWS Bedrock. The change ensures that if a description is not provided, the tool's name is used as a fallback, aligning behavior between the UI and LLM configuration and improving compatibility. Highlights
Changelog
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
|
There was a problem hiding this comment.
Code Review
This pull request addresses an issue where custom MCP tools without a description could cause errors with LLM providers that do not permit empty strings for tool descriptions, such as AWS Bedrock. The change correctly implements a fallback to use the tool's name when a description is not provided. This makes the server-side behavior consistent with the UI and improves compatibility. The fix is well-targeted and correct.
Summary
Custom MCP tools without
descriptioncurrently fallback to using thenameas thedescriptionin the UI, but not when creating the tool config in the LLM request. Some LLM providers, e.g. AWS Bedrock, do not permit empty strings''.Example docs: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ToolSpecification.html
Existing fallback behavior: https://github.com/FlowiseAI/Flowise/blob/main/packages/components/nodes/tools/MCP/CustomMCP/CustomMCP.ts#L102
This causes an issue where
causes Bedrock to reject the request.
This change makes the UI and server fallback behavior consistent.