extended-salmon
extended-salmon2mo ago

tool call invocation as first action

noticed an issue that happens frequently with our inbound agents. if the first response from the caller requires a tool call (according to the prompt), the agent generates a text responses instead. example call ID: https://dashboard.vapi.ai/calls/fae13d6c-6745-4b25-97a9-e306e1723349 The agent should have used a tool call to transfer the call, but instead simply told the user it would transfer their call without invoking the tool.
VAPI Dashboard - Voice AI Management Platform
Build and manage voice AI agents that conduct human-like conversations. Access real-time analytics, configure assistants, and monitor your AI voice applications.
2 Replies
Vapi
Vapi2mo ago
To ensure your agent invokes the transferCall tool as the first action (without generating a text response), update your system prompt to include explicit instructions for silent tool invocation. For example:
{
"model": {
"tools": [
{
"type": "transferCall",
"destinations": [{ "type": "number", "number": "+16054440129" }]
}
],
"messages": [
{
"role": "system",
"content": "If the user requests a transfer, do not send any text response—silently trigger the transferCall tool as your first action."
}
]
}
}
{
"model": {
"tools": [
{
"type": "transferCall",
"destinations": [{ "type": "number", "number": "+16054440129" }]
}
],
"messages": [
{
"role": "system",
"content": "If the user requests a transfer, do not send any text response—silently trigger the transferCall tool as your first action."
}
]
}
}
This approach helps the agent prioritize tool calls over text when required by the prompt.
Reference: Prompting Guide – Silent transfers Sources: - Prompting Guide – Silent transfers - Default Tools: Transfer Call
⤵️ Mention @Vapi Support Bot for follow-ups 🐥
Shubham Bajaj
Shubham Bajaj2mo ago
Hi Adam, To ensure a tool call invocation is handled properly as the first action, make sure the tool is correctly set up and configured in your assistant’s model. You need to ensure that your custom tool or an integration tool is properly defined and can be triggered correctly. 1. Create or Update Tools: Use the Create Tool or Update Tool API endpoints to create or modify your tools. 2. Tool Completion Messages: You can also add metadata and customize messages upon completion using the new tool.completed client message type to handle notifications (Changelog). 3. Configuration: Ensure the tools are integrated into the assistant's configuration. This may involve using integration tools like Make and GHL if applicable. More details on tool configuration can be found in the Introduction to Tools. Implementing these steps should help trigger tool calls effectively as the first action. If you need specific examples or further help, feel free to ask.

Did you find this page helpful?