Skip to content

Compatibility Issue with Gemini Models - Strict Function Name Requirements in MCP #39

Open
@designcomputer

Description

@designcomputer

Compatibility Issue with Gemini Models - Strict Function Name Requirements in MCP

Description:

Users attempting to utilize this Model Context Protocol (MCP) with Gemini models are encountering errors related to the naming conventions of functions declared within the function_declarations of the request. Specifically, Gemini models appear to have stricter requirements for function names compared to other large language models that have successfully integrated with this MCP.

The observed error indicates that function names:

  • Must start with a letter (a-z, A-Z) or an underscore (_).
  • Can only contain alphanumeric characters (a-z, A-Z, 0-9), underscores (_), dots (.), or dashes (-).
  • Must have a maximum length of 64 characters.

Failure to adhere to these rules results in an "Invalid function name" error from the Gemini API (or tools interacting with it, such as GitHub Copilot). This issue has been observed even when the MCP functions correctly with other LLMs.

Impact:

This stricter validation in Gemini models can prevent users from seamlessly utilizing the mysql_mcp_server with Google's latest generation of models without modifying their existing function naming conventions.

Observed in Contexts Like:

  • Direct interaction with Gemini APIs.
  • Integration through tools like GitHub Copilot (as reported by a user).
  • Potentially within higher-level frameworks integrating Gemini.

Status:

We are actively investigating this compatibility issue with Gemini models. The team is exploring potential solutions, which may include:

  • Documenting the specific naming requirements for Gemini within the MCP documentation.
  • Investigating if any adjustments can be made within the MCP to better accommodate Gemini's requirements without breaking compatibility with other models.

Next Steps:

  • Further testing with different Gemini models and integration methods.
  • Detailed analysis of Gemini's official documentation regarding function calling and naming conventions.
  • Potential updates to the MCP to address this incompatibility.

We appreciate your patience as we work to ensure seamless compatibility with the latest advancements in large language models.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions