Silently tool calling
# support
a
I am using tool polling and triggering a tool every 6–7 seconds during the call. However, with each trigger, the AI says ‘One sec’ or ‘Give me a moment.’ I haven’t set any messages for the tool and tried enforcing silent behavior in the content, but I haven’t had success yet. Is there a way to prevent the AI from generating these messages and instead trigger this synchronous tool silently? Or is there any recommendation you have to approach this ? Call id example: https://dashboard.vapi.ai/calls Thanks in advance
r
You have to set those messages to an empty string in the api way, not in the interface.
curl --location --request PATCH 'https://api.vapi.ai/tool/toolId' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "messages": [ { "type": "request-complete", "content": "" }, { "type": "request-failed", "content": "" }, { "type": "request-response-delayed", "content": "" }, { "type": "request-start", "content": "" } ] }'
k
Thanks @rocha for helping @alep.
@alep I guess your issue is resolved?
if no start message is provided for a tool, it defaults to using random filler messages like "Hold on a sec", "One moment", etc. Here are two approaches to solve this: 1. Set Empty Messages Array You can explicitly set an empty messages array for your tool to prevent any default messages:
Copy code
javascript
const tool = {
  type: "function",
  async: false,
  messages: [], // This will override the default messages
  function: {
    // your function definition
  }
};
2. Use Async Tool If you don't need an immediate response from the tool, you can set it as async which will prevent start messages from being spoken:
Copy code
javascript
const tool = {
  type: "function", 
  async: true, // Async tools don't trigger start messages
  function: {
    // your function definition
  }
};
The second approach is recommended if you're just polling and don't need synchronous responses, as it's explicitly mentioned.
a
ok thank you both
k
Marking this ticket as solved.
3 Views