Developer finds MCP tool silently ignored sort parameter due to GitHub API mismatch
A developer building an MCP server discovered that their tool's docstring advertised 'stars' and 'forks' as valid sort options for listing GitHub repositories, but GitHub's REST API for that endpoint does not support those values. The API silently ignores unrecognized sort parameters and falls back to its own default order, returning a plausible-looking result with no error or warning. The valid sort values for the 'List repositories for a user' endpoint are 'created', 'updated', 'pushed', and 'full_name' — not 'stars' or 'forks', which belong to a separate search endpoint. The bug went undetected because no automated checks validated the tool's claims against the external API's documented contract. The developer resolved the issue by implementing a client-side sort after fetching the data, making the promised functionality work as advertised.
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