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.
More from coding & agent
- Neon ships official AI Gateway adapter for TanStack AI with single-credential multi-model access — matei_zaharia · 2026-10-23
- Reflection AI's Beam agent auto-builds a Gemma-4 fine-tuning notebook, boosting accuracy 66.5% — danielhanchen · 2026-10-23
- Cua Spaces SDK lets Hermes and other agents run in sandboxes on your own hardware — Teknium · 2026-10-23
- PHP hit by two unauthenticated RCE flaws; ProjectDiscovery launches free internet-wide alert service — cyb3rops · 2026-10-23
- Modal open-sources Spindle, a Tinker-compatible training server that charges GPU time instead of tokens — josh_wills · 2026-10-23
- Testing the Azure Cosmos DB Agent Kit: what it found reviewing a Claude-built app, in RUs saved — adnan_hashmi · 2026-10-23