Parameters derived from properties in APIRequest t...
# support
v
Suggestion: To ensure your URL parameters like
{{start}}
,
{{end}}
, and
{{timezone}}
are substituted correctly, define them as top-level parameters in your tool configuration, not just in the request body. For example:
Copy code
json
{
  "parameters": {
    "start": { "type": "string", "description": "Start time" },
    "end": { "type": "string", "description": "End time" },
    "timezone": { "type": "string", "description": "Time zone" }
  },
  "url": "https://api.cal.com/v2/slots?eventTypeSlug=consultation&username=sailboatai&start={{start}}&end={{end}}&timeZone={{timezone}}"
}
Update your tool config to include these parameters at the top level, then test again. For more, see the [custom tools guide](https://docs.vapi.ai/tools/custom-tools). Source: - [Custom Tools](https://docs.vapi.ai/tools/custom-tools)
o
It seems like this is a configuration for a custom tool when I am trying to work with the api request tool. Should I be using the custom tool?
Also I need to make a GET request so am I able to do that with the custom tool?
v
I can help you sort this out so your variables work properly when the request runs. This usually happens because the API request tool doesn’t handle dynamic values well, while the custom tool does. You can still make GET requests there without any issue. Could you show me how you set up the variables in your request body? @Ovi1kanobe
c
Hi Ovi1kanobe, If you are encountering issues with API request tools, particularly with query parameters not being passed correctly, ensure that your request configuration includes all required fields such as
type
,
method
,
url
, and other relevant data according to the [API Reference](https://docs.vapi.ai/api-reference/tools/update). If the
type
is
apiRequest
, the object should include
method
,
url
, and
credentialId
along with any necessary
headers
and
body
. Check if the
rejectionPlan
and
variableExtractionPlan
are properly defined to manage any issues arising during the request execution. Also, keep in mind the
CreateApiRequestToolDto
configuration, and ensure that all required fields are correctly set up, which may impact how the parameters are recognized and executed during tests or actual requests. For detailed steps, you can reference the [SDK documentation](https://docs.vapi.ai/api-reference/tools/update) to ensure your implementation follows the required specifications.
2 Views