Learn how to create and configure multi-step API tools in the MCP Kit.
location
parameter. A product search tool might need a query
parameter.location
, search_query
, user_id
).string
: For text (e.g., a city name, a search term).number
: For numerical values (e.g., an item ID, a quantity).boolean
: For true/false values.+
icon).
GET
, POST
).
param.
prefix: https://api.weather.com/forecast?city={{param.location}}
.env.
prefix: https://api.service.com/data?apiKey={{env.SERVICE_API_KEY}}
. (Environment variables are configured on the tools page).Bearer Token
, Basic Auth
).{{param...}}
and {{env...}}
placeholders here (e.g., {{env.MY_API_KEY}}
for a Bearer Token).Content-Type
, Accept
) or additional URL query parameters.{{param...}}
and {{env...}}
placeholders.JSON
, Form Data
).{{param...}}
and {{env...}}
placeholders for dynamic values.string
parameter, wrap the placeholder in double quotes: "message": "{{param.user_message}}"
number
or boolean
parameter, do not use quotes: "itemId": {{param.product_id}}, "notify": {{param.send_notification}}
string
, number
, boolean
) provided by your parameters.
message_title
and recipient_id
would be defined as string
parameters)._if
structure within the value of the field you want to make conditional.
discountCode
field only if the discount_code
parameter was supplied, and an optionalNumber
field only if optional_number
was supplied.discountCode
, optionalNumber
) will only be included in the final JSON sent to the API if the conditions within its _if
block are met._if
: This special key indicates conditional logic for the parent field.present
: An array containing one or more strings. Each string must be the name of a tool input parameter (prefixed with toolInput.
) that must be present (i.e., provided by the LLM) for the condition to be true. All parameters listed must be present.then
: Specifies the value to assign to the parent field (e.g., discountCode
) if the present
condition is met. Remember to use the correct placeholder syntax ({{param...}}
) and quoting: Wrap string placeholders in double quotes ("{{param...}}"
) and leave number/boolean placeholders unquoted ({{param...}}
).present
array is not provided during the tool call, the entire parent field (e.g., "discountCode": { ... }
) will be omitted from the request body.
{{steps[INDEX].body.fieldName}}
or {{steps[INDEX].headers.headerName}}
. INDEX
is the 0-based number of the previous step (e.g., {{steps[0].body.userId}}
uses the userId
field from the body of the first step (index 0)). The last step’s output is automatically considered the final result of the tool.