Assistant id on Tools calling
# support
y
What's the recommended way to provide assistant id to my custom tool? Should it be injected to the prompt and define as a tool parameter or there's another better way? Thanks.
c
Hi there, Thank you for your message. Our team is currently out of the office. We operate Monday through Friday, from 9:00 AM to 8:00 PM Pacific Standard Time (PST). We’ll get back to you as soon as possible during our normal business hours. If your message is urgent, please mark it accordingly or include “URGENT” in the subject line, and we’ll do our best to respond promptly. Warm regards, Vapi Customer Support Team
v
Recommended Approach: Define the assistant ID as a parameter in your custom tool's configuration. This way, the assistant ID will be included in the tool call payload and accessible by your tool server. Example tool configuration:
Copy code
json
{
  "type": "function",
  "function": {
    "name": "my_custom_tool",
    "parameters": {
      "type": "object",
      "properties": {
        "assistantId": { "type": "string", "description": "The assistant's unique ID" }
      },
      "required": ["assistantId"]
    }
  },
  "server": {
    "url": "https://your-server.com/tool-endpoint"
  }
}
Pass the assistant ID from your assistant configuration or server logic when calling the tool. For more, see the [custom tools documentation](https://docs.vapi.ai/tools/custom-tools). Source: - [Custom Tools](https://docs.vapi.ai/tools/custom-tools)
y
Using this configuration the assistant_id sent this in the payload to the tool end point: {..., "assistant_id": "assistantId"}
Does the assistant id should be injected manually to the prompt?
When injecting the assistant id to the prompt it works, this is the recommended way??
c
We are reviewing the details of your request and will reach out to you when we have an update or if we need additional information.
j
I'm curious about this as well. Vapi's guidance/documentation on what system variables are available and how to pass data to an API endpoint is sorely lacking. I feel like a blind man groping around in the dark trying to figure out what I can pass to my endpoint. So frustrating.
c
Hi Jon, Thanks for sharing this feedback. It’s really helpful for us to know where the gaps are. To better understand your needs, could you let us know what variables you’d ideally want to pass along to your endpoint if there were no limitations? That way, we can evaluate how best to support those use cases.
3 Views