Here's a scenario that's becoming increasingly common. A team builds an AI agent to handle customer support. It starts with five tools: look up an account, check order status, create a ticket, escalate to a human, and send a follow-up email. Clean, manageable, testable.
Six months later, that same agent has 47 tools. There's a tool for each payment processor. A separate tool for US vs. EU data residency lookups. Three different tools for querying the CRM because someone added integrations without deprecating the old ones. A tool that exists because someone needed a one-off data transformation and figured they'd "clean it up later."
Sound familiar? Tool sprawl isn't a sign that your agent is powerful — it's a sign that nobody was minding the store. And at 50+ tools, the problems compound: agents make unexpected tool selections, testing coverage becomes nearly impossible to track, latency from tool orchestration adds up, and production failures are hard to trace because the call graph is a spider web.
None of this is inevitable. Here's what it actually takes to manage function calling at scale.
Why Tool Sprawl Happens (And Why It's Worse Than You Think)
The proliferation of tools rarely happens all at once. It sneaks up on you. A product manager wants to add a discount lookup. An integration engineer connects a new CRM field. Someone builds a wrapper around an internal API that already exists. Each addition is individually defensible. Collectively, they create a mess.
But there's a deeper technical problem that goes beyond organization. Most LLMs have a context window limit, and tool definitions take up tokens. A simple function definition — name, description, parameter schema — often runs 150–300 tokens. Multiply that by 60 tools and you're burning 9,000–18,000 tokens before the agent has read a single user message. On GPT-4o or Claude 3.5, that's not catastrophic. But it slows things down, inflates costs, and — here's the part people miss — degrades selection accuracy.
Function-calling benchmarks — including the Berkeley Function-Calling Leaderboard — consistently show that tool selection accuracy degrades when the tool count exceeds 20–30 in a single context. The model faces a harder retrieval problem: it needs to find the right tool in a longer list, with descriptions that start to blur together. In controlled comparisons, the error rate for ambiguous tool selection can climb 15–25% when moving from a 10-tool agent to a 50-tool agent with otherwise identical prompts — though exact figures vary by model and task type.
“The failure mode isn't that the agent can't use tools — it's that it uses the wrong tool with high confidence, and nobody notices until a customer gets the wrong answer.”
That's the quiet danger of tool sprawl. Errors of commission rather than omission.
The Taxonomy Problem: Start With Organization, Not Deletion
Before you can fix tool sprawl, you need to understand what you have. This sounds obvious, but most teams are shocked when they actually catalog their tools.
A useful starting framework splits tools into four categories:
Core actions — the things the agent was fundamentally designed to do. Look up records, create records, update state. These should be few, well-documented, and always available.
Integration bridges — wrappers around third-party systems. These tend to multiply most aggressively. Every new SaaS connection spawns 3–5 tools. They also have the most inconsistent naming and documentation.
Utility/transform tools — data manipulation, formatting, computation. Often these shouldn't be tools at all — they should be prompt instructions or inline code. If a tool is just format_date_to_iso, that's a sign something went wrong upstream.
Legacy tools — the ones nobody wants to delete because they're not sure if anything still calls them. In production systems, these are often 20–30% of the total tool count.
Once you have this taxonomy, you'll usually find that 30–40% of your tools are candidates for consolidation or removal right away. Integration bridges that serve the same data source with slightly different schemas. Utility tools that duplicate prompt-level instructions. Legacy tools that stopped being called 90 days ago but haven't been cleaned up.
What makes the catalog actionable is visibility: being able to see which tools are actually being invoked, how often, and in what contexts. Tool management that surfaces invocation data is the difference between pruning based on evidence and pruning based on gut instinct.
Grouping and Routing: The Toolset Pattern
Once your inventory is under control, the next architectural decision is whether to give every agent access to every tool. For most production deployments, the answer should be no.
The toolset pattern is simple: instead of one monolithic list of 60 tools, you define named subsets. A billing agent gets the billing toolset. A scheduling agent gets the scheduling toolset. An escalation agent gets a narrow set of write operations. Each toolset contains only what that agent actually needs.
This does several things at once. Context window overhead drops significantly — a billing agent with 12 relevant tools performs better at tool selection than the same agent with all 60 loaded. The blast radius when something goes wrong is narrower: a misconfigured CRM integration affects only the agents that use that toolset. And testing becomes tractable, because comprehensive coverage for a 12-tool set is a realistic target, whereas coverage for 60 tools rarely is.
The natural pushback is flexibility: "What if the billing agent needs to trigger a scheduling action?" That's usually a routing problem, not a toolset problem. Rather than expanding the billing agent's toolset, you define a handoff tool — transfer_to_scheduling_agent — that keeps the tool graph clean. Agents should be specialists, not generalists.
Tool Selection Accuracy
Avg Tokens per Turn
Mean Debug Time
These numbers come from aggregate patterns observed across teams that have migrated from flat tool lists to toolset-based routing. The gains are consistent, though exact figures will vary by agent design and model.
Testing Function Calling: The Part Everyone Skips
Here's a hard truth: most teams test their agents conversationally but don't test their tool calls structurally. They'll run end-to-end scenarios and check whether the agent "did the right thing," but they won't systematically test whether specific tool invocations happen with the right arguments under the right conditions.
That gap creates a category of production bugs that are nearly impossible to catch before they hit real users. The agent answers the user's question correctly (from the user's perspective) but calls the wrong tool, passes a slightly malformed argument, or skips a required validation step. You won't catch this in a conversation-level test.
Structural tool testing means writing assertions at the function call level. Given this conversation context, did the agent call lookup_account before update_billing_preference? Did it pass a valid account ID format? Did it avoid calling delete_record on a read-only interaction type?
A useful mental model splits tool tests into three layers:
Unit-level tool tests check that each individual tool does what it says — correct inputs produce correct outputs, edge cases are handled, errors surface cleanly. These live close to the tool implementation itself.
Invocation pattern tests check that the agent calls tools in the right sequence for a given scenario. A refund flow should hit check_eligibility before process_refund. A data export should include a verify_consent call for EU users. These are workflow-level assertions.
Coverage tests audit which tools are never invoked in any test scenario. A tool with zero test coverage is a liability — either it's not needed, or it's waiting to fail in a context you haven't thought about.
Scenario-based testing is particularly useful for the invocation pattern layer, because you can build realistic user personas and conversation flows that exercise specific tool paths. Running a "frustrated customer trying to cancel" scenario isn't just a conversation test — it's a structured exercise of the cancellation tool chain, and you can assert on exactly which tools fired and in what order.
Monitoring Tool Behavior in Production
Testing before deploy doesn't mean you're done. Function calling at scale generates a rich stream of observability signals that most teams are only partially capturing.
Every tool invocation is an event: which tool, which agent, what arguments, what was returned, how long it took. That's your raw data. What you do with it determines whether you can detect and respond to tool-level failures before they compound.
The patterns that tend to surface first in production monitoring:
Argument drift — the distribution of values passed to a tool shifts. An account lookup that starts receiving malformed IDs at a 2% rate (up from 0.1%) is either a prompt regression or a data quality problem upstream. You won't see this in conversation-level metrics.
Tool fallback chains — when an agent can't fulfill a request, it often tries multiple tools before escalating or failing. A sudden increase in fallback depth for a specific tool path is usually an early signal that something in that path broke or degraded.
Latency outliers — some tool calls should be fast (under 200ms) and others are inherently slow (external API calls). When a normally fast tool suddenly shows p95 latency above 1000ms, you need to know before your users start complaining about sluggish responses.
Unused tools — tools that had healthy invocation rates and then dropped to zero. Sometimes this is intentional (you changed the flow). Sometimes it means a routing bug is silently bypassing a critical step.
Response-level dashboards won't catch tool-level failures. What you actually need is tool-granular telemetry: per-tool invocation rates, latency distributions, argument validation failures, and error type breakdowns. Production monitoring at that level of detail is what separates teams that detect problems in minutes from teams that detect them via customer complaints.
- Catalog all tools and classify by type (core/integration/utility/legacy)
- Remove or archive tools with zero invocations in the past 30 days
- Group tools into named toolsets by agent role
- Set a per-toolset size budget (target: under 20 tools per agent)
- Write unit tests for each tool input/output contract
- Write invocation pattern tests for critical multi-tool workflows
- Audit tool test coverage — flag any tool with zero test scenarios
- Add tool-level telemetry to your monitoring stack
- Set alerts on tool latency outliers and argument validation error rates
- Review tool definitions quarterly for redundancy and documentation quality
The Documentation Debt That Kills Selection Accuracy
One underappreciated driver of poor tool selection is bad tool descriptions. When two tools have similar names and vague descriptions, the model's ability to choose correctly degrades — even when the underlying logic is perfectly distinct.
Consider these two descriptions:
get_customer— "Retrieve customer information"lookup_account— "Look up account details for a customer"
To a human, these might mean different things. To an LLM trying to decide which one to call when handling a billing inquiry, they're nearly identical. And because tool descriptions live in your prompts (not your code), they often get less editorial attention than other documentation.
The standard for good tool descriptions has three parts: what the tool does (concisely), when to use it vs. related tools (the disambiguation clause), and what NOT to use it for (the guard clause). That last one is often the most useful. "Use lookup_account for billing and subscription data. Do not use it for contact preferences — use get_customer_profile instead." That boundary instruction reduces confusion without requiring the model to infer it.
This is also worth validating empirically. Tools with similar descriptions can be tested in controlled A/B conditions by giving an agent ambiguous prompts and measuring which tool it selects. If you're seeing 20–30% of calls go to the wrong tool in these tests, the description is the first thing to fix — before changing the underlying logic.
Versioning and Deprecation: The Lifecycle Nobody Manages
Most engineering teams have a deployment process for tools (they ship code). Almost none have a deprecation process. Tools accumulate. They're never removed. And eventually you have three versions of the same account lookup function — get_account, get_account_v2, and fetch_account_details — all active, all slightly different, none officially deprecated.
A simple tool lifecycle has three stages: active (in regular use, fully tested, documented), deprecated (still callable, but agents are routed to a replacement; warnings emitted on invocation), and retired (removed from agent context, returns an explicit error if somehow called).
The transition from active to deprecated should be gated on two things: confirmation that no agent is relying on it exclusively, and a functional replacement. The transition from deprecated to retired should be time-boxed — 30 days is usually enough to catch any edge cases. Treat it like you'd treat a public API deprecation.
This lifecycle management also makes onboarding significantly easier. When a new engineer joins and needs to understand what tools are available, a flat list of 60 functions with no indication of what's current vs. legacy is a maintenance nightmare. A catalog that clearly marks active, deprecated, and the deprecation timeline is something a person can actually work with.
Prompt versioning pairs naturally with tool versioning. When you have proper prompt version control, you can tie specific prompt versions to specific toolset versions — ensuring that older prompts don't accidentally reference deprecated tools, and that rolling out a new toolset doesn't silently break prompts that expect the old one.
When Tools Aren't the Right Answer
Not everything should be a tool.
The LLM function-calling mechanism is excellent for operations that require external data or side effects — reading from a database, updating a record, triggering a workflow, calling an API. But teams frequently reach for tools when a prompt instruction would work better.
Common over-tooling patterns:
- Computation tools that just do math or string formatting. The model can do this inline. A
calculate_discounttool that applies 15% off is almost certainly better as a prompt rule. - Decision tools that just encode business logic the model could apply from its system prompt. "Determine if the user is eligible for a refund" doesn't need to be a tool call — it needs to be a clear eligibility rule in the prompt.
- Logging tools that agents call to track their own reasoning. This is observability infrastructure, not agent behavior. Don't make the agent responsible for its own monitoring.
Each unnecessary tool adds tokens, introduces a selection decision, and creates a testable surface that needs coverage. Periodically auditing which tools could be replaced by prompt logic is a healthy maintenance practice.
The signal to watch for: if a tool has very simple logic, no external dependencies, and mostly-deterministic behavior, it's probably better as a prompt instruction.
Putting It Together: The Toolset Review Cycle
Managing tools at scale isn't a one-time architectural decision. It's an ongoing operational practice. The teams that do it well tend to run a monthly or quarterly toolset review with three questions:
- Which tools were actually called in production this period, and which weren't?
- Which tools had error rates, latency outliers, or argument validation failures above threshold?
- Which tool descriptions need clarification based on observed selection mistakes?
These reviews feed directly into the toolset catalog — retirements, updates, new consolidation opportunities. They're also a good forcing function for the test coverage audit: if a tool was called in production but has no test coverage for the scenarios that triggered those calls, that's a gap that needs to close.
You don't need a perfect system on day one. You need a system that improves incrementally. Start with the catalog, pick the most obvious consolidations, instrument your tool calls with telemetry, and run your first coverage audit. The 50-tool problem didn't appear overnight — it won't be solved overnight either. But each cycle of this review will get you closer to a tool graph that actually supports the reliability and quality standards your agents need to meet.
For teams working through conversation analytics on their agent interactions, tool invocation patterns often show up as a major driver of variation in outcomes — which tools fired, in what order, with what arguments. That connection between tool behavior and outcome quality is what makes this whole layer worth the investment.
Ready to get your agent tools under control?
Chanl's toolset management and monitoring capabilities give you the visibility and structure you need to scale function calling without the chaos.
Explore Tools Management- Function Calling Best Practices — OpenAI Cookbook — OpenAI
- Tool Use Overview — Anthropic Documentation — Anthropic
- Evaluating Tool Use in LLM Agents — DeepEval Blog — DeepEval
- BFCL: Berkeley Function-Calling Leaderboard — UC Berkeley
- Toolformer: Language Models Can Teach Themselves to Use Tools — arXiv
- Building Production AI Agents with Tool Use — DeepLearning.AI
- Gartner: More Than 40% of Agentic AI Projects Will Be Canceled by 2027 — Gartner
- ToolBench: Facilitating LLMs in Mastering 16000+ Real-world APIs — arXiv
- Agent Tool Management Patterns — Patterns
- How to Evaluate LLM Tool Calling — Hamel's Blog
- Latency Optimization for Function Calling — OpenAI Platform
- Structured Outputs and Tool Schemas — OpenAI
- LLM Observability: Monitoring AI Agents in Production — Honeycomb
- LLM Powered Autonomous Agents — Lilian Weng
- AI Engineering Practices: Managing Tool Sprawl — O'Reilly
- ReAct: Synergizing Reasoning and Acting in Language Models — arXiv
- Function Calling Reliability at Scale — LangChain Blog
Chanl Team
AI Agent Testing Platform
Building the platform for AI agents at Chanl — tools, testing, and observability for customer experience.
Get AI Agent Insights
Subscribe to our newsletter for weekly tips and best practices.



