Hiding MCP methods behind Code Mode killed discovery; a routing skill layer fixed it
Kindly-Bag763 · reddit · 2026-11-13
The author describes a real trade-off with MCP tool exposure. Cloudflare estimates 2,500 API methods exposed as MCP tools would cost 1.17M tokens, so everything got hidden behind Code Mode: two tools, search() and execute(). Context was fixed — but discovery broke: the agent never realized a catalogue existed to search.
What worked: a routing layer in front.
- One markdown skill per process, loaded on demand, listing MCP servers and method names that process needs, no signatures
- Agent reads the skill, gets names, uses search() to pull only needed signatures, then one execute() runs the whole sequence in JS with no LLM round trips between steps
- Persistent context holds only skill descriptions plus two tools; full descriptions load when the task reaches for them
Caveats: wrong-skill picks and bad JS still happen; not every sequence batches. Still better than hiding everything and hoping. Original writeup is a Russian blog post with the actual skill files.
Related event: Code Mode MCP in Practice: Replacing Thousands of Tools with Two Endpoints(3 posts)→
More from coding & agent
- Dev ships throwaway Postgres for agents: pg19 via pglite on Cloudflare DO over raw TCP — ritakozlov · 2026-11-29
- Product idea: cloud Android VMs and home WiFi proxies to make agents look human — Darpinian · 2026-11-29
- 38 free agent skills distilled from shipping three live AI products — PawelHuryn · 2026-11-29
- Step 5: run evals on synthetic data pre-launch, watch real traces after — PawelHuryn · 2026-11-29
- Break your agent before attackers do: 6 tests mapped to OWASP LLM Top 10 — PawelHuryn · 2026-11-29
- PM shares playbook for shipping 4 customer-facing Claude agents into production — PawelHuryn · 2026-11-29