{"id":32186,"date":"2026-09-15T16:16:57","date_gmt":"2026-09-15T10:46:57","guid":{"rendered":"https:\/\/opstree.com\/blog\/?p=32186"},"modified":"2026-09-15T16:16:57","modified_gmt":"2026-09-15T10:46:57","slug":"mcp-agent-is-burning-tokens-before-it-even-starts","status":"publish","type":"post","link":"https:\/\/opstree.com\/blog\/mcp-agent-is-burning-tokens-before-it-even-starts\/","title":{"rendered":"Your MCP Agent Is Burning Tokens Before It Even Starts"},"content":{"rendered":"<p><span class=\"TextRun SCXW3622954 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW3622954 BCX0\" data-ccp-parastyle=\"Body Text\">A practical breakdown of Programmatic Tool Calling and Progressive Tool Discovery &#8211; two patterns that slash token overhead by up to 98% and make MCP-connected agents <\/span><span class=\"NormalTextRun AdvancedProofingIssueV2Themed SCXW3622954 BCX0\" data-ccp-parastyle=\"Body Text\">actually scale<\/span><span class=\"NormalTextRun SCXW3622954 BCX0\" data-ccp-parastyle=\"Body Text\">.<\/span><\/span><span class=\"EOP Selected SCXW3622954 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<h2><span class=\"TextRun SCXW24721248 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW24721248 BCX0\" data-ccp-parastyle=\"heading 2\">The Invisible Tax on Every Agent Request<\/span><\/span><\/h2>\n<p><span data-contrast=\"auto\">Imagine you hire a contractor to fix one leaky tap. But before they touch a single pipe, they unpack every tool from every truck, drills, welders, excavators and lay it all out in your kitchen. That&#8217;s\u00a0exactly what a naive <a href=\"https:\/\/opstree.com\/blog\/secure-enterprise-mcp-server-for-generative-ai\/\" target=\"_blank\" rel=\"noopener\">MCP agent<\/a> does every single time it receives a user message.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Here&#8217;s\u00a0what loading a typical 5-server MCP setup looks like\u00a0<\/span><b><span data-contrast=\"auto\">before a single line of user content is processed:<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<div style=\"overflow-x: auto; width: 100%; margin: 25px 0; -webkit-overflow-scrolling: touch;\">\n<table style=\"width: 100%; min-width: 650px; border-collapse: collapse; font-family: Arial,Helvetica,sans-serif; font-size: 14px; color: #333;\">\n<thead>\n<tr style=\"background: #f5f7fa;\">\n<th style=\"border: 1px solid #ddd; padding: 12px; text-align: left; white-space: nowrap;\">MCP Server<\/th>\n<th style=\"border: 1px solid #ddd; padding: 12px; text-align: left; white-space: nowrap;\">Tools<\/th>\n<th style=\"border: 1px solid #ddd; padding: 12px; text-align: left; white-space: nowrap;\">Token Cost<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">GitHub<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">35 tools<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">~26,000 tokens<\/td>\n<\/tr>\n<tr style=\"background: #fafafa;\">\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Slack<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">11 tools<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">~21,000 tokens<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Jira<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">22 tools<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">~17,000 tokens<\/td>\n<\/tr>\n<tr style=\"background: #fafafa;\">\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Sentry<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">5 tools<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">~3,000 tokens<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Grafana<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">5 tools<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">~3,000 tokens<\/td>\n<\/tr>\n<tr style=\"background: #fafafa; font-weight: bold;\">\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Total<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">78 tools<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">~70,000 tokens<\/td>\n<\/tr>\n<tr style=\"font-weight: bold;\">\n<td style=\"border: 1px solid #ddd; padding: 12px;\">With Tool Search<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">same 78 tools<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">~8,700 tokens \u2705<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p><span data-contrast=\"auto\">Anthropic&#8217;s\u00a0own systems hit\u00a0<\/span><b><span data-contrast=\"auto\">134,000 tokens<\/span><\/b><span data-contrast=\"auto\">\u00a0in tool definitions alone before optimization. At that\u00a0point\u00a0your model\u00a0isn&#8217;t reasoning, it&#8217;s\u00a0drowning.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">And token cost\u00a0isn&#8217;t\u00a0even the only problem. The most common agent failures are\u00a0<\/span><b><span data-contrast=\"auto\">wrong tool selection <\/span><\/b><span data-contrast=\"auto\">and <\/span><b><span data-contrast=\"auto\">incorrect parameters<\/span><\/b><span data-contrast=\"auto\">, especially when tools have similar names like\u00a0<\/span><span data-contrast=\"auto\">notification-send-user<\/span><span data-contrast=\"auto\">\u00a0vs.\u00a0<\/span><span data-contrast=\"auto\">notification-send-channel<\/span><span data-contrast=\"auto\">. More tools in context = more confusion.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<h2><span class=\"TextRun SCXW231623956 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW231623956 BCX0\" data-ccp-parastyle=\"heading 2\">Two Patterns That Fix This<\/span><\/span><\/h2>\n<p><span class=\"EOP Selected SCXW231623956 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;134245418&quot;:true,&quot;335559738&quot;:200,&quot;335559739&quot;:120,&quot;335559991&quot;:0}\"><span class=\"TextRun SCXW258321422 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW258321422 BCX0\" data-ccp-parastyle=\"Body Text\">Anthropic released three new beta features in November 2025 to address this:\u00a0<\/span><\/span><span class=\"TextRun SCXW258321422 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW258321422 BCX0\" data-ccp-parastyle=\"Body Text\">Tool Search Tool<\/span><\/span><span class=\"TextRun SCXW258321422 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW258321422 BCX0\" data-ccp-parastyle=\"Body Text\">,\u00a0<\/span><\/span><span class=\"TextRun SCXW258321422 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW258321422 BCX0\" data-ccp-parastyle=\"Body Text\">Programmatic Tool Calling<\/span><\/span><span class=\"TextRun SCXW258321422 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW258321422 BCX0\" data-ccp-parastyle=\"Body Text\">\u00a0and\u00a0<\/span><\/span><span class=\"TextRun SCXW258321422 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW258321422 BCX0\" data-ccp-parastyle=\"Body Text\">Tool Use Examples<\/span><\/span><span class=\"TextRun SCXW258321422 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW258321422 BCX0\" data-ccp-parastyle=\"Body Text\">. Together, they\u00a0<\/span><span class=\"NormalTextRun SCXW258321422 BCX0\" data-ccp-parastyle=\"Body Text\">represent<\/span><span class=\"NormalTextRun SCXW258321422 BCX0\" data-ccp-parastyle=\"Body Text\">\u00a0a fundamentally\u00a0<\/span><span class=\"NormalTextRun SCXW258321422 BCX0\" data-ccp-parastyle=\"Body Text\">different way<\/span><span class=\"NormalTextRun SCXW258321422 BCX0\" data-ccp-parastyle=\"Body Text\"> of thinking about how agents interact with tools.<\/span><\/span><\/span><\/p>\n<h3><b><span data-contrast=\"auto\">Pattern 1: Progressive Tool Discovery (Tool Search Tool)<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;134245418&quot;:true,&quot;335559738&quot;:200,&quot;335559739&quot;:120,&quot;335559991&quot;:0}\">\u00a0<\/span><\/h3>\n<h4><b><span data-contrast=\"auto\">The core idea<\/span><\/b><\/h4>\n<p><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;134245418&quot;:true,&quot;335559738&quot;:140,&quot;335559739&quot;:120,&quot;335559991&quot;:0}\"><span class=\"TextRun SCXW157580610 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW157580610 BCX0\" data-ccp-parastyle=\"Body Text\">Instead of loading all tool definitions upfront, tools are marked with\u00a0<\/span><\/span><span class=\"TextRun SCXW157580610 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SpellingErrorV2Themed SCXW157580610 BCX0\" data-ccp-parastyle=\"Body Text\">defer_loading<\/span><span class=\"NormalTextRun SCXW157580610 BCX0\" data-ccp-parastyle=\"Body Text\">: true<\/span><\/span><span class=\"TextRun SCXW157580610 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW157580610 BCX0\" data-ccp-parastyle=\"Body Text\">.\u00a0<\/span><span class=\"NormalTextRun SCXW157580610 BCX0\" data-ccp-parastyle=\"Body Text\">They become <\/span><\/span><span class=\"TextRun SCXW157580610 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW157580610 BCX0\" data-ccp-parastyle=\"Body Text\">discoverable <\/span><\/span><span class=\"TextRun SCXW157580610 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW157580610 BCX0\" data-ccp-parastyle=\"Body Text\">without consuming tokens until actually needed.<\/span><span class=\"NormalTextRun SCXW157580610 BCX0\" data-ccp-parastyle=\"Body Text\">\u00a0Claude only sees the Tool Search Tool itself (~500 tokens) at the start of each request.<\/span><\/span><span class=\"EOP Selected SCXW157580610 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span>\u00a0<\/span><\/p>\n<h4><span class=\"EOP Selected SCXW231623956 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;134245418&quot;:true,&quot;335559738&quot;:200,&quot;335559739&quot;:120,&quot;335559991&quot;:0}\"><span class=\"TextRun SCXW36315529 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW36315529 BCX0\" data-ccp-parastyle=\"heading 3\">H<\/span><\/span><\/span><span class=\"EOP Selected SCXW231623956 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;134245418&quot;:true,&quot;335559738&quot;:200,&quot;335559739&quot;:120,&quot;335559991&quot;:0}\"><span class=\"TextRun SCXW36315529 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW36315529 BCX0\" data-ccp-parastyle=\"heading 3\">ow it works step by step<\/span><\/span><span class=\"EOP Selected SCXW36315529 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;134245418&quot;:true,&quot;335559738&quot;:140,&quot;335559739&quot;:120,&quot;335559991&quot;:0}\">\u00a0<\/span><\/span><\/h4>\n<p><b><span data-contrast=\"auto\">Step 1 &#8211; User sends a message, <\/span><\/b><span data-contrast=\"auto\">Only\u00a0the Tool Search Tool (~500 tokens) is loaded in context. Nothing else.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Step 2 &#8211; Agent searches for relevant tools, <\/span><\/b><span data-contrast=\"auto\">Claude\u00a0queries\u00a0the search interface. Searching &#8220;github&#8221; returns only\u00a0<\/span><span data-contrast=\"auto\">createPullRequest<\/span><span data-contrast=\"auto\">\u00a0and\u00a0<\/span><span data-contrast=\"auto\">listIssues<\/span><span data-contrast=\"auto\"> &#8211; not the other 33 GitHub tools, and certainly not your Slack, Jira, or Google Drive tools.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Step 3 &#8211; Only matched tools expand into full definitions, <\/span><\/b><span data-contrast=\"auto\">3\u20135 relevant tools (~3K tokens) are added to context. The rest\u00a0stay\u00a0dormant.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Step 4 &#8211; Task executes with laser focus, <\/span><\/b><span data-contrast=\"auto\">Total\u00a0context overhead: ~8,700 tokens vs. ~77,000 tokens.\u00a0<\/span><b><span data-contrast=\"auto\">95% of context window\u00a0preserved.<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<h4><span class=\"EOP Selected SCXW24721248 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;134245418&quot;:true,&quot;335559738&quot;:200,&quot;335559739&quot;:120,&quot;335559991&quot;:0}\"> <span class=\"TextRun SCXW178277977 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW178277977 BCX0\" data-ccp-parastyle=\"heading 3\">Implementation<\/span><\/span><\/span><\/h4>\n<div style=\"margin: 20px 0;\">\n<pre style=\"background: #1e1e1e !important; color: #d4d4d4 !important; padding: 18px; border-radius: 8px; overflow-x: auto; font-family: Consolas,'Courier New',monospace; font-size: 14px; line-height: 1.6;\"><code style=\"background: transparent !important; color: inherit !important; padding: 0 !important; margin: 0 !important; border: none !important; box-shadow: none !important;\">{\r\n  \"tools\": [\r\n    {\r\n      \"type\": \"tool_search_tool_regex_20251119\",\r\n      \"name\": \"tool_search_tool_regex\"\r\n    },\r\n    {\r\n      \"name\": \"github.createPullRequest\",\r\n      \"description\": \"Create a pull request\",\r\n      \"input_schema\": {},\r\n      \"defer_loading\": true\r\n    }\r\n  ]\r\n}<\/code><\/pre>\n<\/div>\n<p><span class=\"TextRun SCXW60367518 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW60367518 BCX0\" data-ccp-parastyle=\"Body Text\">For MCP servers, you can defer entire servers while keeping your highest-priority tools always loaded:<\/span><\/span><span class=\"EOP Selected SCXW60367518 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<div style=\"margin: 20px 0;\">\n<pre style=\"background: #1e1e1e !important; color: #d4d4d4 !important; padding: 18px; border-radius: 8px; overflow-x: auto; font-family: Consolas,'Courier New',monospace; font-size: 14px; line-height: 1.6;\"><code style=\"background: transparent !important; color: inherit !important; padding: 0 !important; margin: 0 !important; border: none !important; box-shadow: none !important;\">{\r\n  \"type\": \"mcp_toolset\",\r\n  \"mcp_server_name\": \"google-drive\",\r\n  \"default_config\": { \"defer_loading\": true },\r\n  \"configs\": {\r\n    \"search_files\": { \"defer_loading\": false }\r\n  }\r\n}<\/code><\/pre>\n<\/div>\n<h4><span class=\"TextRun SCXW264140303 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW264140303 BCX0\" data-ccp-parastyle=\"heading 3\">The accuracy win<\/span><\/span><\/h4>\n<p><span data-contrast=\"auto\">Beyond tokens, the\u00a0accuracy\u00a0improvement is striking. On internal MCP evaluations:<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<ul>\n<li><b><span data-contrast=\"auto\">Claude Opus 4:<\/span><\/b><span data-contrast=\"auto\">\u00a049% \u2192 74% accuracy<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276,&quot;335559991&quot;:283,&quot;469777462&quot;:[709,709],&quot;469777927&quot;:[0,0],&quot;469777928&quot;:[0,1]}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">Claude Opus 4.5:<\/span><\/b><span data-contrast=\"auto\">\u00a079.5% \u2192 88.1% accuracy<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276,&quot;335559991&quot;:283,&quot;469777462&quot;:[709,709],&quot;469777927&quot;:[0,0],&quot;469777928&quot;:[0,1]}\">\u00a0<\/span><\/li>\n<\/ul>\n<p><span data-contrast=\"auto\">Less noise in context = better tool\u00a0selection.\u00a0The model stops confusing similarly-named tools when it only ever sees the 3-5 tools it actually needs.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<h4><span class=\"TextRun SCXW14565316 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW14565316 BCX0\" data-ccp-parastyle=\"heading 3\">Prompt caching stays intact<\/span><\/span><\/h4>\n<p><span class=\"EOP Selected SCXW14565316 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;134245418&quot;:true,&quot;335559738&quot;:140,&quot;335559739&quot;:120,&quot;335559991&quot;:0}\"><span class=\"TextRun SCXW80257596 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW80257596 BCX0\" data-ccp-parastyle=\"Body Text\">Deferred tools are excluded from the\u00a0<\/span><span class=\"NormalTextRun SCXW80257596 BCX0\" data-ccp-parastyle=\"Body Text\">initial<\/span><span class=\"NormalTextRun SCXW80257596 BCX0\" data-ccp-parastyle=\"Body Text\">\u00a0prompt entirely.\u00a0<\/span><span class=\"NormalTextRun SCXW80257596 BCX0\" data-ccp-parastyle=\"Body Text\">They&#8217;re<\/span><span class=\"NormalTextRun SCXW80257596 BCX0\" data-ccp-parastyle=\"Body Text\">\u00a0only added to context\u00a0<\/span><\/span><span class=\"TextRun SCXW80257596 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW80257596 BCX0\" data-ccp-parastyle=\"Body Text\">after<\/span><\/span><span class=\"TextRun SCXW80257596 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW80257596 BCX0\" data-ccp-parastyle=\"Body Text\">\u00a0Claude searches for them, so your system prompt and core tool definitions\u00a0<\/span><span class=\"NormalTextRun SCXW80257596 BCX0\" data-ccp-parastyle=\"Body Text\">remain<\/span><span class=\"NormalTextRun SCXW80257596 BCX0\" data-ccp-parastyle=\"Body Text\">\u00a0cacheable. No cache invalidation penalty.<\/span><\/span><span class=\"EOP Selected SCXW80257596 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span>\u00a0<\/span><\/p>\n<h3><span class=\"TextRun SCXW256057571 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW256057571 BCX0\" data-ccp-parastyle=\"heading 2\">Pattern 2: Programmatic Tool Calling<\/span><\/span><\/h3>\n<h4><span class=\"EOP Selected SCXW256057571 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;134245418&quot;:true,&quot;335559738&quot;:200,&quot;335559739&quot;:120,&quot;335559991&quot;:0}\"><span class=\"TextRun SCXW117566011 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW117566011 BCX0\" data-ccp-parastyle=\"heading 3\">The problem with traditional tool calling<\/span><\/span><span class=\"EOP Selected SCXW117566011 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;134245418&quot;:true,&quot;335559738&quot;:140,&quot;335559739&quot;:120,&quot;335559991&quot;:0}\">\u00a0<\/span>\u00a0<\/span><\/h4>\n<p><span data-contrast=\"auto\">Traditional tool calling is like texting a\u00a0friend\u00a0one question at a time and waiting for each reply. Every single tool invocation requires:<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<ol>\n<li><span data-contrast=\"auto\">A full model inference pass<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276,&quot;335559991&quot;:283,&quot;469777462&quot;:[709,709],&quot;469777927&quot;:[0,0],&quot;469777928&quot;:[0,1]}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">The raw result dumped into context (whether useful or not)<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276,&quot;335559991&quot;:283,&quot;469777462&quot;:[709,709],&quot;469777927&quot;:[0,0],&quot;469777928&quot;:[0,1]}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">Claude &#8220;eyeballing&#8221; the data to extract relevant information<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276,&quot;335559991&quot;:283,&quot;469777462&quot;:[709,709],&quot;469777927&quot;:[0,0],&quot;469777928&quot;:[0,1]}\">\u00a0<\/span><\/li>\n<\/ol>\n<p><span data-contrast=\"auto\">A 5-tool workflow means\u00a0<\/span><b><span data-contrast=\"auto\">5 inference passes<\/span><\/b><span data-contrast=\"auto\">\u00a0plus Claude parsing each result in natural language. A 20-employee budget check means\u00a0<\/span><b><span data-contrast=\"auto\">20\u00a0round-trips<\/span><\/b><span data-contrast=\"auto\">, with thousands of expense rows flooding context.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">What if you need to analyze a 10MB log file?<\/span><\/b><\/p>\n<p><span data-contrast=\"auto\">The entire file enters the context window &#8211; even though you only need a summary of error frequencies.<\/span><\/p>\n<h4><span class=\"TextRun SCXW254126903 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW254126903 BCX0\" data-ccp-parastyle=\"heading 3\">The solution: code as the orchestration layer<\/span><\/span><\/h4>\n<p><span data-contrast=\"auto\">Programmatic Tool Calling enables Claude to write Python code that runs in a managed sandbox, calling multiple tools in a loop, filtering the output, and only returning a clean summary to the model context.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Instead of:<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<div style=\"margin: 20px 0;\">\n<pre style=\"background: #1e1e1e !important; color: #d4d4d4 !important; padding: 18px; border-radius: 8px; overflow-x: auto; font-family: Consolas,'Courier New',monospace; font-size: 14px; line-height: 1.6;\"><code style=\"background: transparent !important; color: inherit !important; padding: 0 !important; margin: 0 !important; border: none !important; box-shadow: none !important;\">Claude \u2192 call tool \u2192 get result \u2192 Claude \u2192 call tool \u2192 get result \u2192 Claude...<\/code><\/pre>\n<\/div>\n<p><strong><span class=\"EOP Selected SCXW264140303 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;134245418&quot;:true,&quot;335559738&quot;:140,&quot;335559739&quot;:120,&quot;335559991&quot;:0}\"> <span class=\"TextRun SCXW5971066 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW5971066 BCX0\" data-ccp-parastyle=\"Body Text\">You get:<\/span><\/span><span class=\"EOP Selected SCXW5971066 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/span><\/strong><\/p>\n<div style=\"margin: 20px 0;\">\n<pre style=\"background: #1e1e1e !important; color: #d4d4d4 !important; padding: 18px; border-radius: 8px; overflow-x: auto; font-family: Consolas,'Courier New',monospace; font-size: 14px; line-height: 1.6;\"><code style=\"background: transparent !important; color: inherit !important; padding: 0 !important; margin: 0 !important; border: none !important; box-shadow: none !important;\">Claude writes code \u2192 code runs in sandbox \u2192 filtered output \u2192 Claude<\/code><\/pre>\n<\/div>\n<h4><span class=\"TextRun SCXW244880163 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW244880163 BCX0\" data-ccp-parastyle=\"heading 3\">A real example: budget compliance check<\/span><\/span><\/h4>\n<p><span class=\"EOP Selected SCXW244880163 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;134245418&quot;:true,&quot;335559738&quot;:140,&quot;335559739&quot;:120,&quot;335559991&quot;:0}\"><span class=\"TextRun SCXW124210356 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW124210356 BCX0\" data-ccp-parastyle=\"Body Text\">Traditional approach &#8211; 20 <\/span><span class=\"NormalTextRun ContextualSpellingAndGrammarErrorV2Themed SCXW124210356 BCX0\" data-ccp-parastyle=\"Body Text\">round-trips<\/span><span class=\"NormalTextRun SCXW124210356 BCX0\" data-ccp-parastyle=\"Body Text\">, thousands of rows in context:<\/span><\/span><span class=\"EOP Selected SCXW124210356 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span>\u00a0<\/span><\/p>\n<div style=\"margin: 20px 0;\">\n<pre style=\"background: #1e1e1e !important; color: #d4d4d4 !important; padding: 18px; border-radius: 8px; overflow-x: auto; font-family: Consolas,'Courier New',monospace; font-size: 14px; line-height: 1.6;\"><code style=\"background: transparent !important; color: inherit !important; padding: 0 !important; margin: 0 !important; border: none !important; box-shadow: none !important;\">Check employee 1 expenses \u2192 result in context\r\nCheck employee 2 expenses \u2192 result in context\r\n... \u00d7 20\r\nClaude manually compares all results<\/code><\/pre>\n<\/div>\n<p><strong><span class=\"TextRun SCXW206411491 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW206411491 BCX0\" data-ccp-parastyle=\"Body Text\">Programmatic approach &#8211; one code block, only violators in context:<\/span><\/span><span class=\"EOP Selected SCXW206411491 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span>\u00a0<\/strong><\/p>\n<h4><span class=\"TextRun SCXW185213081 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW185213081 BCX0\" data-ccp-parastyle=\"heading 3\">Benchmark results<\/span><\/span><span class=\"EOP Selected SCXW185213081 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;134245418&quot;:true,&quot;335559738&quot;:140,&quot;335559739&quot;:120,&quot;335559991&quot;:0}\">\u00a0<\/span><\/h4>\n<p><span data-contrast=\"auto\">On\u00a0Browse Comp\u00a0and\u00a0Deep Search QA\u00a0(multi-step web research benchmarks):<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<ul>\n<li><b><span data-contrast=\"auto\">11% accuracy improvement<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276,&quot;335559991&quot;:283,&quot;469777462&quot;:[709,709],&quot;469777927&quot;:[0,0],&quot;469777928&quot;:[0,1]}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">24% fewer input tokens<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276,&quot;335559991&quot;:283,&quot;469777462&quot;:[709,709],&quot;469777927&quot;:[0,0],&quot;469777928&quot;:[0,1]}\">\u00a0<\/span><\/li>\n<\/ul>\n<p><span data-contrast=\"auto\">On typical\u00a0API traffic with 10\u201349 tool definitions:\u00a0<\/span><b><span data-contrast=\"auto\">20\u201340% token savings<\/span><\/b><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<h4><span class=\"TextRun SCXW150966227 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW150966227 BCX0\" data-ccp-parastyle=\"heading 3\">How to opt in<\/span><\/span><span class=\"EOP Selected SCXW150966227 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;134245418&quot;:true,&quot;335559738&quot;:140,&quot;335559739&quot;:120,&quot;335559991&quot;:0}\">\u00a0<\/span><\/h4>\n<p><span class=\"TextRun SCXW187200216 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW187200216 BCX0\" data-ccp-parastyle=\"Body Text\">Tools opt into programmatic calling by specifying\u00a0<\/span><\/span><span class=\"TextRun SCXW187200216 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SpellingErrorV2Themed SCXW187200216 BCX0\" data-ccp-parastyle=\"Body Text\">allowed_callers<\/span><\/span><span class=\"TextRun SCXW187200216 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW187200216 BCX0\" data-ccp-parastyle=\"Body Text\">\u00a0in their definition:<\/span><\/span><span class=\"EOP Selected SCXW187200216 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<div style=\"margin: 20px 0;\">\n<pre style=\"background: #1e1e1e !important; color: #d4d4d4 !important; padding: 18px; border-radius: 8px; overflow-x: auto; font-family: Consolas,'Courier New',monospace; font-size: 14px; line-height: 1.6;\"><code style=\"background: transparent !important; color: inherit !important; padding: 0 !important; margin: 0 !important; border: none !important; box-shadow: none !important;\">{\r\n  \"name\": \"get_expenses\",\r\n  \"description\": \"Fetch employee expense data\",\r\n  \"allowed_callers\": [\"code_execution_20250825\"],\r\n  \"input_schema\": { ... }\r\n}<\/code><\/pre>\n<\/div>\n<h3><span class=\"TextRun SCXW230298406 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW230298406 BCX0\" data-ccp-parastyle=\"heading 2\">Pattern 3: Tool Use Examples<\/span><\/span><\/h3>\n<p><span data-contrast=\"auto\">JSON schemas define\u00a0what&#8217;s\u00a0structurally\u00a0<\/span><i><span data-contrast=\"auto\">valid<\/span><\/i><span data-contrast=\"auto\">. They\u00a0can&#8217;t\u00a0express:<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<ul>\n<li><span data-contrast=\"auto\">When to include optional parameters<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276,&quot;335559991&quot;:283,&quot;469777462&quot;:[709,709],&quot;469777927&quot;:[0,0],&quot;469777928&quot;:[0,1]}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">Which combinations make sense<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276,&quot;335559991&quot;:283,&quot;469777462&quot;:[709,709],&quot;469777927&quot;:[0,0],&quot;469777928&quot;:[0,1]}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">What conventions your API\u00a0actually expects<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276,&quot;335559991&quot;:283,&quot;469777462&quot;:[709,709],&quot;469777927&quot;:[0,0],&quot;469777928&quot;:[0,1]}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">How to handle edge cases<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276,&quot;335559991&quot;:283,&quot;469777462&quot;:[709,709],&quot;469777927&quot;:[0,0],&quot;469777928&quot;:[0,1]}\">\u00a0<\/span><\/li>\n<\/ul>\n<p><span data-contrast=\"auto\">Tool Use Examples solve this by letting you attach concrete demonstrations directly to tool definitions. Think of it as the difference between reading a function signature vs. reading the unit tests.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<div style=\"margin: 20px 0;\">\n<pre style=\"background: #1e1e1e !important; color: #d4d4d4 !important; padding: 18px; border-radius: 8px; overflow-x: auto; font-family: Consolas,'Courier New',monospace; font-size: 14px; line-height: 1.6;\"><code style=\"background: transparent !important; color: inherit !important; padding: 0 !important; margin: 0 !important; border: none !important; box-shadow: none !important;\">\"name\": \"search_files\",\r\n\"description\": \"Search for files in a directory\",\r\n\"examples\": [\r\n  {\r\n    \"input\": {\r\n      \"query\": \"quarterly report\",\r\n      \"file_type\": \"pdf\"\r\n    },\r\n    \"output\": {\r\n      \"files\": [\r\n        \"Q3_2025_Report.pdf\",\r\n        \"Q4_2025_Report.pdf\"\r\n      ]\r\n    }\r\n  }\r\n]<\/code><\/pre>\n<\/div>\n<h2><span class=\"TextRun SCXW72632179 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW72632179 BCX0\" data-ccp-parastyle=\"heading 2\">What to Consider When Connecting Your Custom Agent to MCP<\/span><\/span><\/h2>\n<p><span class=\"TextRun SCXW70801661 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW70801661 BCX0\" data-ccp-parastyle=\"Body Text\">Getting MCP hooked up is only the first mile.\u00a0<\/span><span class=\"NormalTextRun SCXW70801661 BCX0\" data-ccp-parastyle=\"Body Text\">Here&#8217;s<\/span><span class=\"NormalTextRun SCXW70801661 BCX0\" data-ccp-parastyle=\"Body Text\">\u00a0what separates agents that\u00a0<\/span><span class=\"NormalTextRun ContextualSpellingAndGrammarErrorV2Themed SCXW70801661 BCX0\" data-ccp-parastyle=\"Body Text\">run in<\/span><span class=\"NormalTextRun SCXW70801661 BCX0\" data-ccp-parastyle=\"Body Text\">\u00a0demos from agents that survive production.<\/span><\/span><span class=\"EOP Selected SCXW70801661 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<h3><span class=\"TextRun SCXW46072330 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW46072330 BCX0\" data-ccp-parastyle=\"heading 3\">1. Tool taxonomy and naming<\/span><\/span><span class=\"EOP Selected SCXW46072330 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;134245418&quot;:true,&quot;335559738&quot;:140,&quot;335559739&quot;:120,&quot;335559991&quot;:0}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">The most common failure mode is wrong tool\u00a0selection\u00a0when tools have similar names. Namespace your tools clearly and consistently:<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<ul>\n<li><span data-contrast=\"auto\">\u2705\u00a0<\/span><span data-contrast=\"auto\">github.createPullRequest<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276,&quot;335559991&quot;:283,&quot;469777462&quot;:[709,709],&quot;469777927&quot;:[0,0],&quot;469777928&quot;:[0,1]}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">\u2705\u00a0<\/span><span data-contrast=\"auto\">slack.sendChannelMessage<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276,&quot;335559991&quot;:283,&quot;469777462&quot;:[709,709],&quot;469777927&quot;:[0,0],&quot;469777928&quot;:[0,1]}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">\u2705\u00a0<\/span><span data-contrast=\"auto\">jira.createIssue<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276,&quot;335559991&quot;:283,&quot;469777462&quot;:[709,709],&quot;469777927&quot;:[0,0],&quot;469777928&quot;:[0,1]}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">\u274c\u00a0<\/span><span data-contrast=\"auto\">create<\/span><span data-contrast=\"auto\">\u00a0(which create?)<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276,&quot;335559991&quot;:283,&quot;469777462&quot;:[709,709],&quot;469777927&quot;:[0,0],&quot;469777928&quot;:[0,1]}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">\u274c\u00a0<\/span><span data-contrast=\"auto\">send<\/span><span data-contrast=\"auto\">\u00a0(send what, where?)<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276,&quot;335559991&quot;:283,&quot;469777462&quot;:[709,709],&quot;469777927&quot;:[0,0],&quot;469777928&quot;:[0,1]}\">\u00a0<\/span><\/li>\n<\/ul>\n<p><span data-contrast=\"auto\">Treat your tool naming like a public API.\u00a0It&#8217;s\u00a0the contract between your agent and the model&#8217;s reasoning.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<h3><b><span data-contrast=\"auto\">2. Intermediate result filtering<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;134245418&quot;:true,&quot;335559738&quot;:140,&quot;335559739&quot;:120,&quot;335559991&quot;:0}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">Never let raw API responses hit the context window unchecked. Your agent should consume\u00a0<\/span><b><span data-contrast=\"auto\">insights<\/span><\/b><span data-contrast=\"auto\">, not raw data dumps.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Before returning any tool result, ask:<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<ul>\n<li><span data-contrast=\"auto\">Does the model need all of this, or just a summary?<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276,&quot;335559991&quot;:283,&quot;469777462&quot;:[709,709],&quot;469777927&quot;:[0,0],&quot;469777928&quot;:[0,1]}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">Can I\u00a0filter to\u00a0only the rows\/fields relevant to the task?<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276,&quot;335559991&quot;:283,&quot;469777462&quot;:[709,709],&quot;469777927&quot;:[0,0],&quot;469777928&quot;:[0,1]}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">Should I paginate large datasets rather than dumping them?<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276,&quot;335559991&quot;:283,&quot;469777462&quot;:[709,709],&quot;469777927&quot;:[0,0],&quot;469777928&quot;:[0,1]}\">\u00a0<\/span><\/li>\n<\/ul>\n<h3><span class=\"TextRun SCXW257189836 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW257189836 BCX0\" data-ccp-parastyle=\"heading 3\">3. Error handling inside code blocks<\/span><\/span><\/h3>\n<p><span class=\"EOP Selected SCXW257189836 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;134245418&quot;:true,&quot;335559738&quot;:140,&quot;335559739&quot;:120,&quot;335559991&quot;:0}\"><span class=\"TextRun SCXW136886244 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW136886244 BCX0\" data-ccp-parastyle=\"Body Text\">When using Programmatic Tool Calling, failures happen silently inside <\/span><span class=\"NormalTextRun ContextualSpellingAndGrammarErrorV2Themed SCXW136886244 BCX0\" data-ccp-parastyle=\"Body Text\">code<\/span><span class=\"NormalTextRun SCXW136886244 BCX0\" data-ccp-parastyle=\"Body Text\">. Build explicit error handling and surface errors in your return value:<\/span><\/span><span class=\"EOP Selected SCXW136886244 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/span><\/p>\n<div style=\"margin: 20px 0;\">\n<pre style=\"background: #1e1e1e !important; color: #d4d4d4 !important; padding: 18px; border-radius: 8px; overflow-x: auto; font-family: Consolas,'Courier New',monospace; font-size: 14px; line-height: 1.6;\"><code style=\"background: transparent !important; color: inherit !important; padding: 0 !important; margin: 0 !important; border: none !important; box-shadow: none !important;\">try:\r\n    result = get_expenses(employee_id=employee.id)\r\n    return { \"status\": \"ok\", \"data\": result }\r\nexcept APIError as e:\r\n    return { \"status\": \"error\", \"message\": str(e), \"employee_id\": employee.id }<\/code><\/pre>\n<\/div>\n<p><span class=\"TextRun SCXW240289363 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW240289363 BCX0\" data-ccp-parastyle=\"Body Text\">A thrown exception that\u00a0<\/span><span class=\"NormalTextRun ContextualSpellingAndGrammarErrorV2Themed SCXW240289363 BCX0\" data-ccp-parastyle=\"Body Text\">crashes<\/span><span class=\"NormalTextRun SCXW240289363 BCX0\" data-ccp-parastyle=\"Body Text\">\u00a0the sandbox gives the model nothing to work with. A structured error return lets the model decide how to recover.<\/span><\/span><span class=\"EOP Selected SCXW240289363 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<h3><span class=\"TextRun SCXW116402470 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW116402470 BCX0\" data-ccp-parastyle=\"heading 3\">4. Decide what to defer vs. keep loaded<\/span><\/span><span class=\"EOP Selected SCXW116402470 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;134245418&quot;:true,&quot;335559738&quot;:140,&quot;335559739&quot;:120,&quot;335559991&quot;:0}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">Not everything should be deferred. The search step adds latency, for tools called on virtually every\u00a0request, upfront loading wins.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">A good heuristic:<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<div style=\"overflow-x: auto; width: 100%; margin: 25px 0; -webkit-overflow-scrolling: touch;\">\n<table style=\"width: 100%; min-width: 600px; border-collapse: collapse; font-family: Arial,Helvetica,sans-serif; font-size: 14px; color: #333;\">\n<thead>\n<tr style=\"background: #f5f7fa;\">\n<th style=\"border: 1px solid #ddd; padding: 12px; text-align: left; white-space: nowrap;\">Scenario<\/th>\n<th style=\"border: 1px solid #ddd; padding: 12px; text-align: left;\">Recommendation<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">&lt;10 tools total<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">Don&#8217;t bother with Tool Search<\/td>\n<\/tr>\n<tr style=\"background: #fafafa;\">\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">1\u20133 tools used every request<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">Keep loaded, don&#8217;t defer<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">10+ tools, varied usage<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">Defer all, keep top 1\u20132 loaded<\/td>\n<\/tr>\n<tr style=\"background: #fafafa;\">\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">50+ tools across multiple servers<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">Defer everything, use semantic search<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3><span class=\"TextRun SCXW77184884 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW77184884 BCX0\" data-ccp-parastyle=\"heading 3\">5. Prompt cache safety<\/span><\/span><\/h3>\n<p><span data-contrast=\"auto\">Deferred tools\u00a0don&#8217;t break prompt caching, they&#8217;re\u00a0excluded from the\u00a0initial prompt. But watch out: if you have frequently-searched\u00a0tools whose definitions keep changing between requests, each change will invalidate your cache for that section.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Keep tool definitions stable. Version them if you need to update them.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<h3><span class=\"TextRun SCXW47750131 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW47750131 BCX0\" data-ccp-parastyle=\"heading 3\">6. Combine with context compaction for long-running agents<\/span><\/span><\/h3>\n<p><span class=\"EOP Selected SCXW47750131 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;134245418&quot;:true,&quot;335559738&quot;:140,&quot;335559739&quot;:120,&quot;335559991&quot;:0}\"><span class=\"TextRun SCXW173403876 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW173403876 BCX0\" data-ccp-parastyle=\"Body Text\">Progressive discovery and programmatic calling solve the\u00a0<\/span><\/span><span class=\"TextRun SCXW173403876 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW173403876 BCX0\" data-ccp-parastyle=\"Body Text\">input<\/span><\/span><span class=\"TextRun SCXW173403876 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW173403876 BCX0\" data-ccp-parastyle=\"Body Text\">\u00a0side of token overhead. For long-running agents with many turns, context compaction handles the\u00a0<\/span><\/span><span class=\"TextRun SCXW173403876 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW173403876 BCX0\" data-ccp-parastyle=\"Body Text\">accumulated history<\/span><\/span><span class=\"TextRun SCXW173403876 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW173403876 BCX0\" data-ccp-parastyle=\"Body Text\"> side. Use both together for agents that need to <\/span><span class=\"NormalTextRun SCXW173403876 BCX0\" data-ccp-parastyle=\"Body Text\">maintain <\/span><span class=\"NormalTextRun SCXW173403876 BCX0\" data-ccp-parastyle=\"Body Text\">state across extended workflows.<\/span><\/span><span class=\"EOP Selected SCXW173403876 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/span><\/p>\n<h3><span class=\"EOP Selected SCXW47750131 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;134245418&quot;:true,&quot;335559738&quot;:140,&quot;335559739&quot;:120,&quot;335559991&quot;:0}\"><span class=\"TextRun SCXW81486500 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW81486500 BCX0\" data-ccp-parastyle=\"heading 3\">7. Use semantic search for large, overlapping tool libraries<\/span><\/span><\/span><\/h3>\n<p><span data-contrast=\"auto\">The Claude Developer Platform provides regex-based and BM25-based search out of the box. For tool libraries with semantically overlapping descriptions (e.g., dozens of data retrieval tools with subtle differences), embedding-based semantic search significantly outperforms keyword matching.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Build your search with vector embeddings when:<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<ul>\n<li><span data-contrast=\"auto\">Tools have overlapping descriptions<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276,&quot;335559991&quot;:283,&quot;469777462&quot;:[709,709],&quot;469777927&quot;:[0,0],&quot;469777928&quot;:[0,1]}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">You have 100+ tools across domains<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276,&quot;335559991&quot;:283,&quot;469777462&quot;:[709,709],&quot;469777927&quot;:[0,0],&quot;469777928&quot;:[0,1]}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">Keyword queries\u00a0frequently\u00a0return irrelevant results<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276,&quot;335559991&quot;:283,&quot;469777462&quot;:[709,709],&quot;469777927&quot;:[0,0],&quot;469777928&quot;:[0,1]}\">\u00a0<\/span><\/li>\n<\/ul>\n<h2><span class=\"TextRun SCXW139393036 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW139393036 BCX0\" data-ccp-parastyle=\"heading 2\">Decision Guide: Which Pattern for Which Situation?<\/span><\/span><span class=\"EOP Selected SCXW139393036 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;134245418&quot;:true,&quot;335559738&quot;:200,&quot;335559739&quot;:120,&quot;335559991&quot;:0}\">\u00a0<\/span><\/h2>\n<div style=\"overflow-x: auto; width: 100%; margin: 25px 0; -webkit-overflow-scrolling: touch;\">\n<table style=\"width: 100%; min-width: 700px; border-collapse: collapse; font-family: Arial,Helvetica,sans-serif; font-size: 14px; color: #333;\">\n<thead>\n<tr style=\"background: #f5f7fa;\">\n<th style=\"border: 1px solid #ddd; padding: 12px; text-align: left; white-space: nowrap;\">Scenario<\/th>\n<th style=\"border: 1px solid #ddd; padding: 12px; text-align: left; white-space: nowrap;\">Tool Search<\/th>\n<th style=\"border: 1px solid #ddd; padding: 12px; text-align: left; white-space: nowrap;\">Programmatic Calling<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">Simple Q&amp;A, 1\u20133 tools<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">Skip<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">Skip<\/td>\n<\/tr>\n<tr style=\"background: #fafafa;\">\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">10+ MCP tools loaded<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">Use it<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">Optional<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">Multi-step data pipeline<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">Optional<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">Use it<\/td>\n<\/tr>\n<tr style=\"background: #fafafa;\">\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">Large tool ecosystem (50+)<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">Essential<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">Use it<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">Enterprise \/ long-running agents<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">Essential<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">Essential<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2><span class=\"TextRun SCXW61746103 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW61746103 BCX0\" data-ccp-parastyle=\"heading 2\">The Numbers, Summarized<\/span><\/span><span class=\"EOP Selected SCXW61746103 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;134245418&quot;:true,&quot;335559738&quot;:200,&quot;335559739&quot;:120,&quot;335559991&quot;:0}\">\u00a0<\/span><\/h2>\n<div style=\"overflow-x: auto; width: 100%; margin: 25px 0; -webkit-overflow-scrolling: touch;\">\n<table style=\"width: 100%; min-width: 600px; border-collapse: collapse; font-family: Arial,Helvetica,sans-serif; font-size: 14px; color: #333;\">\n<thead>\n<tr style=\"background: #f5f7fa;\">\n<th style=\"border: 1px solid #ddd; padding: 12px; text-align: left; white-space: nowrap;\">Metric<\/th>\n<th style=\"border: 1px solid #ddd; padding: 12px; text-align: left; white-space: nowrap;\">Value<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">Token reduction with Tool Search (MCP evals)<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\"><strong>85\u201398%<\/strong><\/td>\n<\/tr>\n<tr style=\"background: #fafafa;\">\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">Accuracy improvement with Tool Search<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\"><strong>+25\u20138.6pp<\/strong> (Opus 4 \/ 4.5)<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">Token savings with Programmatic Calling (typical)<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\"><strong>20\u201340%<\/strong><\/td>\n<\/tr>\n<tr style=\"background: #fafafa;\">\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">Accuracy improvement on search benchmarks<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\"><strong>+11%<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">Anthropic&#8217;s pre-optimization tool definition overhead<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\"><strong>134K tokens<\/strong><\/td>\n<\/tr>\n<tr style=\"background: #fafafa;\">\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\">Context preserved with Tool Search (5-server setup)<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px; vertical-align: top;\"><strong>95%<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2><span class=\"TextRun SCXW75974883 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW75974883 BCX0\" data-ccp-parastyle=\"heading 2\">One Last Thing to Remember<\/span><\/span><\/h2>\n<p><span data-contrast=\"auto\">Neither pattern is magic in isolation. Programmatic Tool Calling requires your tools to opt in via\u00a0<\/span><span data-contrast=\"auto\">allowed_callers<\/span><span data-contrast=\"auto\">. Tool Search adds a search round-trip that costs latency.\u00a0And Tool Use Examples require you to actually write the examples.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">The combination of all three &#8211; <\/span><b><span data-contrast=\"auto\">discovery + code execution + usage examples<\/span><\/b><span data-contrast=\"auto\"> &#8211; is where you unlock the full efficiency gains seen in production.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">The future of AI agents is one where models work seamlessly across hundreds or thousands of tools. That future\u00a0doesn&#8217;t\u00a0arrive by stuffing every\u00a0tool\u00a0definition into context and hoping for the best. It arrives by building agents that are as deliberate about what they load as they are about what they do.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:140,&quot;335559740&quot;:276}\">\u00a0<\/span><span class=\"EOP Selected SCXW75974883 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;134245418&quot;:true,&quot;335559738&quot;:200,&quot;335559739&quot;:120,&quot;335559991&quot;:0}\">\u00a0<\/span><\/p>\n<h3><span data-ccp-props=\"{}\">Related Searches<\/span><\/h3>\n<ul>\n<li><a href=\"https:\/\/opstree.com\/blog\/leading-telecom-enterprise-transformed-enterprise-analytics-fractal-gpt\/\" target=\"_blank\" rel=\"noopener\">How Leading Telecom Enterprise Transformed Enterprise Analytics with Fractal GPT<\/a><\/li>\n<li><a href=\"https:\/\/opstree.com\/blog\/real-time-banking-ai-mule-detection-confluent\/\" target=\"_blank\" rel=\"noopener\">Real-Time Banking Data And AI-Powered Mule Detection with Confluent Platform<\/a><\/li>\n<li><a href=\"https:\/\/opstree.com\/blog\/data-integration-with-azure-event\/\" target=\"_blank\" rel=\"noopener\">Modernizing Healthcare Data Integration with Azure Event Hubs \u2013 OpsTree<\/a><\/li>\n<li><a href=\"https:\/\/opstree.com\/blog\/generative-ai-development-companies\/\" target=\"_blank\" rel=\"noopener\">Top Generative AI Development Companies<\/a><\/li>\n<\/ul>\n<h3>Related Solutions<\/h3>\n<ul>\n<li><a href=\"https:\/\/opstree.com\/observability-in-fintech\/\" target=\"_blank\" rel=\"noopener\">AI-Led FinTech Observability and DevSecOps Platform<\/a><\/li>\n<li><a href=\"https:\/\/opstree.com\/services\/cloud-migration-and-modernization-services\/\" target=\"_blank\" rel=\"noopener\">Cloud Infrastructure Services<\/a><\/li>\n<li><a href=\"https:\/\/opstree.com\/services\/database-and-data-engineering\/\" target=\"_blank\" rel=\"noopener\">Build data platform for generative AI<\/a><\/li>\n<li><a href=\"https:\/\/buildpiper.io\/secops-secure-pipelines\/\" target=\"_blank\" rel=\"noopener\">Automated security gates in CI\/CD pipeline<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>A practical breakdown of Programmatic Tool Calling and Progressive Tool Discovery &#8211; two patterns that slash token overhead by up to 98% and make MCP-connected agents actually scale.\u00a0 The Invisible Tax on Every Agent Request Imagine you hire a contractor to fix one leaky tap. But before they touch a single pipe, they unpack every [&hellip;]<\/p>\n","protected":false},"author":244582733,"featured_media":32191,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[768739571],"tags":[768739719,768739718,768739717,768739720,768739715,768739716,768739714],"class_list":["post-32186","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mcp","tag-ai-agent-token-optimization","tag-ai-agent-tool-use","tag-mcp-agents","tag-mcp-token-overhead","tag-mcp-tool-calling","tag-programmatic-tool-calling-for-ai-agents","tag-progressive-tool-discovery"],"blocksy_meta":[],"jetpack_publicize_connections":[],"acf":[],"jetpack_featured_media_url":"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/09\/Your-MCP-Agent-Is-Burning-Tokens-Before-It-Even-Starts.webp","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pfDBOm-8n8","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/32186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/users\/244582733"}],"replies":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/comments?post=32186"}],"version-history":[{"count":5,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/32186\/revisions"}],"predecessor-version":[{"id":32193,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/32186\/revisions\/32193"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media\/32191"}],"wp:attachment":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media?parent=32186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/categories?post=32186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/tags?post=32186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}