A bug in the `list_repos` function of the MCP tool was discovered where passing a negative value for the `limit` parameter resulted in almost all repositories being returned, contrary to the docstring's claim of a 1-100 limit. This occurred because Python's list slicing interprets negative indices as counting from the end, and the existing code only clamped the upper bound, not the lower one. The fix involves adding a `max(0, ...)` clamp to ensure that negative or zero limits correctly return an empty list, aligning the function's behavior with its documented contract. AI
IMPACT Fixes a potential issue where AI models could unintentionally retrieve excessive data by misinterpreting negative limit parameters.
RANK_REASON Bug fix in a specific tool's function.
AI-generated summary · Google Gemini · from 1 sources. How we write summaries →