Dynamic tool messages
Generate a context-aware message before a tool runs with bot_say
bot_say is a reserved tool-call argument that lets the model generate a context-aware message in the same response that calls a tool. Vapi speaks the message before the tool runs, without making an additional model request.
When bot_say is a non-empty string, Vapi trims and speaks it before the tool runs. Vapi waits for the message to finish, the caller cannot interrupt it, and Vapi removes the property from the tool-call arguments before execution.
Define bot_say inside function.parameters. It is not a top-level tool
field, so it does not appear as a named field in the Create Tool API
reference.
Supported tools
Configure bot_say
Add bot_say to the tool schema
Add a bot_say property with type set to string inside
function.parameters.properties. Include bot_say in
function.parameters.required so the schema requires the model to provide
it.
Add the property to the existing schema without removing other properties or required entries.
Describe what the assistant should say
Use the property’s description to specify the message’s purpose, tone,
length, language, and script rules. Ask for a non-empty value without
trailing punctuation.
Suppress the static start message
For a tool that normally plays a static or default request-start message,
add one request-start entry with an empty content value. Replace any
existing request-start entries, but keep entries for other message types.
The empty entry prevents a second acknowledgment. Without it, Vapi can select a default filler message. If you configure a non-empty static start message, the caller can hear both the dynamic and static messages.
Function tool example
Behavior and limits
- Vapi trims leading and trailing whitespace from a non-empty
bot_sayvalue before speaking it. - An empty or whitespace-only value is neither spoken nor removed, so it remains in the tool-call arguments.
- If several tools are called in the same turn, Vapi joins their non-empty values with
.and speaks one combined message. - If
bot_sayis missing, Vapi does not speak a dynamic tool message.
Verify the behavior
Make a test call that triggers the Function tool, then inspect the request received by your server. Confirm that:
- The assistant finishes the dynamic message before the request arrives.
- The caller cannot interrupt the message.
- The caller hears no second start message.
- The received tool-call arguments contain
order_idbut notbot_say.
Related
- Function tools
- Handoff arguments
- Static variables and aliases for server-controlled values the model does not generate.