gemini-cli fix: MCP tool discovery silently dropped tools beyond the first page

xxiaoxiong · ghdev · 2026-10-20

A community PR (#29843) fixes a real bug in google-gemini/gemini-cli: when an MCP server exposed more tools than fit in one page, discoverTools only fetched the first page and ignored the nextCursor token, silently dropping the rest.

The fix wraps listTools in a do...while loop that keeps paginating while nextCursor is returned, mirroring the existing pattern in listResources. Single-page servers behave identically; error handling, filtering, and schema transformation are untouched. The contributor also notes their 1.8 GB machine OOMs on full builds, so validation relied on targeted lint plus CI.

Original post →

More from coding & agent

coding & agent channel →