Skills + Code Mode MCP: using hundreds of tools without bloating agent context

ievkz · reddit · 2026-11-13

While building Nanabot (a personal coding agent) and a company MCP server, the author hit a known problem: detailed descriptions of many MCP methods bloat the LLM's context, yet hiding them behind Code Mode MCP means the agent sometimes can't find — or doesn't realize it should look for — the right method.

Context from Cloudflare: with 2,500+ API methods, representing all as MCP tools would take 1.17M tokens. Cloudflare's Code Mode MCP gives the agent just two primitives:

The post walks through an aggregator implementation (e.g., tools.filter(...) matching navigate/screenshot by name) and notes this isn't universal syntax — Cloudflare's search operates over an OpenAPI spec. Token savings depend on catalog size, search frequency, and call count; accurate measurement needs testing on concrete tasks.

Related event: Code Mode MCP in Practice: Replacing Thousands of Tools with Two Endpoints(3 posts)→

Original post →

More from coding & agent

coding & agent channel →