> For the complete documentation index, see [llms.txt](https://help.sipgate.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.sipgate.de/ai-agents/en/connections-and-integrations/live-call-funktionen.md).

# Live call features

## How do I set up live-call functions for the AI agent?

For some use cases, your AI agent needs up-to-date data from external systems during an ongoing call—for example, customer data from your CRM or live availability from your calendar. Live-call functions make exactly that possible: they connect your AI agent to a system of your choice via an MCP server.

MCP stands for *Model Context Protocol* — a standardized interface through which AI agents can communicate with external services.

{% hint style="info" %}
**Requirement:** You need an accessible MCP server.
{% endhint %}

***

### Step 1: Add MCP server

<figure><img src="/files/2cd4ae5acc6198ab1ae11a6882fd95bf3d816e3d" alt=""><figcaption></figcaption></figure>

1. Open the desired AI agent in app.sipgate.com.
2. Switch to the **Integrations**.
3. tab and click in the **Live-call functions** area on **Add**.
4. Fill out the form:
   * **Name (optional):** An internal display name for the server.
   * **URL:** The HTTPS address of your MCP server.
   * **Token (optional):** An authentication token, if your server requires protection.
5. Click **Save**. sipgate automatically connects to the server and checks the connection.

{% hint style="warning" %}
**Attention:** The URL must start with `https://` . Connections without TLS are not accepted.
{% endhint %}

***

### Step 2: Check the MCP server tools

After a successful connection, sipgate displays the tools provided by the server in the overview. Check there:

* **Tool name:** May be at most **28 characters** long. Longer names are marked as errors in the overview and may cause the AI agent to use the tool unreliably.
* **Tool descriptions:** The descriptions are received from the MCP server and adopted. The more precise the description, the better the AI agent can recognize when to use the tool. If possible, adjust the tool description on the MCP server side.
* **Parameters:** Each parameter should also have a meaningful description. The information on which format (string, array, etc.) this is expected in by the MCP server and whether it is optional or required is crucial for successful communication between the agent and the MCP server.

{% hint style="info" %}
**Tip:** The description is the most important part of a tool—it is the only thing the agent uses to infer when and how to use the tool.

A good description:

* clearly states the **purpose** of the tool
* explains **limitations** if applicable (e.g. maximum 3 results, weekdays only)
* avoids technical implementation details (what happens in the background is irrelevant to the agent)

A bad description is too general or missing entirely. The agent will then use the tool incorrectly or not at all.
{% endhint %}

***

### Step 3: Integrate the MCP server into your [playbook](/ai-agents/en/behavior/playbooks.md#wie-funktionieren-playbooks) The AI agent works toward goals. In the playbook, describe

<figure><img src="/files/223a138c7a17b1a36f1068ee06e65008c0947186" alt=""><figcaption></figcaption></figure>

what it should achieve **— not how it should proceed step by step.** Good:

**“Determine the caller’s customer number based on their phone number** get\_customer `and greet them by name` get\_name `”`."

**Less good:** “1. Call the tool `and greet them by name` . 2. Save the ID. 3. Then call `”` ...”

The AI agent decides for itself which tools it uses and in what order to achieve the goal.

{% hint style="warning" %}
**Attention:** Business logic, validation, and state management do not belong in the playbook—that is the MCP server’s job. The playbook describes goals; the MCP server provides the tools.
{% endhint %}

{% hint style="success" %}
**Tip:** If you reference MCP tools in individual playbook tasks, the following rule of thumb is recommended—ideally only one tool per task. This improves reliability during the live conversation, since each step corresponds to exactly one purpose and the agent does not have to coordinate parallel tool calls within a task. The example below already shows this pattern: each task calls exactly one tool.
{% endhint %}

***

### Example: [playbook](/ai-agents/en/behavior/playbooks.md#wie-funktionieren-playbooks)-Structure for an appointment booking

Conditions for the playbook: If the user wants to book an appointment or asks about available appointments.

<table><thead><tr><th width="46.76995849609375">#</th><th width="168.4600830078125">Task name</th><th width="416.78045654296875">Description</th><th align="center">Summary</th></tr></thead><tbody><tr><td>1</td><td><strong>Ask about time of day</strong></td><td>Ask the user which part of the day they prefer for the appointment. The four options are: <code>morning</code>, <code>noon</code>, <code>afternoon</code> or <code>evening</code>. Remember the answer as <code>preferred_timeslot</code> for all further tool calls.</td><td align="center">✅</td></tr><tr><td>2</td><td><strong>Get appointment suggestions</strong></td><td>Call <code>get_next_suggestions</code> with the remembered <code>preferred_timeslot</code> . Present the returned appointment suggestions to the user with date and time.</td><td align="center">❌</td></tr><tr><td>3</td><td><strong>Confirm slot or alternative</strong></td><td>Ask the user: Does one of the suggestions fit? Would they like to specify a particular day? Or does none of the suggestions fit?<br>• Slot chosen → save the appointment, continue to Task 5 (capture first name)<br>• Specific day → continue to Task 4 (ask about day &#x26; day suggestions)<br>• None fit → back to Task 2 (get appointment suggestions)</td><td align="center">✅</td></tr><tr><td>4</td><td><strong>Ask about day &#x26; day suggestions</strong></td><td>Ask for the desired date. Call <code>get_suggestions_for_day</code> and present the suggestions. Return to the logic of Task 3.<br><br><strong>Error handling:</strong><br>• invalid date format → Explain to the user that the date was not recognized, and ask again for a valid date (format: DD.MM.YYYY)<br>• Date too far in the future → Inform the user that bookings can only be made up to 2 months in advance, and ask for a closer date<br>• Other error → Explain the problem and return to Task 3 (confirm slot or alternative) so the user can choose another day or request new suggestions</td><td align="center">❌</td></tr><tr><td>5</td><td><strong>Capture first name</strong></td><td>IF the first name is not yet known: ask specifically for it. IF already known: skip this task.</td><td align="center">✅</td></tr><tr><td>6</td><td><strong>Capture last name</strong></td><td>IF the last name is not yet known: ask specifically for it. IF already known: skip this task.</td><td align="center">✅</td></tr><tr><td>7</td><td><strong>Capture phone number</strong></td><td>The caller’s phone number is in the context under “User with the phone number: …” — use this directly, DO NOT ask for it. Only if this entry is missing or the caller is anonymous: ask specifically for the phone number.</td><td align="center">✅</td></tr><tr><td>8</td><td><strong>Confirm contact details</strong></td><td>Read out the first name, last name, and phone number again and ask for confirmation. If the user makes a correction: apply the correction and read the data out again.</td><td align="center">❌</td></tr><tr><td>9</td><td><strong>Book appointment</strong></td><td>Call <code>book_appointment</code> with the appointment data (start, end) and the contact details (firstname, lastname, phone). IF booking is successful (<code>success: true</code>): Confirm the booking with date and time and continue with Task 10 (thank you &#x26; goodbye).<br><br><strong>Error handling:</strong><br>• Slot taken (409 / “no longer available”) → Inform the user that the slot has been taken in the meantime, and return to Task 2 (get appointment suggestions)<br>• Other error → Briefly explain to the user that something went wrong, and ask whether they would like to choose another appointment (back to Task 3 – confirm slot or alternative) or try again later</td><td align="center">✅</td></tr><tr><td>10</td><td><strong>Thank you &#x26; goodbye</strong></td><td>Thank the user for the conversation and wish them a nice day. Do not make any further offers.</td><td align="center">❌</td></tr></tbody></table>

### Update connection

If you have updated your MCP server (e.g. added new tools), click in the live-call functions overview of your agent under **Integrations** on the button **... → Update** and the current tool list will be fetched again.

### Test live-call functions

Manual test calls are recommended, with the playbook actively used. Check:

* Does the agent trigger the correct tools?
* Are the parameters filled in correctly?
* Does the agent respond appropriately to server error messages?

***

### Security notes

When setting up your MCP server, note the following points:

* **Access rights:** If your MCP server runs with admin rights on a third-party system, the AI agent potentially has extensive access. Grant only the minimum permissions necessary.
* **Identity check:** Consider what information a caller can request—and whether additional authentication makes sense for sensitive operations.
* **Input validation:** Validate all inputs server-side. Do not rely on the AI agent only passing expected values.
* **Data transfer:** Make sure your server cannot output data to unauthorized third parties—for example, through unchecked return values.


---

# 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:

```
GET https://help.sipgate.de/ai-agents/en/connections-and-integrations/live-call-funktionen.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
