AI agent calls the tools too quickly and voice cut...
# support
s
While creating an AI agent, when I use custom tools, for example, for call transfer, the AI agent calls the tools too quickly, before even finishing its explanation. It sounds like, 'I'm transfe...' and then it cuts off. It should say something like, 'I'm transferring you right now,' and then make the tool call. How can I ensure that the tool calls happen only after the voice message is fully delivered?
v
To ensure your AI agent finishes speaking before executing a tool call (like call transfer), set the
blocking
parameter to
true
in your tool call configuration. This will make the tool call wait until the message is fully spoken. Example:
Copy code
json
{
  "ToolMessageStart": {
    "blocking": true
  }
}
This prevents the voice from being cut off before the tool action occurs. [See documentation for details.](https://docs.vapi.ai/changelog/2025/2/4) Source: - [Hooks, PCI Compliance, and Blocking Messages](https://docs.vapi.ai/changelog/2025/2/4)
To ensure your AI agent finishes speaking before executing a tool call (like call transfer), set the
blocking
parameter to
true
in your tool call configuration. This will make the tool call wait until the message is fully spoken. Example:
Copy code
json
{
  "ToolMessageStart": {
    "blocking": true
  }
}
This prevents the voice from being cut off before the tool action occurs. [See documentation for details.](https://docs.vapi.ai/changelog/2025/2/4) Source: - [Hooks, PCI Compliance, and Blocking Messages](https://docs.vapi.ai/changelog/2025/2/4)
s
in the function config?
Copy code
json
{
  "id": "[REDACTED_ID]",
  "createdAt": "2025-05-23T14:09:40.640Z",
  "updatedAt": "2025-05-29T12:46:52.538Z",
  "type": "function",
  "function": {
    "name": "connect_department_tool",
    "strict": true,
    "description": "Transfer customers to a specific department:\n1. First use representatives_tool to identify the appropriate department\n2. Inform customer which department you're connecting them to\n3. Use connect_department_tool with the department_id\n4. If transfer fails, suggest callback",
    "parameters": {
      "type": "object",
      "properties": {
        "department_id": {
          "description": "ID of the department to transfer to (from representatives_tool response)",
          "type": "string"
        }
      },
      "required": [
        "department_id"
      ]
    }
  },
  "orgId": "[REDACTED_ORG_ID]",
  "server": {
    "url": "https://ngrok-free.app/connect_department",
    "headers": {}
  }
}
v
To ensure your AI agent finishes its message before executing a tool call, add the
blocking
parameter as shown below:
Copy code
json
{
  "ToolMessageStart": {
    "blocking": true
  }
}
This setting should be included in your tool/message configuration (not inside the
function
object itself). This will make the tool call wait until the voice message is fully delivered before proceeding. [See official changelog for details.](https://docs.vapi.ai/changelog/2025/2/4) Source: - [Hooks, PCI Compliance, and Blocking Messages](https://docs.vapi.ai/changelog/2025/2/4)
To ensure your AI agent finishes its message before executing a tool call, add the
blocking
parameter as shown below:
Copy code
json
{
  "ToolMessageStart": {
    "blocking": true
  }
}
This setting should be included in your tool/message configuration (not inside the
function
object itself). This will make the tool call wait until the voice message is fully delivered before proceeding. [See official changelog for details.](https://docs.vapi.ai/changelog/2025/2/4) Source: - [Hooks, PCI Compliance, and Blocking Messages](https://docs.vapi.ai/changelog/2025/2/4)
s
Yes I can see this in the source: Blocking Messages before Tool Calls: You can now configure your tool calls to wait until a message is fully spoken before starting with ToolMessageStart.blocking=true (default is false). But I can't find any documentation with the instructions.
v
To ensure your AI agent finishes speaking before executing a tool call, add the following to your tool/message configuration (not inside the
function
object):
Copy code
json
{
  "ToolMessageStart": {
    "blocking": true
  }
}
This will make the tool call wait until the voice message is fully delivered before proceeding. Reference: [Vapi Changelog, Feb 4, 2025](https://docs.vapi.ai/changelog/2025/2/4) Source: - [Hooks, PCI Compliance, and Blocking Messages](https://docs.vapi.ai/changelog/2025/2/4)
To ensure your AI agent finishes speaking before executing a tool call, add the following to your tool/message configuration (not inside the
function
object):
Copy code
json
{
  "ToolMessageStart": {
    "blocking": true
  }
}
This will make the tool call wait until the voice message is fully delivered before proceeding. Reference: [Vapi Changelog, Feb 4, 2025](https://docs.vapi.ai/changelog/2025/2/4) Source: - [Hooks, PCI Compliance, and Blocking Messages](https://docs.vapi.ai/changelog/2025/2/4)
c
Hey! To help track down this issue, could you share: - The call ID - When exactly this happened (the timestamp) - What response you expected to get - What response you actually got instead This would really help us figure out what went wrong!
10 Views