Skip to main content

How to Instruct an AI Agent to Use Tools in Whippy

Configure your AI agent to correctly use tools by explicitly referencing them in agent instructions.

Maria Cairns avatar
Written by Maria Cairns
Updated this week

Why it matters

Creating a tool is only the first step. An agent will not automatically know when or how to use a tool unless you clearly describe its purpose, trigger conditions, and usage rules in the agent instructions. Well-written instructions ensure tools are used reliably, safely, and at the right moment in a conversation.

Key Concepts

Agent Instructions: The rules and guidance that define how an agent reasons, responds, and decides when to act.

Tool Reference: An explicit mention of a tool by name inside the agent instructions.

Trigger Conditions: Clear criteria that tell the agent exactly when a tool should be called.

Usage Rules: Constraints that prevent incorrect or repeated tool usage.

Step-by-Step: Get an Agent to Use a Tool

  1. Create and configure the tool in the Tools section.

  2. Open Agents and select the agent you want to update.

  3. Click Edit agent.

  4. Scroll to the Agent instructions section.

  5. Add the tool in the Select tools field so the agent has access to it.

  6. In the instructions text, explicitly name the tool.

  7. Describe when the tool should be used.

  8. Define any rules or constraints around its usage.

  9. Save the agent configuration.

Example: Referencing Tools in Agent Instructions

Below is an excerpt showing how tools are referenced directly in agent instructions. The agent is told which tools exist, when to use them, and what conditions must be met before calling them.

Example snippet from Agent Instructions:

Tool Calling Rules

You have these tools. Call them only when the trigger conditions match.

1) Fetch payroll data

Tool: Fetch_Payroll_Data_Tool(last_four_ssn, phone_number_on_file)

Trigger:

  • Once you have BOTH:

    • last 4 digits of SSN

    • the phone number they believe is on file

Rules:

  • Do not call this tool again unless the caller corrects their SSN or phone number.

  • Do not discuss any specific payroll details before this verification.

2) Transfer call to assigned recruiter

Tool: Transfer_Call_to_Recruiter_Directly(identifier)

Trigger:

  • Any issue outside payroll or time scope

  • Caller explicitly asks to speak to their recruiter

  • Issue cannot be resolved on the payroll line

Rules:

  • Use the assigned recruiter email from the payroll tool response as the identifier.

  • If unavailable, use identifier "fallback".

  • Never say the recruiter’s email out loud.

This structure makes it clear:

  • Which tool to use

  • When to use it

  • What inputs are required

  • What behavior is allowed or restricted

Tips and Best Practices

  • Always refer to tools by their exact tool name.

  • Group tools under a dedicated section like “Tool Calling Rules”.

  • Write trigger conditions as bullet points, not paragraphs.

  • Add explicit rules to prevent repeated or incorrect tool calls.

  • Keep instructions deterministic and unambiguous.

Troubleshooting

Issue

Possible Cause

Fix

Agent never uses the tool

Tool not mentioned in instructions

Explicitly reference the tool and triggers

Agent uses tool too early

Triggers too vague

Add clear prerequisite conditions

Tool called repeatedly

Missing usage rules

Add rules limiting repeat calls

Agent hallucinates actions

Tool not selected for agent

Add the tool in the Select tools field

Did this answer your question?