manual-pink•3mo ago
Can I make local tool calls with the vapi web sdk?
Not seeing any docs for local tool calls
eg the agent sends a message to the web sdk to tell the browser to call a tool and what params to use
Example
{
"tool_call": {
"name": "do_something",
"params": {
"key": "value"
}
}
}
then the client makes the tool call and returns a result to the agent
{
"tool_call_result": {
"name": "do_something",
"result": {
"success": "true"
}
}
}
4 Replies
manual-pinkOP•3mo ago
I setup the server based tool calls and I can use the client side message to trigger the tool which is weird
can I just use client side tool calls without a server?
if I remove the server part of the tool it stops working locally
if I add it back with a fake url I can get it working client side tho
Hey DamienM, if the local tool calls are working with a fake serverUrl can you confirm that and do you still require additional support for this issue?
manual-pinkOP•3mo ago
Wondering if there is a way to get it working without the need for the fake server url
I think it adds latency to the bot because it keeps saying "hold on a second" etc
There might be a timeout property that you could set really short so that it just closes the request sooner and proceeds with the rest of the prompt. Try adding the
timeout property in the server object and see where that gets you