Skip to navigation

Tool Call

Sent when EVI triggers a tool call

Payload

The payload of this webhook request is an object.
chat_group_idstringRequired

Unique ID of the Chat Group associated with the Chat session.

chat_idstringRequired

Unique ID of the Chat session.

config_idstring or nullRequired

Unique ID of the EVI Config used for the session.

caller_numberstring or nullRequired

Phone number of the caller in E.164 format (e.g., +12223333333). This field is included only if the Chat was created via the Twilio phone calling integration.

custom_session_idstring or nullRequired

User-defined session ID. Relevant only when employing a custom language model in the EVI Config.

timestampintegerRequired

Unix timestamp (in milliseconds) indicating when the tool call was triggered.

tool_call_messageobjectRequired
The tool call.
namestringRequired
Name of the tool called.
parametersstringRequired
Parameters of the tool. These parameters define the inputs needed for the tool's execution, including the expected data type and description for each input field. Structured as a stringified JSON schema, this format ensures the tool receives data in the expected format.
response_requiredbooleanRequired

Indicates whether a response to the tool call is required from the developer, either in the form of a Tool Response message or a Tool Error message.

tool_call_idstringRequired
The unique identifier for a specific tool call instance. This ID is used to track the request and response of a particular tool invocation, ensuring that the correct response is linked to the appropriate request.
tool_typeenumRequired

Type of tool called. Either builtin for natively implemented tools, like web search, or function for user-defined tools.

Allowed values:
type"tool_call"Required

The type of message sent through the socket; for a Tool Call message, this must be tool_call.

This message indicates that the supplemental LLM has detected a need to invoke the specified tool.

custom_session_idstring or nullOptional
Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions.
twilio_metadatamap from strings to strings or nullRequired

Twilio metadata associated with the chat. This field is included only if the Chat was created via the Twilio phone calling integration. Fields may include call_sid, account_sid, from_number, to_number, caller_name, caller_number, from_city, from_state, from_zip, from_country, to_city, to_state, to_zip, and to_country.If a specific metadata is not available, this field will be set to an empty string.

event_name"tool_call"OptionalDefaults to tool_call

Always tool_call.

Response

200
any
Return a 200 status to indicate that the data was received successfully.