Overview
Tracking issue for adding first-class support for the "Code Mode" pattern described by Anthropic and Cloudflare:
Why
Two token-cost problems affect Cosmos DB MCP workloads especially hard:
- Tool-definition bloat — every tool schema sits in agent context up front. Grows worse as we ship the Q3 agent-retrieval tools on the roadmap.
- Intermediate-result bloat — every search / query result round-trips through the model.
vector_search and hybrid_search results can easily be 10k+ rows.
Code Mode addresses both by letting agents write code that filters, transforms, and composes MCP calls in an execution environment before results reach the model.
Scope
MCPToolkit is an MCP server, not an agent host. Our role is to make Code-Mode clients efficient — not to own the code-execution sandbox (which is the client's responsibility, as the Anthropic post explicitly notes).
Sub-issues
Explicit non-goals
- Do not build a code-execution sandbox into the server.
- Do not break existing
tools/list / tools/call behavior.
Community input welcome
Please 👍 sub-issues you care about, and comment here on prioritization or use cases we should support first.
Overview
Tracking issue for adding first-class support for the "Code Mode" pattern described by Anthropic and Cloudflare:
Why
Two token-cost problems affect Cosmos DB MCP workloads especially hard:
vector_searchandhybrid_searchresults can easily be 10k+ rows.Code Mode addresses both by letting agents write code that filters, transforms, and composes MCP calls in an execution environment before results reach the model.
Scope
MCPToolkit is an MCP server, not an agent host. Our role is to make Code-Mode clients efficient — not to own the code-execution sandbox (which is the client's responsibility, as the Anthropic post explicitly notes).
Sub-issues
search_toolsMCP tool with progressive-disclosure detail levelsclient/code-mode-ts/docs/CODE-MODE.mdrecipeExplicit non-goals
tools/list/tools/callbehavior.Community input welcome
Please 👍 sub-issues you care about, and comment here on prioritization or use cases we should support first.