VapiTool
A function or tool that a Vapi assistant can execute during conversations, including API calls, integrations, and custom actions.
VapiTool
A function or tool that a Vapi assistant can execute during conversations, including API calls, integrations, and custom actions.
Properties
id(string): Unique identifier for the tool.name(string): Name of the tool (used by LLM to select tool).assistant([[VapiAssistant]]): The assistant this tool belongs to.type(string): Tool type (function, api, calendar, sheet, contact, dtmf, handoff, bash).description(string): Description of what the tool does (helps LLM decide when to use).enabled(boolean): Whether the tool is currently enabled.async(boolean): Whether tool execution is asynchronous.parameters(object): JSON Schema defining tool parameters.requiredParameters(string[]): Required parameter names.server(object): Server configuration for API tools.url([[URL]]): Endpoint URL for API tools.method(string): HTTP method for API tools (GET, POST, PUT, DELETE).headers(object): HTTP headers for API requests.body(object): Request body template for API tools.authentication(object): Authentication configuration (api-key, bearer, oauth).timeout(number): Timeout for tool execution in milliseconds.retryStrategy(object): Retry configuration (max attempts, backoff).messages(object): Conditional messages for different tool states.startMessage(string): Message spoken when tool starts executing.completeMessage(string): Message spoken when tool completes successfully.failedMessage(string): Message spoken when tool execution fails.delayedMessage(string): Message spoken if tool takes longer than expected.conditions(object[]): Conditional logic for when to use the tool.variableExtraction(object): Configuration for extracting variables from responses.responseMapping(object): How to map tool response to conversation context.calendarProvider(string): Calendar provider for calendar tools (google, gohighlevel).sheetProvider(string): Sheet provider for sheet tools (google).sheetId(string): Google Sheet ID for sheet tools.sheetRange(string): Cell range for sheet operations.handoffTarget(string): Target for handoff tools (phone number, agent).handoffMessage(string): Message before handoff.dtmfDigits(string): DTMF digits to send for DTMF tools.executeCount(number): Total number of times tool has been executed.successCount(number): Number of successful executions.failureCount(number): Number of failed executions.averageExecutionTime(number): Average execution time in milliseconds.metadata(object): Custom key-value pairs for additional data.created(number): Timestamp when tool was created (Unix timestamp).updated(number): Timestamp of last update (Unix timestamp).
Actions
create
Create a new tool.
Input: [[VapiTool]]
Output: [[VapiTool]]
update
Modify tool configuration.
Input: [[VapiTool]]
Output: [[VapiTool]]
delete
Delete the tool.
Input: [[VapiTool]]
Output: [[VapiTool]]
enable
Enable the tool for use.
Input: [[VapiTool]]
Output: [[VapiTool]]
disable
Disable the tool.
Input: [[VapiTool]]
Output: [[VapiTool]]
test
Test tool execution with sample parameters.
Input: [[ToolTestRequest]]
Output: [[ToolTestResult]]
execute
Execute the tool with parameters.
Input: [[ToolExecutionRequest]]
Output: [[ToolExecutionResult]]
validateParameters
Validate parameter schema.
Input: [[ParameterValidation]]
Output: [[ValidationResult]]
updateMessages
Update tool messages.
Input: [[ToolMessages]]
Output: [[VapiTool]]
analyzePerformance
Analyze tool usage and performance.
Input: [[AnalysisRequest]]
Output: [[ToolAnalytics]]
Events
created: Triggered when a new tool is created.updated: Triggered when tool configuration is modified.deleted: Triggered when tool is deleted.enabled: Triggered when tool is enabled.disabled: Triggered when tool is disabled.executed: Triggered when tool is executed.succeeded: Triggered when tool execution succeeds.failed: Triggered when tool execution fails.timeout: Triggered when tool execution times out.retried: Triggered when tool execution is retried.