MCP servers with hundreds of endpoints: a search-spec-call pattern that keeps context small
sandeepK1125 · reddit · 2026-11-04
- Problem: ApyHub's MCP server initially exposed one tool per API endpoint, but past a few dozen tools the model started picking the wrong one, and tool definitions alone ate a big chunk of the context window.
- Solution: Collapse to three core tools — searchapis, getapispec, callapi — plus a small curated list. The agent searches for what it needs, pulls the spec only for the chosen API, then calls it. Context stays small and the catalog can grow without touching the server.
- Tradeoffs: more round trips per task, and the model sometimes skips reading the spec and guesses parameters.
- Open questions posed: expose every tool up front vs. a discovery step; how to stop models guessing parameters; at what tool count selection accuracy drops.
More from coding & agent
- Autonomous agent designs target-specific MSAs to improve AlphaFold 3 complex prediction — SJTU · 2026-11-04
- NVIDIA paper: frequent context compaction preserves accuracy, long-context models may be unnecessary — nvidia · 2026-11-04
- Vibe-coded with Opus 5.5 and Meshy: five stained-glass 3D scenes with switchable lighting — Pristine_Good7326 · 2026-11-04
- Why LLM-Written Docs Fail: Models Optimize for Punchiness, Not Readability — mervenoyann · 2026-11-04
- OpenAI DevDay demo shows forking agent task history at any step — paw_lean · 2026-11-04
- ByteDance open-sources Axion 1.0-35B agent foundation model with full reproducible recipe — pmttyji · 2026-11-04