Tool Selection

10 patterns for this goal

Tool selection fails when agents avoid necessary tools and attempt tasks without them, select the wrong tool for the task, select unsafe tools, overuse a single tool for multiple different tasks, or don’t understand when different retrieval channels should be used. The 10 selection patterns documented here cover the challenge of choosing tools correctly — from misunderstanding tool capabilities through sequencing errors (using tools in wrong order) to unsafe or untrusted tool selection. Tool selection is upstream of invocation and reliability: selecting the wrong tool guarantees failure regardless of how correctly it’s invoked.

Key Takeaways

  • 10 patterns span tool avoidance, capability misunderstanding, wrong tool selection, tool sequencing, and unsafe selection.
  • Wrong Tool Selected and Tool Capability Misunderstanding are most severe: agents select fundamentally wrong tools or misunderstand what tools can do.
  • Unsafe Tool Selection and Tool Overuse are second-order: agents select unsafe tools without checking safety, or overuse one tool for tasks it’s not suited for.
  • Tool Avoidance is architectural: agent has a tool available but chooses not to use it, leading to degraded performance or incorrect results.

Scope

  • Tool Understanding — Capability misunderstanding, avoidance, overuse.
  • Tool Selection — Correct tool selection, wrong tool selection, unsafe selection.
  • Sequencing and Channels — Tool sequencing, retrieval channel selection, environment selection.
  • Trust and Validation — Untrusted tool result acceptance, conflict resolution.

When Tool Selection Matters

  • Agents have multiple tools available; selection significantly affects outcome quality.
  • Some tools are unsafe or should only be used in specific contexts.
  • Tool sequencing matters; one tool’s output feeds another tool’s input.

Cross-Pattern Insight

Tool-selection failures result from incomplete understanding of tool capabilities and context. Agents select wrong tools because they don’t understand what each tool does, when to use it, or what its limitations are. The mitigation is explicit tool discovery and capability documentation: maintain a registry of tools with clear descriptions of what each does, test agent tool selection by injecting tool-selection probes (does agent select the right tool for this task?), and add guardrails to prevent unsafe tool selections (require human approval before selecting dangerous tools).

Frequently Asked Questions

How do you prevent wrong-tool-selection errors?

Maintain clear, concise tool descriptions that describe the task each tool solves and when it should be used. Test agent tool selection with various tasks and verify the right tool is selected for each. Consider adding tool-selection validation (agent submits tool choice, human or automated validator approves before execution).

Should agents avoid using tools if they can solve the task without them?

Depends on the task: if accuracy matters and a tool provides better accuracy, use the tool. If latency matters and skipping the tool is fast enough, consider skipping it. Make the tradeoff explicit in tool selection logic.

How do you handle tool conflicts where multiple tools could solve the task?

Document tool precedence (if Tools A and B both apply, prefer A in these cases, B in those cases). Use tool precedence to break ties consistently.

Patterns

PatternMechanism
Tool AvoidanceAgent avoids available tool; attempts task without tool; results degrade
Tool Capability MisunderstandingAgent misunderstands tool capabilities; selects tool for wrong task or thinks tool can’t do task it can
Tool Conflict UnresolvedMultiple tools apply; agent doesn’t resolve conflict; behavior undefined
Tool OveruseAgent uses one tool for multiple different tasks; tool isn’t suitable for all uses
Tool Sequencing ErrorTools must be used in specific order; agent uses wrong order; fails or produces wrong results
Unsafe Tool SelectionAgent selects tool that is unsafe or should require approval in this context
Untrusted Tool Result AcceptanceAgent accepts tool result without validation; result is wrong or untrusted
Wrong EnvironmentTool is appropriate for one environment (test) but not another (prod); agent selects for wrong environment
Wrong Retrieval ChannelMultiple ways to retrieve same data; agent selects wrong channel; retrieval fails or inefficient
Wrong Tool SelectedAgent selects wrong tool for task; tool is not appropriate for this task

Total: 10 patterns