AnythingMCP's code mode runs one JavaScript program instead of dozens of tool calls

When AI agents call tools one at a time, every intermediate result passes through the model, which inflates token use and slows answers. Code mode lets an agent run a single short JavaScript program that makes the needed tool calls, filters and joins the results, and returns only the final answer. In AnythingMCP, that program runs in an isolated sandbox without network, file, or secret access, and can only call tools the caller is already permitted to use. The article illustrates the gain with a sales question that would require 41 separate tool calls in plain MCP. The approach rests on the view, cited from Cloudflare, that language models write code for tool calls more reliably than they call tools directly.
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