+2. **Tool Rejection Plans**: You can now use [`Assistant.hooks.do[type=tool].tool.rejectionPlan`](https://api.vapi.ai/api#:~:text=ToolRejectionPlan) in all tool calls to prevent accidental tool execution, enforce confirmation steps, and build more robust conversation flows. This helps you to define complex logic for when a tool call should be rejected, enhancing both safety and call experience. Rejection plans can be built using regex conditions, [Liquid templates](https://liquidjs.com/), or logical groups (AND/OR). For example, you can prevent an `endCall` tool from executing unless the user says goodbye, or block a transfer if the user is actually asking a question.
0 commit comments