Using Tools , Extract Info from Inbound Calling Ag...
# support
a
Will anyone help me out how to trigger tools/functions ,in Inbound calling agents using coding so that It'll accept the data and pass it to my server.
v
To trigger tools in Vapi's inbound calling agents and pass data to your server:
Copy code
javascript
// Configure your tool with async parameter for server communication
const toolConfig = {
  toolId: "your-tool-id",
  async: true,
  server: {
    url: "https://your-server.com/endpoint",
    secret: "your-api-key" // Will be sent as x-vapi-secret header
  }
};
When triggered, Vapi will send a request to your server with the extracted data. Your server should respond with:
Copy code
json
{
  "results": [{
    "toolCallId": "incoming-id-from-request",
    "result": "Your response data"
  }]
}
Sources: - [Vapi Tools Documentation](https://docs.vapi.ai/tools) - [Vapi Custom Tools Documentation](https://docs.vapi.ai/tools/custom-tools) - [Vapi Server URL Events Documentation](https://docs.vapi.ai/server-url/events)
k
Custom tool with the required parameters, configure your server to handle function call events via post requests, and add the tool to your assistant’s setup to trigger it during inbound calls.
a
can you please come and explain to me in zoom or google meet eidther tell me how to structure my assistant while coding Thank you.
k