Dynamic Tool Configuration: Pre-tool webhooks allow you to fetch
contextual data and customize tool parameters in real-time before specific
tools are executed during calls.
Overview

Tool-Specific Data
Fetch relevant information and parameters specific to the tool being
executed.
Runtime Customization
Modify tool parameters dynamically based on call context and external
data sources.
Configuration Options
Webhook URL Selection
Pre-tool webhooks support flexible URL configuration:Use Pre-Call URL
To reuse your existing pre-call webhook endpoint
Dedicated URL
Specify a dedicated URL for a tool-specific webhook endpoint
Pre-tool webhooks are tool-specific and must be enabled individually for
each tool through the configuration.
Request Specification
HTTP Method and Timeout
Openmic sends aPOST
request to your configured webhook URL with:
- Content-Type:
application/json
- Timeout: 3 seconds per attempt
- User-Agent:
Openmic-Webhook/1.0
Unlike pre-call webhooks, pre-tool webhook failures do not terminate the
call. Tools will execute with original parameters if the webhook fails.
Request Payload
Payload Fields
Field | Type | Required | Description |
---|---|---|---|
event | string | Yes | Always "tool" for pre-tool webhooks |
tool_name | string | Yes | Name of the tool being executed |
tool.direction | string | Yes | Call direction: "inbound" or "outbound" |
tool.bot_id | string | Yes | Unique identifier for the bot/session |
tool.from_number | string | Yes | Caller’s phone number in E.164 format |
tool.to_number | string | Yes | Callee’s phone number in E.164 format |
Tool Names
calendar_check
calendar_booking
transfer_call
Expected Response
Success Response
Your webhook must return a200
status code with a JSON response containing dynamic variables:
Response Structure
Field | Type | Required | Description |
---|---|---|---|
tool | object | Yes | Container for tool-related data |
tool.dynamic_variables | object | Yes | Key-value pairs of variables to inject into the tool |
Variable Merging: Pre-tool dynamic variables are merged with existing
call variables, with pre-tool variables taking precedence for conflicts.
Retry Logic and Error Handling
Retry Configuration
Max Attempts
3 total attempts 1 initial request + 2 retries
Timeout
3 seconds Per individual request attempt
Backoff Strategy
Exponential delays 1s, 2s, 3s between retries
Retry Triggers
Openmic retries your webhook in these scenarios:- Timeout: No response within 3 seconds
- HTTP Errors: 4xx or 5xx status codes
- Network Errors: Connection failures or DNS resolution issues
- Invalid JSON: Malformed response body
Failure Handling
Graceful Degradation: If all webhook attempts fail, the tool will
execute using its original parameters without dynamic variables.
- The failure is logged for debugging purposes
- The tool continues execution with its original static parameters
- Any existing call-level dynamic variables remain available
- The call continues normally without interruption