is it possible to define tools in the request for ...
# support
w
I don't know how to make my bot end the call and transfer the call. I've made the tools in vapi dashboard but the bot doesn't recognize them. So I would like to have it within my request for creating a call
v
Hi there! 👋 I understand you're having trouble with your bot recognizing the
endCall
and
transferCall
tools you've created in the Vapi dashboard. While I can't confirm if it's possible to define tools directly within the initial call creation request, I can definitely help with how to define these tools and why they might not be recognized. According to the [documentation](https://docs.vapi.ai/tools/default-tools),
transferCall
and
endCall
are default tools in Vapi that need to be explicitly added to your model's
tools
array. This might be why your bot isn't recognizing them even though you've created them in the dashboard. One solution is to include these Vapi-defined tools in your custom LLM tools. When the model requests these tools, you'll need to send a "done stream" back to Vapi with the function name, as mentioned in [this Discord discussion](https://discord.com/channels/1211482211119796234/1339871158975336498). Here's an example of how to define the
transferCall
tool:
Copy code
json
{
  "type": "function",
  "function": {
    "name": "transferCall",
    "description": "Transfer call to a specified destination",
    "parameters": {}
  }
}
For the
endCall
tool, you would use a similar structure:
Copy code
json
{
  "type": "function",
  "function": {
    "name": "endCall",
    "description": "End the current call"
  }
}
You can also configure tools within a request by specifying parameters like
async
and `toolId`:
Copy code
json
{
  "temperature": 0.1,
  "toolIds": [
    "28ac2a2d-5454-4390-b0b0-d9a97baf0b73",
    "2da5ce83-b311-4f71-be5f-78d8559066bf"
  ],
  "tools": [
    {
      "type": "transferCall",
      "async": false,
      "destinations": [
        // your destination configurations
      ]
    }
  ]
}
Is there anything specific about implementing these tools that you'd like me to explain further? Sources: - [Vapi Documentation Default Tools](https://docs.vapi.ai/tools/default-tools)
- [Discord Discussion on Tool Recognition](https://discord.com/channels/1211482211119796234/1339871158975336498) - [Discord Discussion on Tool Configuration](https://discord.com/channels/1211482211119796234/1333880245681393756)
k
By setting a call ending hook that triggers a hangup action, automatically ending the call when the conversation concludes..