Skip to main content

<Tool>

TL;DR

Teach your AI Voice Agent a new <Tool>.

Need Help? Let's Talk

Join our Discord community - we're here to help.

Description

Declare a tool made available to the LLM, performing complex tasks, such as file searches, function calling and more. The <Tool> verb follows a similar logic to how Assistant API Tools are defined my other LLM platform, such as the following:

Tools are affectively a remote web service, the LLM can activate, using data that is passed to it. Data can be passed to the remote tool, using any data that is available to the Voice Application Request.

Pay Attention

If a <Parameter> is defined to be passed to the tool, however, the name provided isn't available as part of the request, the execution of this verb will terminate with an error - and the session will be terminated.

Example

<Response>
<Gather input="speech" speechEngine="google" actionOnEmptyResult="true" speechTimeout="1.5" speechDetection="stt">
<Converse voice="Google:en-GB-Standard-A" language="en-GB" sessionTools="redirect dial">
<Tool name="contactLookUp" url="https://example.com/contactLookUp">
<Description>Search/Create a contact in our contact address book</Description>
<Parameter name="From" />
<Parameter name="To" />
<Parameter name="Session" />
<Parameter name="Domain" />
</Tool>
<System>
Use the contactLookUp tool to lookup the caller. If the tool reports back a JSON object with
contact information, greet the caller that you're happy to see them again. If the tool reports
an error, greet the user in a formal manner and ask them for their name.
</System>
<Speech/>
</Converse>
</Gather>
</Response>

Attributes

The following attributes are required:

Attribute NameAllowed ValuesDefault Value
nameAny string valueN/A
urlA valid URL stringN/A

<Description>

<Description> is an optional noun, providing a text description for your LLM tool.

Example

<Response>
<Gather input="speech" speechEngine="google" actionOnEmptyResult="true" speechTimeout="1.5" speechDetection="stt">
<Converse voice="Google:en-GB-Standard-A" language="en-GB" sessionTools="redirect dial">
<Tool name="simpleTool" url="https://example.com/simpleTool">
<Description>Just a simple tool description</Description>
</Tool>
<System>
Just a simple System prompt.
</System>
<Speech/>
</Converse>
</Gather>
</Response>

<Parameter>

The following attributes are required:

Attribute NameAllowed ValuesDefault Value
nameAny parameter name defined in the Voice Application RequestN/A


The following attributes are optional:

Attribute NameAllowed ValuesDefault Value
descriptionAny text valueN/A
typestring, integer, number, boolean, enumstring
requiredtrue, falsetrue
valuesComma seperated list of values, when type = enumN/A