When lauching gemini cli after installing package and running a prompt: test
I got this error
✕ [API Error: [{
"error": {
"code": 400,
"message": "The GenerateContentRequest proto is invalid:\n * tools[0].function_declarations[12].name: [FIELD_INVALID] Invalid function name. Must
start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64.",
"errors": [
{
"message": "The GenerateContentRequest proto is invalid:\n * tools[0].function_declarations[12].name: [FIELD_INVALID] Invalid function name.
Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64.",
"domain": "global",
"reason": "badRequest"
}
],
"status": "INVALID_ARGUMENT"
}
}
]]
Gemini cli is up to date
Supergemini package too
It seems that it comes from the "magic" MCP :
🟢 magic - Ready (4 tools)
Tools:
- 21st_magic_component_builder
- 21st_magic_component_inspiration
- 21st_magic_component_refiner
If i remove the magic mcp in settings.json and reload gemini cli : ✅ everything is fine. Here is the part i've removed :
"magic": {
"type": "stdio",
"command": "npx",
"args": [
"@21st-dev/magic"
],
"env": {
"TWENTYFIRST_API_KEY": ""
}
},
See google-gemini/gemini-cli#7664