Custom tool api call
# support
r
When I use the custom tool to have Vapi call my own api end-point, it puts the entire context json into the api call - the entire conversation context. It seems to do this even when I add specific fields into the definition of the tool call. I'm pretty new to LLMs and tool usage, so perhaps this is normal. However, this seems a little ... overkill. I'm literally receiving hundreds of MB of data over the period of an hour or so during testing. Is this how it's supposed to/designed to work? Alternatively, am I doing something wrong? https://cdn.discordapp.com/attachments/1305469490405834762/1305469490980716605/image.png?ex=673324b5&is=6731d335&hm=126063e87a2be3d16147db08d326085f46bf8703064655a99b4fb104c3eef9a7&
v
@redazzo It sounds like you're experiencing an issue with the way the custom tool is handling context data when making API calls to your endpoint. Typically, you should be able to specify which parts of the context you want to include in your API call to avoid sending unnecessary data. If you're receiving more data than expected, it could be due to the configuration of your custom tool. You might need to adjust the settings to ensure that only the relevant fields are being sent. It's not normal to send the entire conversation context if you have specified particular fields to include in the API call. To help you further, I would need to know more about how you've configured the tool call. Could you provide more details on how you're specifying the fields for the API call? This will help me give you more accurate advice on how to resolve the issue.
You can continue this conversation by mentioning me in the message.
r
@User In the details section of the tool specification, I'm adding the properties end_date, start_date, and calendar_id. They're all strings, and only the end_date and start_date are required fields.
s
Hey @redazzo your receiving the server message of type tool call complete payload which is correct as required by most of the users. You required info will be under the property
toolCallList
To know more about the payload visit this url https://api.vapi.ai/api-json# and then goto components > schemas > ServerMessageToolCalls
Let me know if you have any questions.
r
Thanks @Shubham Bajaj. It may be useful to add the option to have the tool only pass on the parameters as specified. Having the complete context can be useful (particularly if you're integrating with other bespoke agents or frameworks like langchain), but I also suspect that many use cases only require the specified parameters (such as mine). Thanks!