> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tala-assistant.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tools & Functions

> Guide to available tools for your Tala voice agents

## What is a Tool?

Tools are **functions that the voice agent can call automatically** during a conversation. Unlike workflow nodes that you configure manually, tools are used by the AI when it needs them.

<Info>
  **You don't need to trigger tools manually.** Once a tool is available to the
  workflow - built in, enabled in workflow settings, or exposed by an active
  integration - the agent decides on its own when to use it. For custom HTTP
  tools, "available" means two things:

  1. the tool is **Active** in the Integrations page
  2. the tool is attached to a **Start Call**, **Agent**, or **End Call** node

  For example, if a caller asks "How much is 1500 plus 800?", the agent will
  automatically call the calculator.
</Info>

## Custom HTTP Tools

Custom HTTP tools let you call your own public HTTP endpoints during a
conversation.

### How to Use Them

1. Create the tool in **Integrations > HTTP Tools**
2. Keep the tool in **Active** status
3. Open your workflow builder
4. Attach the tool to a **Start Call**, **Agent**, or **End Call** node
5. Save the workflow

<Warning>
  Creating a tool is not enough on its own. If the tool is not attached to a
  node, the AI cannot call it.
</Warning>

### How Does It Work?

```mermaid theme={null}
sequenceDiagram
    participant Caller
    participant AI Agent
    participant Tool

    Caller->>AI Agent: "What is 2000 + 500?"
    AI Agent->>Tool: Call calculator("2000 + 500")
    Tool-->>AI Agent: Result: 2500
    AI Agent->>Caller: "That's 2500 euros."
```

The agent:

1. Analyzes what the caller says
2. Detects that a tool would be useful
3. Calls the tool with the right parameters
4. Uses the result to respond naturally

***

## Available Tools

<CardGroup cols={2}>
  <Card title="Calculator" icon="calculator">
    Real-time mathematical calculations
  </Card>

  <Card title="Timezone" icon="clock">
    Time and timezone conversions
  </Card>

  <Card title="Knowledge Base" icon="book">
    Search your knowledge bases
  </Card>

  <Card title="Send SMS" icon="message">
    Send SMS during the call
  </Card>
</CardGroup>

<CardGroup cols={2}>
  <Card title="Google Calendar" icon="calendar" href="/integrations/google-calendar">
    Check availability and create appointments
  </Card>

  <Card title="Immofacile" icon="house" href="/integrations/immofacile">
    Real estate property search
  </Card>

  <Card title="Zenchef" icon="utensils" href="/integrations/zenchef">
    Restaurant reservations
  </Card>
</CardGroup>

***

## Calculator

Allows the agent to perform mathematical calculations during the call.

### When the Agent Uses It

* "How much is 1500 plus 800?"
* "If the rent is 950 euros, how much is that per year?"
* "What's the price per square meter for 250,000 euros on 85 sqm?"

### Supported Operations

| Operator | Description        | Example          |
| -------- | ------------------ | ---------------- |
| `+`      | Addition           | `2000 + 500`     |
| `-`      | Subtraction        | `5000 - 1200`    |
| `*`      | Multiplication     | `950 * 12`       |
| `/`      | Division           | `250000 / 85`    |
| `**`     | Power              | `2 ** 10`        |
| `%`      | Modulo (remainder) | `17 % 5`         |
| `()`     | Parentheses        | `(100 + 50) * 2` |

### Example

```
Caller: "If the property is 320,000 euros and I put down 50,000,
         how much do I need to finance?"

Agent: [Calls calculator("320000 - 50000")]
       "You would need to finance 270,000 euros."
```

***

## Timezone

Allows the agent to get the current time in different timezones and convert times.

### When the Agent Uses It

* "What time is it in New York?"
* "If I call you at 2pm Paris time, what time will it be in Tokyo?"

### Available Functions

| Function           | Description                               |
| ------------------ | ----------------------------------------- |
| `get_current_time` | Get current time in a timezone            |
| `convert_time`     | Convert time from one timezone to another |

### Timezone Format

The agent uses IANA format (international standard):

| Location    | IANA Code             |
| ----------- | --------------------- |
| France      | `Europe/Paris`        |
| New York    | `America/New_York`    |
| Los Angeles | `America/Los_Angeles` |
| London      | `Europe/London`       |
| Tokyo       | `Asia/Tokyo`          |
| Sydney      | `Australia/Sydney`    |
| Dubai       | `Asia/Dubai`          |

### Example

```
Caller: "If we schedule a call at 3pm Paris time,
         what time will it be in New York?"

Agent: [Calls convert_time("Europe/Paris", "15:00", "America/New_York")]
       "At 3pm Paris time, it will be 9am in New York.
        Does that work for you?"
```

***

## Knowledge Base (RAG)

Allows the agent to search for information in your knowledge bases.

<Note>
  The agent has **automatic access to all knowledge bases** in your organization. You don't need to specify which one to use.
</Note>

### When the Agent Uses It

* Questions about your products or services
* Checking internal policies
* Looking up technical information
* FAQ and common questions

### How It Works

1. The agent detects a question requiring specific information
2. It formulates a search query
3. The system searches all your knowledge bases
4. The agent receives the most relevant passages
5. It uses this information to respond

### Example

```
Caller: "What are your opening hours on Saturday?"

Agent: [Calls search_knowledge_base("opening hours Saturday")]
       "According to our information, we're open on Saturdays
        from 9am to 12:30pm. Would you like to schedule an appointment?"
```

***

## Send SMS

Allows the agent to send an SMS during the call.

<Warning>
  This feature must be **enabled in the workflow configuration** to be available.
</Warning>

### When the Agent Uses It

* Send an appointment summary
* Share a confirmation link
* Provide contact information

### Parameters

| Parameter         | Description                                       |
| ----------------- | ------------------------------------------------- |
| `recipient_phone` | Recipient's phone number                          |
| `message`         | SMS content (160 characters max for a single SMS) |

### Activation

To enable SMS sending in a workflow:

1. Open the workflow settings
2. Enable the "Send SMS" option
3. Configure the sender name

### Example

```
Agent: "I'll send you an SMS with your appointment summary."

       [Calls send_sms("+33612345678", "Appointment confirmed: Monday 15th at 2pm")]

       "Done! You should receive it in a few moments."
```

***

## Integrations (Advanced Tools)

These tools require an integration configured in your account.

### Google Calendar

Check availability and create appointments in Google Calendar.

<Card title="Google Calendar Guide" icon="calendar" href="/integrations/google-calendar">
  Configuration and usage of the Google Calendar integration
</Card>

### Immofacile

Real-time property search for real estate agencies.

<Card title="Immofacile Guide" icon="house" href="/integrations/immofacile">
  Configuration and usage of the Immofacile integration
</Card>

### Zenchef

Check availability and make reservations at restaurants using Zenchef.

<Card title="Zenchef Guide" icon="utensils" href="/integrations/zenchef">
  Configuration and usage of the Zenchef integration
</Card>

### Zelty

Browse menus, create orders, and check order status during restaurant calls.
Once the Zelty integration is active, these tools are available automatically.

<Card title="Zelty Guide" icon="cash-register" href="/integrations/zelty">
  Configuration and usage of the Zelty integration
</Card>

### Stripe (Paiement)

Send Stripe payment links by SMS during live calls. Once Stripe is active,
the generic payment link tool is available automatically. If both Zelty and
Stripe are active, the combined order + payment flow is exposed automatically
as well.

<Card title="Stripe Guide" icon="credit-card" href="/integrations/stripe-client">
  Configuration and usage of the Stripe payment integration
</Card>

***

## Custom HTTP Tools

Beyond the built-in tools listed above, you can create your own **custom HTTP tools** that the AI agent calls during conversations. This lets the agent interact with any external API -- your CRM, booking system, inventory service, or any other HTTP endpoint.

### How It Works

A custom HTTP tool works just like a built-in tool: the AI agent decides when to call it based on the conversation context. The difference is that instead of calling an internal function, it sends an HTTP request to an endpoint you define.

```mermaid theme={null}
sequenceDiagram
    participant Caller
    participant AI Agent
    participant Your API

    Caller->>AI Agent: "Is the item in stock?"
    AI Agent->>Your API: GET /api/inventory?sku=ABC123
    Your API-->>AI Agent: {"in_stock": true, "quantity": 42}
    AI Agent->>Caller: "Yes, that item is in stock."
```

### Creating a Custom Tool

1. Go to the **Integrations** page in your dashboard
2. Click **Add Custom Tool**
3. Fill in the configuration fields shown in the dialog
4. Click **Save**

### Configuration

| Field           | Description                                                                                                     |
| --------------- | --------------------------------------------------------------------------------------------------------------- |
| **Name**        | A short, descriptive name the AI uses to identify the tool (e.g., "Check Inventory")                            |
| **Description** | A clear explanation of what the tool does and when to use it. The AI reads this to decide when to call the tool |
| **HTTP Method** | `GET`, `POST`, `PUT`, `PATCH`, or `DELETE`                                                                      |
| **URL**         | The endpoint to call                                                                                            |
| **Timeout**     | Request timeout in milliseconds                                                                                 |
| **Parameters**  | Input parameters the AI extracts from the conversation and passes to the tool                                   |

### Parameters

Parameters define what information the AI should extract from the conversation to pass to the tool. Each parameter has:

| Property        | Description                                                           |
| --------------- | --------------------------------------------------------------------- |
| **Name**        | Parameter identifier (e.g., `sku`, `customer_email`)                  |
| **Type**        | Data type (`string`, `number`, `boolean`)                             |
| **Description** | What this parameter represents (helps the AI extract the right value) |
| **Required**    | Whether the AI must collect this value before calling the tool        |

### Request Behavior

* `POST`, `PUT`, and `PATCH` requests send the tool arguments as a JSON body
* `GET` and `DELETE` requests send the tool arguments as query parameters
* Non-2xx responses are surfaced to Tala as tool errors instead of success responses

### Advanced Configuration

The current create/edit dialog focuses on the fields above. Tala also supports additional advanced options at the platform/API layer:

* Static HTTP headers
* [Stored credentials](/features/credentials) for authentication

These advanced fields are not yet exposed in the current custom tool form.

### Testing

After saving a tool, use the **Test** action from the tools list to run the current configuration and inspect the response. Tala shows the returned result, and HTTP error responses are displayed as errors.

<Note>
  The description field is critical. The AI uses it to decide when to call the tool. Write it as if you were explaining to a colleague when and why they should use this endpoint.
</Note>

***

## Best Practices

<Check>
  **Test with Looptalk** - Before going live, test your workflows with Looptalk to verify that tools work correctly.
</Check>

<Check>
  **Trust the agent** - The agent knows when to use tools. You don't need to explicitly tell it in the prompt.
</Check>

<Check>
  **Keep your knowledge bases updated** - The more complete your KBs, the more accurately the agent can answer questions.
</Check>

<Check>
  **Plan for no-result cases** - Tools may sometimes return no results. The agent can handle these situations, but you can add instructions in the prompt to guide its behavior.
</Check>
