> For the complete documentation index, see [llms.txt](https://learn.doubletick.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.doubletick.io/doubletick-ai/ai-agent/how-to-create-a-new-ai-agent/give-your-ai-agent-tools-to-take-action/pre-call-tool.md).

# Pre-call tool

Learn how Pre-call Tools automatically retrieve caller background information from DoubleTick and external systems to deliver contextualized, personalized AI voice interactions.

#### What’s covered

* [Overview & core benefits](https://learn.doubletick.io/ai-agent/how-to-create-a-new-ai-agent/tools-how-to-give-your-ai-agent-the-ability-to-take-action/pre-call-tool#what-is-a-pre-call-tool)
* [Key prerequisites](https://learn.doubletick.io/ai-agent/how-to-create-a-new-ai-agent/tools-how-to-give-your-ai-agent-the-ability-to-take-action/pre-call-tool#key-prerequisites)
* [How to create a pre-call tool](https://learn.doubletick.io/ai-agent/how-to-create-a-new-ai-agent/tools-how-to-give-your-ai-agent-the-ability-to-take-action/pre-call-tool#how-to-create-a-pre-call-tool)
* [Practical setup example](https://learn.doubletick.io/ai-agent/how-to-create-a-new-ai-agent/tools-how-to-give-your-ai-agent-the-ability-to-take-action/pre-call-tool#practical-setup-example-looking-up-customer-details)

#### What is a pre-call tool

Think of your DoubleTick AI voice agent like a phone receptionist. Normally, when a customer calls, the receptionist does not know anything about them until the caller explains who they are and what they need.

A pre-call tool changes that. It is a quick background action that runs the moment a call starts, right before your AI agent speaks its first word. It quietly looks up customer information from your external system (like your CRM, order database, or account portal) and hands that data to the AI agent. This means your agent already knows who is calling and their account context from the very first second.

#### Core benefits

* **No repeated questions**: Your AI agent already knows basic customer details, so callers do not have to repeat themselves.
* **Faster conversations**: Details are fetched instantly in the background, eliminating awkward pauses during the call.
* **Built specifically for voice**: Works exclusively with phone calls, where getting instant context matters most.
* **Runs on autopilot**: Set it up once, and it will automatically run before every incoming or outgoing call without any manual effort.

#### Key prerequisites

Before you create a pre-call tool, make sure you have:

* An active DoubleTick AI voice agent.
* A working external API endpoint that can look up customer data using a phone number or customer ID.
* Any required API authentication details (like an API key or bearer token).

#### How to create a pre-call tool

<figure><img src="https://2303112206-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F53n17VnOICC1LtDqlENV%2Fuploads%2Fhj9WRH4EDIlpANfen98P%2FUntitled%20design%20-%202026-08-13T164315.538.gif?alt=media&amp;token=04569662-e917-4792-b6b2-1b87ef9e9be3" alt=""><figcaption></figcaption></figure>

Follow these steps to set up a new pre-call tool for your AI voice agent.

1. **Open your AI agent:** Go to **AI Agent** and open the AI agent where you want to add the pre-call tool.
2. **Go to tools:** Click **Tools** from the top navigation.
3. **Add a pre-call tool:** Click **Add pre-call tool**.
4. **Enter the tool details:** Add a **name** and **description** for the tool. The description should clearly explain what the tool does and what information it returns.
5. **Select the tool type:** Under **Type**, select **API**.
6. **Choose where the tool is available:** Under **Available for**, select **Voice only**. Pre-call tools run before an AI voice call starts and provide the response to the AI as context.
7. **Add parameters:** Under **Parameters**, click **Add parameter** and enter the details required by your API.

   For example:

   * **Name:** `customerPhone`
   * **Type:** `String`
   * **Description:** Add a short description explaining what the parameter is used for.
   * **Sample value:** Enter an example phone number.
   * Turn on **Required parameter** if the API needs this value for every request.

   You can also use **Import from cURL** if you already have a cURL request for your API.
8. **Set up the API request:** Select the required **Method**, such as `GET` or `POST`, and enter the **URL** of your API.
9. **Add the required headers:** Under **Headers**, click **Add header** and enter the headers required by your API, such as **Authorization** or **Accept**.
10. **Use customer details in the request:** You can use `{{customerId}}` and `{{customerPhone}}` in the API URL or request body. DoubleTick automatically fills these values from the customer details when the call starts.
11. **Test the API:** Click **Test API** to check whether the request is working correctly. Review the response to make sure the API is returning the information your AI agent needs.
12. **Create the tool:** Once the API test is successful, click **Create** to save the pre-call tool.

{% hint style="info" %}
**Note**: A pre-call tool runs **before the AI voice call starts**. Its response is passed to the AI agent as context, so the agent can use the information from the start of the conversation. The tool cannot be called during the call.
{% endhint %}

#### Practical setup example: looking up customer details

Let’s say you want your AI voice agent to know a customer’s details before the call starts.

You can create a pre-call tool that sends the customer’s phone number to your API and gets the customer’s information before the call connects.

**Example setup:**

* **Tool name:** `get customer details`
* **Description:** Add a short description explaining that the tool fetches customer details before the call.
* **Type:** Select **API**.
* **Available for:** Select **Voice only**.
* **Parameter:** Add the customer phone number as a parameter.
* **Method:** Select **GET**.
* **URL:** Enter your customer details API and pass the phone number as a parameter.
* **Headers:** Add the required API headers, such as **Authorization** and **Accept**.

For example, your API request can use the customer’s phone number to fetch their details. You can use `{{customerPhone}}` in the URL so DoubleTick automatically fills in the phone number of the customer being called.

Once the API is configured, click **Test API** to check the response. If the API returns the expected customer details, click **Create** to save the pre-call tool.

The next time the AI voice agent makes a call, the tool runs before the call starts and gives the agent the customer information as context.

**Suggested articles**\
[How to create a voice AI agent in DoubleTick](https://learn.doubletick.io/ai-voice-calling/how-to-create-a-voice-ai-agent-in-doubletick)\
[How to create an API tool ](https://learn.doubletick.io/ai-agent/how-to-create-a-new-ai-agent/tools-how-to-give-your-ai-agent-the-ability-to-take-action/api-tools)\
[How to create a Bot tool](https://learn.doubletick.io/ai-agent/how-to-create-a-new-ai-agent/tools-how-to-give-your-ai-agent-the-ability-to-take-action/bot-tools)\
[How to test your voice AI agent](https://learn.doubletick.io/ai-voice-calling/how-to-test-your-voice-ai-agent)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://learn.doubletick.io/doubletick-ai/ai-agent/how-to-create-a-new-ai-agent/give-your-ai-agent-tools-to-take-action/pre-call-tool.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
