Gemini CLI Returns HTTP 400 Error When Too Many Tools Are Enabled
Gemini CLI fails with an HTTP 400 Bad Request when a session has too many tools enabled, because the request exceeds the Gemini API's tool limit and is rejected. The reported threshold is unclear, with the original issue citing both 128 and 400 tools, so 128 is treated as the safe ceiling. Users can work around the problem by disabling unneeded MCP servers and extensions and retrying. A pull request (#26084) that would cap the tool count automatically is open but not yet merged. The bug was reported in the google-gemini/gemini-cli repository in March 2026 and remained open as of November 2026.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.



Discussion (0)
Log in to join the discussion and vote.
Log in