We Got It All Wrong: Why Function Calling is a Dead End for AI Agents | Cloudflare | Matt Carey

JavaScript Conferences by GitNation
10,458 views β€’

Offload your entire OpenAPI spec to sandboxed V8 isolates to bypass the 2.3M token context wall once and for all. πŸŽ™οΈ "We got it all wrong." Matt Carey (Cloudflare) breaks down why the industry's approach to AI Agents and Tool Calling is hitting a hard limit. When your API reaches 2.3 million tokens, "cherry-picking" endpoints for your MCP server isn't just tedious β€” it's architecture suicide. πŸ’‘ The solution? Code Mode. Instead of feeding bulky tool definitions into the LLM context, Matt proposes a paradigm shift: Agents writing code against a typed SDK, executed within secure, lightweight Dynamic Worker Loaders. What’s inside this Node Congress 2026 deep-dive: β˜‘οΈ The 2.3M Token Wall | Why traditional Function Calling fails at enterprise scale. β˜‘οΈ Code Mode vs. Semantic Search | Why "Discovery on Demand" is more reliable than brittle RAG-based tool search. β˜‘οΈ Infrastructure as a Sandbox | Running untrusted LLM code with 1ms cold starts via V8 isolates. β˜‘οΈ MCP Evolution | How to scale Model Context Protocol for massive APIs while keeping your AI clients lean and token-efficient. β˜‘οΈ Live Demo | Building a cross-service Agent workflow in a single round-trip. πŸ”₯ Matt Carey is an Agent & MCP Specialist at Cloudflare and a core maintainer of the official MCP TypeScript SDK. He specializes in architecting autonomous systems using Cloudflare primitives like Dynamic Worker Loaders and Durable Objects, helping industry leaders build and scale production-ready AI agents. Beyond the terminal, Matt brings a high-performance mindset from his previous career as a professional windsurfer, having represented Malta at multiple World and European championships. πŸ‘‰ Connect with Matt: πŸ”— https://www.linkedin.com/in/mattzcarey/ πŸ‘‰ Explore Matt’s code and the MCP SDK: πŸ”— https://github.com/mattzcarey πŸ‘‰ Deep dive into Matt’s insights: πŸ”— https://mattzcarey.com/ πŸ‘‰ Build AI Agents on Cloudflare: πŸ”— https://developers.cloudflare.com/workers/ πŸ“Œ Follow the link to watch the full version of the talk and gain access to all Node Congress recordings: πŸ”— https://gitnation.com/events/node-congress-2026?utm_source=youtube&utm_medium=MattCarey πŸ’¬ Don’t just watch β€” get your toughest architecture questions answered in real-time, be part of the room where Seniors and Architects shape the future, get ahead of the curve. Join us live at the next event! πŸ”— https://gitnation.com/events?utm_source=youtube&utm_medium=MattCarey πŸ• Timestamps: 00:00 - Intro 00:41 - Beyond the Glass Box: Giving AI Agents Hands 01:16 - Your 20% Off 🀫 01:53 - The Evolution of MCP: From Bundle Tools to Global Sharing 03:30 - The Context Limit Nightmare: Cloudflare’s 2.3M Token Problem 04:41 - The Core Thesis: Context Limits are an Agent Problem 05:05 - Progressive Disclosure 101: CLI Bash & Self-Documentation 05:30 - The Brittle Reality of Semantic Tool Search 06:02 - Code Mode Unveiled: Discovering Tools on Demand 08:20 - Hidden Inefficiencies: Why Search Costs 17,000 Tokens 09:52 - Typed SDKs: Generating Reliable Pipelines for LLMs 11:55 - The Safety Dilemma: Running Untrusted AI-Generated Code 13:04 - Control Flow Mastery: Solving Brittle AI Workflows 14:52 - Massive Token Efficiency: One Round Trip to Rule Them All 16:28 - Architecture Suicide? The History of Sandboxing 18:29 - Dynamic Worker Loaders: The Ultimate Agent Sandbox 20:30 - Network Lockdown: Controlling Fetch in Isolate Environments 21:40 - Live Demo: Managing Enterprise Projects via Code Mode 24:27 - MCP Evolution: Bringing Server-Side Complexity to AI 26:27 - Scaling to Cloudflare: Managing 2,600 Global Endpoints 27:44 - Action Demo: Deploying Infrastructure via AI Chat 31:38 - Final Thoughts: The Future of Agents & Hiring 32:21 - ⁉️ Q&A: Handling Massive Specs & API Discovery Patterns ✍️ This talk was part of Node Congress 2026: Every API is a Tool for Agents with Code Mode | Matt Carey πŸ”— https://nodecongress.com/?utm_source=youtube&utm_medium=MattCarey πŸ“Œ We’ve hidden a secret code for 20% off your next event. Join our upcoming conferences! πŸ’« JSNation 2026 June 11 & 15, 2026 (Amsterdam) πŸ”—https://jsnation.com/?utm_source=youtube&utm_medium=MattCarey πŸ’« React Summit, June 12 & 16, 2026 (Amsterdam) https://reactsummit.com/?utm_source=youtube&utm_medium=MattCarey πŸ’« TechLeadConf, June 11 & 12, 2026 (Amsterdam) https://techleadconf.com/?utm_source=youtube&utm_medium=MattCarey and more! πŸš€ Check out all the upcoming events from GitNation: πŸ”— https://gitnation.com/events?utm_source=youtube&utm_medium=MattCarey Don't forget to use INSIDER20 promo code for 20% off on tickets. #AIAgents #Cloudflare #NodeCongress #MCP #ModelContextProtocol #CodeMode #SoftwareArchitecture #V8Isolates #OpenAPI #BackendEngineering #TypeScript #NodeJS #WebDev #LLM #AIEngineering #TokenOptimization #FunctionCalling #AgenticWorkflows #Cloud Computing #GitNation #CloudflareWorkers #JavaScriptConference #TechTalk

Keyboard shortcuts

On. Switch them off if they collide with your assistive tools; ? still opens this sheet.

Go to

Press g then the letter.

  • gh Latest
  • gs Sources
  • gm Media
  • gv Videos
  • gp Podcasts
  • gc Calendar
  • gd Decoder
  • gz Dataviz
  • ga Datasets
  • gb Blog
  • gk Markets
  • gj Careers
  • gn Prompt Notebook

On this page

  • / Focus search, where there is one
  • t Back to top
  • ? This list
  • Esc Close