Skip to content

aws-diagram-mcp-server: Gemini backend rejects tool registration due to missing schema type #661

@natsuume

Description

@natsuume

Describe the bug

Hello! I'm reporting an issue regarding the tool configuration in MCP Server.

It appears that when the awslabs.aws-diagram-mcp-server package is registered as a tool, all communication with the Gemini CLI environment starts to fail.

My hypothesis is that the Gemini backend validates the schemas of all functions within a tool upon registration. Because the schema for the get_diagram_examples function in this package is missing a type field, the initial validation fails, which then blocks all subsequent requests to the model.

This issue was reproduced with Gemini CLI v0.1.1.

Expected Behavior

Registering the aws-diagram-mcp-server package as a tool should not interfere with the Gemini backend, and the server should continue to operate normally.

Current Behavior

After registering the tool configuration below and starting the server, every request, regardless of the prompt, fails with the following 400 INVALID_ARGUMENT error.

✕ [API Error: [{
    "error": {
      "code": 400,
      "message": "Unable to submit request because `get_diagram_examples` functionDeclaration
  `parameters.diagram_type` schema didn't specify the schema type field. Learn more:
  https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling",
      "errors": [
        {
          "message": "Unable to submit request because `get_diagram_examples` functionDeclaration
  `parameters.diagram_type` schema didn't specify the schema type field. Learn more:
  https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling",
          "domain": "global",
          "reason": "badRequest"
        }
      ],
      "status": "INVALID_ARGUMENT"
    }
  }
  ]]

Reproduction Steps

  1. Add the following tool definition to the MCP Server configuration ( in .gemini/setting.json):
    "awslabs.aws-diagram-mcp-server": {
      "command": "uvx",
      "type": "stdio",
      "args": ["awslabs.aws-diagram-mcp-server"],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR"
      },
      "autoApprove": [],
      "disabled": false
    }
  1. Start the MCP Server with Gemini as the backend using this configuration.
  2. Send any prompt to the server.
  3. Observe that the request fails with the error shown above.

Possible Solution

This issue could likely be resolved by correcting the function schema within the
awslabs.aws-diagram-mcp-server package itself.
Specifically, adding "type": "string" to the parameters.diagram_type for the get_diagram_examples function.

Additional Information/Context

No response

OS

Ubuntu (Windows WSL2)

Server

aws-diagram-mcp-server

Server Version

No response

Region experiencing the issue

us-east-1

Other information

No response

Service quota

  • I have reviewed the service quotas for this construct

Metadata

Metadata

Labels

bugSomething isn't workingneeds-triageThis needs to be handled, it is the first automatically assigned label to issues.staleThese are items that have been around for a long time without progress

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions