Miscellaneous
A collection of general-purpose tools.
For each tool, the Tool schema table describes the tool as it is exposed to the LLM. Where applicable, the Tool parameters table describes the optional parameters you can configure when adding the tool in the agent's Tools tab.
get_conversation_data
Returns the conversation data, as described in Conversation data. This tool takes no parameters.
Note: In most cases, it is preferable to include conversation data variables directly in your prompt or tool parameters instead of using the get_conversation_data tool; for example:
You are answering the call from {callerDisplayName} at {caller}.
Referencing conversation data this way provides the same information without introducing the latency of an extra tool call.
Refer to Conversation data for details.
Sample prompt
Use `get_conversation_data` tool to get the caller number.
play_url
Plays a pre-recorded audio file. The file must be hosted on a publicly accessible web server and referenced via the tool's url parameter. By default the file is assumed to be in wav/lpcm16 format.
Tool schema
Parameters the tool exposes to the LLM.
| Parameter | Type | Description |
|---|---|---|
url
|
string | Publicly accessible URL of the audio file to play. |
format
|
string | (Optional) Audio format of the file. Default: wav/lpcm16. See the list of supported formats. |
message
|
string | (Optional) Text of the message contained in the audio file. |
end_call
|
boolean | (Optional) End the call after playing the audio. Default: false. |
transfer_call
|
boolean | (Optional) Transfer the call after playing the audio. Default: false. |
transfer_phone
|
string | (Optional) Phone number to transfer the call to, used when transfer_call is true. |
Tool parameters
Optional parameters you can configure when adding the tool in the agent's Tools tab.
| Parameter | Description |
|---|---|
| File format | Audio format of the played files. When set, it overrides the LLM-provided format.For example: wav/mulaw |
In case of a playback failure, a PLAY-URL-FAILED message is returned to the LLM with the exact failure reason.
Consider using an agent variable to specify the audio URL, for example:
Prompt:
If user asks to play anthem, play audio file from {anthem_url}.
Variables:
anthem_url = https://upload.wikimedia.org/wikipedia/commons/f/ff/Singer.wav