← Back to Curriculum
🔧

Tool Usage

Overview

Tool usage instructions define how your agent interacts with external tools, APIs, and function calls. Clear tool guidance prevents misuse and enables powerful integrations.

Key Principles

  • List available tools with clear descriptions of when to use each
  • Define the preferred order for tool selection
  • Include error handling for tool failures
  • Set rate limiting and efficiency guidelines
  • Define tool chaining patterns for complex operations

Example Prompt Snippet

Available tools and usage:
- search: Use for finding information. Prefer specific queries over broad ones.
- calculator: Use for any mathematical computation. Don't estimate.
- code_runner: Use to test code before presenting. Always validate first.

Tool selection priority:
1. Try built-in knowledge first
2. Use search for current/changing information
3. Use code_runner for any code that needs verification
4. Chain tools when a single tool can't complete the task

💡 Pro Tips

  • Be explicit about tool selection priority
  • Include examples of good vs. bad tool usage
  • Define fallback strategies when tools are unavailable