zed
zed copied to clipboard
AI: Any Google AI model API call fails if MCP servers are enabled in the Agent Panel
Summary
When using Agent Panel and turning on any MCP servers, sending a prompt the Google AI API will return a 400 GenerateContentRequest.tools[0].function_declarations[14].parameters.required[0]: property is not defined.
Description
Steps to trigger the problem:
- Agent Panel -> Settings -> Add 1 MCP server and enable it.
- I used @yokingma/time-mcp for this repro
- Agent Panel -> Settings -> Enable Google AI following steps described here: https://zed.dev/docs/ai/configuration#google-ai
- Agent Panel -> New Thread -> Select any Google AI model -> Send a prompt.
Actual Behavior: Receive a 400 API response, the payload is as follows:
Error interacting with language model
failed to stream completion
error during streamGenerateContent, status code: 400, body: {
"error": {
"code": 400,
"message": "* GenerateContentRequest.tools[0].function_declarations[14].parameters.required[0]: property is not defined\n",
"status": "INVALID_ARGUMENT"
}
}
Expected Behavior:
Some LLM output.
Tool usage should work if prompted, since zed's docs say Google AI supports tools:
Model Provider Details
- Provider: Google AI via Key
- Model Name: Any model. In this particular example I used
Gemini 2.0 Flash - Mode: Agent Panel
- MCP Servers in-use: Any MCP server at all, but for this repro I used @yokingma/time-mcp
- Other Details:
- It does not matter if you prompt the LLM to invoke a tool or not. Any API call fails if any MCP server is enabled.
- If you disable all MCP servers you get a successful response as expected.
- Text Threads work with Google AI 🥇
Zed Version and System Specs
Zed: v0.188.4 (Zed) OS: macOS 15.3.0 Memory: 32 GiB Architecture: aarch64