> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cozmox.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Tool



## OpenAPI

````yaml get /tool/{id}
openapi: 3.0.0
info:
  title: cozmox API
  description: Voice AI for developers.
  version: '1'
  contact: {}
servers:
  - description: Cozmox APIs
    url: https://api.cozmox.ai
  - url: https://api.cozmox.ai
security: []
tags: []
paths:
  /tool/{id}:
    get:
      tags:
        - Tools
      summary: Get Tool
      operationId: ToolController_findOne
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ApiRequestTool'
                    title: ApiRequestTool
                  - $ref: '#/components/schemas/DtmfTool'
                    title: DtmfTool
                  - $ref: '#/components/schemas/EndCallTool'
                    title: EndCallTool
                  - $ref: '#/components/schemas/FunctionTool'
                    title: FunctionTool
                  - $ref: '#/components/schemas/GhlTool'
                    title: GhlTool
                  - $ref: '#/components/schemas/MakeTool'
                    title: MakeTool
                  - $ref: '#/components/schemas/TransferCallTool'
                    title: TransferCallTool
                  - $ref: '#/components/schemas/OutputTool'
                    title: OutputTool
                  - $ref: '#/components/schemas/BashTool'
                    title: BashTool
                  - $ref: '#/components/schemas/ComputerTool'
                    title: ComputerTool
                  - $ref: '#/components/schemas/TextEditorTool'
                    title: TextEditorTool
                  - $ref: '#/components/schemas/QueryTool'
                    title: QueryTool
                  - $ref: '#/components/schemas/GoogleCalendarCreateEventTool'
                    title: GoogleCalendarCreateEventTool
                  - $ref: '#/components/schemas/GoogleSheetsRowAppendTool'
                    title: GoogleSheetsRowAppendTool
                  - $ref: '#/components/schemas/GoogleCalendarCheckAvailabilityTool'
                    title: GoogleCalendarCheckAvailabilityTool
                  - $ref: '#/components/schemas/SlackSendMessageTool'
                    title: SlackSendMessageTool
                  - $ref: '#/components/schemas/SmsTool'
                    title: SmsSendTool
                  - $ref: '#/components/schemas/McpTool'
                    title: McpTool
                  - $ref: '#/components/schemas/GoHighLevelCalendarAvailabilityTool'
                    title: GoHighLevelCalendarAvailabilityTool
                  - $ref: '#/components/schemas/GoHighLevelCalendarEventCreateTool'
                    title: GoHighLevelCalendarEventCreateTool
                  - $ref: '#/components/schemas/GoHighLevelContactCreateTool'
                    title: GoHighLevelContactCreateTool
                  - $ref: '#/components/schemas/GoHighLevelContactGetTool'
                    title: GoHighLevelContactGetTool
                discriminator:
                  propertyName: type
                  mapping:
                    apiRequest: '#/components/schemas/ApiRequestTool'
                    dtmf: '#/components/schemas/DtmfTool'
                    endCall: '#/components/schemas/EndCallTool'
                    function: '#/components/schemas/FunctionTool'
                    ghl: '#/components/schemas/GhlTool'
                    make: '#/components/schemas/MakeTool'
                    transferCall: '#/components/schemas/TransferCallTool'
                    output: '#/components/schemas/OutputTool'
                    bash: '#/components/schemas/BashTool'
                    computer: '#/components/schemas/ComputerTool'
                    textEditor: '#/components/schemas/TextEditorTool'
                    query: '#/components/schemas/QueryTool'
                    google.calendar.event.create: '#/components/schemas/GoogleCalendarCreateEventTool'
                    google.sheets.row.append: '#/components/schemas/GoogleSheetsRowAppendTool'
                    google.calendar.availability.check: '#/components/schemas/GoogleCalendarCheckAvailabilityTool'
                    slack.message.send: '#/components/schemas/SlackSendMessageTool'
                    sms: '#/components/schemas/SmsTool'
                    mcp: '#/components/schemas/McpTool'
                    gohighlevel.calendar.availability.check: '#/components/schemas/GoHighLevelCalendarAvailabilityTool'
                    gohighlevel.calendar.event.create: '#/components/schemas/GoHighLevelCalendarEventCreateTool'
                    gohighlevel.contact.create: '#/components/schemas/GoHighLevelContactCreateTool'
                    gohighlevel.contact.get: '#/components/schemas/GoHighLevelContactGetTool'
      security:
        - bearer: []
components:
  schemas:
    ApiRequestTool:
      type: object
      properties:
        messages:
          type: array
          description: >-
            These are the messages that will be spoken to the user as the tool
            is running.


            For some tools, this is auto-filled based on special fields like
            `tool.destinations`. For others like the function tool, these can be
            custom configured.
          items:
            oneOf:
              - $ref: '#/components/schemas/ToolMessageStart'
                title: ToolMessageStart
              - $ref: '#/components/schemas/ToolMessageComplete'
                title: ToolMessageComplete
              - $ref: '#/components/schemas/ToolMessageFailed'
                title: ToolMessageFailed
              - $ref: '#/components/schemas/ToolMessageDelayed'
                title: ToolMessageDelayed
        type:
          type: string
          enum:
            - apiRequest
          description: The type of tool. "apiRequest" for API request tool.
        method:
          type: string
          enum:
            - POST
            - GET
        timeoutSeconds:
          type: number
          description: >-
            This is the timeout in seconds for the request. Defaults to 20
            seconds.


            @default 20
          minimum: 1
          maximum: 300
          example: 20
        id:
          type: string
          description: This is the unique identifier for the tool.
        orgId:
          type: string
          description: >-
            This is the unique identifier for the organization that this tool
            belongs to.
        createdAt:
          format: date-time
          type: string
          description: This is the ISO 8601 date-time string of when the tool was created.
        updatedAt:
          format: date-time
          type: string
          description: >-
            This is the ISO 8601 date-time string of when the tool was last
            updated.
        function:
          description: >-
            This is the function definition of the tool.


            For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled
            based on tool-specific fields like `tool.destinations`. But, even in
            those cases, you can provide a custom function definition for
            advanced use cases.


            An example of an advanced use case is if you want to customize the
            message that's spoken for `endCall` tool. You can specify a function
            where it returns an argument "reason". Then, in `messages` array,
            you can have many "request-complete" messages. One of these messages
            will be triggered if the `messages[].conditions` matches the
            "reason" argument.
          allOf:
            - $ref: '#/components/schemas/OpenAIFunction'
        name:
          type: string
          description: >-
            This is the name of the tool. This will be passed to the model.


            Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a
            maximum length of 40.
          maxLength: 40
          pattern: /^[a-zA-Z0-9_-]{1,40}$/
        description:
          type: string
          description: >-
            This is the description of the tool. This will be passed to the
            model.
          maxLength: 1000
        url:
          type: string
          description: This is where the request will be sent.
        body:
          description: This is the body of the request.
          allOf:
            - $ref: '#/components/schemas/JsonSchema'
        headers:
          description: These are the headers to send in the request.
          allOf:
            - $ref: '#/components/schemas/JsonSchema'
        backoffPlan:
          description: >-
            This is the backoff plan if the request fails. Defaults to undefined
            (the request will not be retried).


            @default undefined (the request will not be retried)
          allOf:
            - $ref: '#/components/schemas/BackoffPlan'
        variableExtractionPlan:
          description: >-
            This is the plan to extract variables from the tool's response.
            These will be accessible during the call and stored in
            `call.artifact.variableValues` after the call.


            Usage:

            1. Use `aliases` to extract variables from the tool's response body.
            (Most common case)


            ```json

            {
              "aliases": [
                {
                  "key": "customerName",
                  "value": "{{customer.name}}"
                },
                {
                  "key": "customerAge",
                  "value": "{{customer.age}}"
                }
              ]
            }

            ```


            The tool response body is made available to the liquid template.


            2. Use `aliases` to extract variables from the tool's response body
            if the response is an array.


            ```json

            {
              "aliases": [
                {
                  "key": "customerName",
                  "value": "{{$[0].name}}"
                },
                {
                  "key": "customerAge",
                  "value": "{{$[0].age}}"
                }
              ]
            }

            ```


            $ is a shorthand for the tool's response body. `$[0]` is the first
            item in the array. `$[n]` is the nth item in the array. Note, $ is
            available regardless of the response body type (both object and
            array).


            3. Use `aliases` to extract variables from the tool's response
            headers.


            ```json

            {
              "aliases": [
                {
                  "key": "customerName",
                  "value": "{{tool.response.headers.customer-name}}"
                },
                {
                  "key": "customerAge",
                  "value": "{{tool.response.headers.customer-age}}"
                }
              ]
            }

            ```


            `tool.response` is made available to the liquid template.
            Particularly, both `tool.response.headers` and `tool.response.body`
            are available. Note, `tool.response` is available regardless of the
            response body type (both object and array).


            4. Use `schema` to extract a large portion of the tool's response
            body.


            4.1. If you hit example.com and it returns `{"name": "John", "age":
            30}`, then you can specify the schema as:


            ```json

            {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "age": {
                    "type": "number"
                  }
                }
              }
            }

            ```


            4.2. If you hit example.com and it returns `{"name": {"first":
            "John", "last": "Doe"}}`, then you can specify the schema as:


            ```json

            {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "object",
                    "properties": {
                      "first": {
                        "type": "string"
                      },
                      "last": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }

            ```


            These will be extracted as `{{ name }}` and `{{ age }}`
            respectively. To emphasize, object properties are extracted as
            direct global variables.


            4.3. If you hit example.com and it returns `{"name": {"first":
            "John", "last": "Doe"}}`, then you can specify the schema as:


            ```json

            {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "object",
                    "properties": {
                      "first": {
                        "type": "string"
                      },
                      "last": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }

            ```


            These will be extracted as `{{ name }}`. And, `{{ name.first }}` and
            `{{ name.last }}` will be accessible.


            4.4. If you hit example.com and it returns `["94123", "94124"]`,
            then you can specify the schema as:


            ```json

            {
              "schema": {
                "type": "array",
                "title": "zipCodes",
                "items": {
                  "type": "string"
                }
              }
            }

            ```


            This will be extracted as `{{ zipCodes }}`. To access the array
            items, you can use `{{ zipCodes[0] }}` and `{{ zipCodes[1] }}`.


            4.5. If you hit example.com and it returns `[{"name": "John", "age":
            30, "zipCodes": ["94123", "94124"]}, {"name": "Jane", "age": 25,
            "zipCodes": ["94125", "94126"]}]`, then you can specify the schema
            as:


            ```json

            {
              "schema": {
                "type": "array",
                "title": "people",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "age": {
                      "type": "number"
                    },
                    "zipCodes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }

            ```


            This will be extracted as `{{ people }}`. To access the array items,
            you can use `{{ people[n].name }}`, `{{ people[n].age }}`, `{{
            people[n].zipCodes }}`, `{{ people[n].zipCodes[0] }}` and `{{
            people[n].zipCodes[1] }}`.


            Note: Both `aliases` and `schema` can be used together.
          allOf:
            - $ref: '#/components/schemas/VariableExtractionPlan'
      required:
        - type
        - method
        - id
        - orgId
        - createdAt
        - updatedAt
        - url
    DtmfTool:
      type: object
      properties:
        messages:
          type: array
          description: >-
            These are the messages that will be spoken to the user as the tool
            is running.


            For some tools, this is auto-filled based on special fields like
            `tool.destinations`. For others like the function tool, these can be
            custom configured.
          items:
            oneOf:
              - $ref: '#/components/schemas/ToolMessageStart'
                title: ToolMessageStart
              - $ref: '#/components/schemas/ToolMessageComplete'
                title: ToolMessageComplete
              - $ref: '#/components/schemas/ToolMessageFailed'
                title: ToolMessageFailed
              - $ref: '#/components/schemas/ToolMessageDelayed'
                title: ToolMessageDelayed
        type:
          type: string
          enum:
            - dtmf
          description: The type of tool. "dtmf" for DTMF tool.
        id:
          type: string
          description: This is the unique identifier for the tool.
        orgId:
          type: string
          description: >-
            This is the unique identifier for the organization that this tool
            belongs to.
        createdAt:
          format: date-time
          type: string
          description: This is the ISO 8601 date-time string of when the tool was created.
        updatedAt:
          format: date-time
          type: string
          description: >-
            This is the ISO 8601 date-time string of when the tool was last
            updated.
        function:
          description: >-
            This is the function definition of the tool.


            For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled
            based on tool-specific fields like `tool.destinations`. But, even in
            those cases, you can provide a custom function definition for
            advanced use cases.


            An example of an advanced use case is if you want to customize the
            message that's spoken for `endCall` tool. You can specify a function
            where it returns an argument "reason". Then, in `messages` array,
            you can have many "request-complete" messages. One of these messages
            will be triggered if the `messages[].conditions` matches the
            "reason" argument.
          allOf:
            - $ref: '#/components/schemas/OpenAIFunction'
      required:
        - type
        - id
        - orgId
        - createdAt
        - updatedAt
    EndCallTool:
      type: object
      properties:
        messages:
          type: array
          description: >-
            These are the messages that will be spoken to the user as the tool
            is running.


            For some tools, this is auto-filled based on special fields like
            `tool.destinations`. For others like the function tool, these can be
            custom configured.
          items:
            oneOf:
              - $ref: '#/components/schemas/ToolMessageStart'
                title: ToolMessageStart
              - $ref: '#/components/schemas/ToolMessageComplete'
                title: ToolMessageComplete
              - $ref: '#/components/schemas/ToolMessageFailed'
                title: ToolMessageFailed
              - $ref: '#/components/schemas/ToolMessageDelayed'
                title: ToolMessageDelayed
        type:
          type: string
          enum:
            - endCall
          description: The type of tool. "endCall" for End Call tool.
        id:
          type: string
          description: This is the unique identifier for the tool.
        orgId:
          type: string
          description: >-
            This is the unique identifier for the organization that this tool
            belongs to.
        createdAt:
          format: date-time
          type: string
          description: This is the ISO 8601 date-time string of when the tool was created.
        updatedAt:
          format: date-time
          type: string
          description: >-
            This is the ISO 8601 date-time string of when the tool was last
            updated.
        function:
          description: >-
            This is the function definition of the tool.


            For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled
            based on tool-specific fields like `tool.destinations`. But, even in
            those cases, you can provide a custom function definition for
            advanced use cases.


            An example of an advanced use case is if you want to customize the
            message that's spoken for `endCall` tool. You can specify a function
            where it returns an argument "reason". Then, in `messages` array,
            you can have many "request-complete" messages. One of these messages
            will be triggered if the `messages[].conditions` matches the
            "reason" argument.
          allOf:
            - $ref: '#/components/schemas/OpenAIFunction'
      required:
        - type
        - id
        - orgId
        - createdAt
        - updatedAt
    FunctionTool:
      type: object
      properties:
        messages:
          type: array
          description: >-
            These are the messages that will be spoken to the user as the tool
            is running.


            For some tools, this is auto-filled based on special fields like
            `tool.destinations`. For others like the function tool, these can be
            custom configured.
          items:
            oneOf:
              - $ref: '#/components/schemas/ToolMessageStart'
                title: ToolMessageStart
              - $ref: '#/components/schemas/ToolMessageComplete'
                title: ToolMessageComplete
              - $ref: '#/components/schemas/ToolMessageFailed'
                title: ToolMessageFailed
              - $ref: '#/components/schemas/ToolMessageDelayed'
                title: ToolMessageDelayed
        type:
          type: string
          enum:
            - function
          description: The type of tool. "function" for Function tool.
        async:
          type: boolean
          example: false
          description: |-
            This determines if the tool is async.

              If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.

              If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.

              Defaults to synchronous (`false`).
        server:
          description: |2-

              This is the server where a `tool-calls` webhook will be sent.

              Notes:
              - Webhook is sent to this server when a tool call is made.
              - Webhook contains the call, assistant, and phone number objects.
              - Webhook contains the variables set on the assistant.
              - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.
              - Webhook expects a response with tool call result.
          allOf:
            - $ref: '#/components/schemas/Server'
        id:
          type: string
          description: This is the unique identifier for the tool.
        orgId:
          type: string
          description: >-
            This is the unique identifier for the organization that this tool
            belongs to.
        createdAt:
          format: date-time
          type: string
          description: This is the ISO 8601 date-time string of when the tool was created.
        updatedAt:
          format: date-time
          type: string
          description: >-
            This is the ISO 8601 date-time string of when the tool was last
            updated.
        function:
          description: >-
            This is the function definition of the tool.


            For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled
            based on tool-specific fields like `tool.destinations`. But, even in
            those cases, you can provide a custom function definition for
            advanced use cases.


            An example of an advanced use case is if you want to customize the
            message that's spoken for `endCall` tool. You can specify a function
            where it returns an argument "reason". Then, in `messages` array,
            you can have many "request-complete" messages. One of these messages
            will be triggered if the `messages[].conditions` matches the
            "reason" argument.
          allOf:
            - $ref: '#/components/schemas/OpenAIFunction'
      required:
        - type
        - id
        - orgId
        - createdAt
        - updatedAt
    GhlTool:
      type: object
      properties:
        messages:
          type: array
          description: >-
            These are the messages that will be spoken to the user as the tool
            is running.


            For some tools, this is auto-filled based on special fields like
            `tool.destinations`. For others like the function tool, these can be
            custom configured.
          items:
            oneOf:
              - $ref: '#/components/schemas/ToolMessageStart'
                title: ToolMessageStart
              - $ref: '#/components/schemas/ToolMessageComplete'
                title: ToolMessageComplete
              - $ref: '#/components/schemas/ToolMessageFailed'
                title: ToolMessageFailed
              - $ref: '#/components/schemas/ToolMessageDelayed'
                title: ToolMessageDelayed
        type:
          type: string
          enum:
            - ghl
          description: The type of tool. "ghl" for GHL tool.
        id:
          type: string
          description: This is the unique identifier for the tool.
        orgId:
          type: string
          description: >-
            This is the unique identifier for the organization that this tool
            belongs to.
        createdAt:
          format: date-time
          type: string
          description: This is the ISO 8601 date-time string of when the tool was created.
        updatedAt:
          format: date-time
          type: string
          description: >-
            This is the ISO 8601 date-time string of when the tool was last
            updated.
        function:
          description: >-
            This is the function definition of the tool.


            For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled
            based on tool-specific fields like `tool.destinations`. But, even in
            those cases, you can provide a custom function definition for
            advanced use cases.


            An example of an advanced use case is if you want to customize the
            message that's spoken for `endCall` tool. You can specify a function
            where it returns an argument "reason". Then, in `messages` array,
            you can have many "request-complete" messages. One of these messages
            will be triggered if the `messages[].conditions` matches the
            "reason" argument.
          allOf:
            - $ref: '#/components/schemas/OpenAIFunction'
        metadata:
          $ref: '#/components/schemas/GhlToolMetadata'
      required:
        - type
        - id
        - orgId
        - createdAt
        - updatedAt
        - metadata
    MakeTool:
      type: object
      properties:
        messages:
          type: array
          description: >-
            These are the messages that will be spoken to the user as the tool
            is running.


            For some tools, this is auto-filled based on special fields like
            `tool.destinations`. For others like the function tool, these can be
            custom configured.
          items:
            oneOf:
              - $ref: '#/components/schemas/ToolMessageStart'
                title: ToolMessageStart
              - $ref: '#/components/schemas/ToolMessageComplete'
                title: ToolMessageComplete
              - $ref: '#/components/schemas/ToolMessageFailed'
                title: ToolMessageFailed
              - $ref: '#/components/schemas/ToolMessageDelayed'
                title: ToolMessageDelayed
        type:
          type: string
          enum:
            - make
          description: The type of tool. "make" for Make tool.
        id:
          type: string
          description: This is the unique identifier for the tool.
        orgId:
          type: string
          description: >-
            This is the unique identifier for the organization that this tool
            belongs to.
        createdAt:
          format: date-time
          type: string
          description: This is the ISO 8601 date-time string of when the tool was created.
        updatedAt:
          format: date-time
          type: string
          description: >-
            This is the ISO 8601 date-time string of when the tool was last
            updated.
        function:
          description: >-
            This is the function definition of the tool.


            For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled
            based on tool-specific fields like `tool.destinations`. But, even in
            those cases, you can provide a custom function definition for
            advanced use cases.


            An example of an advanced use case is if you want to customize the
            message that's spoken for `endCall` tool. You can specify a function
            where it returns an argument "reason". Then, in `messages` array,
            you can have many "request-complete" messages. One of these messages
            will be triggered if the `messages[].conditions` matches the
            "reason" argument.
          allOf:
            - $ref: '#/components/schemas/OpenAIFunction'
        metadata:
          $ref: '#/components/schemas/MakeToolMetadata'
      required:
        - type
        - id
        - orgId
        - createdAt
        - updatedAt
        - metadata
    TransferCallTool:
      type: object
      properties:
        messages:
          type: array
          description: >-
            These are the messages that will be spoken to the user as the tool
            is running.


            For some tools, this is auto-filled based on special fields like
            `tool.destinations`. For others like the function tool, these can be
            custom configured.
          items:
            oneOf:
              - $ref: '#/components/schemas/ToolMessageStart'
                title: ToolMessageStart
              - $ref: '#/components/schemas/ToolMessageComplete'
                title: ToolMessageComplete
              - $ref: '#/components/schemas/ToolMessageFailed'
                title: ToolMessageFailed
              - $ref: '#/components/schemas/ToolMessageDelayed'
                title: ToolMessageDelayed
        type:
          type: string
          enum:
            - transferCall
        destinations:
          type: array
          description: >-
            These are the destinations that the call can be transferred to. If
            no destinations are provided, server.url will be used to get the
            transfer destination once the tool is called.
          items:
            oneOf:
              - $ref: '#/components/schemas/TransferDestinationAssistant'
                title: Assistant
              - $ref: '#/components/schemas/TransferDestinationNumber'
                title: Number
              - $ref: '#/components/schemas/TransferDestinationSip'
                title: Sip
        id:
          type: string
          description: This is the unique identifier for the tool.
        orgId:
          type: string
          description: >-
            This is the unique identifier for the organization that this tool
            belongs to.
        createdAt:
          format: date-time
          type: string
          description: This is the ISO 8601 date-time string of when the tool was created.
        updatedAt:
          format: date-time
          type: string
          description: >-
            This is the ISO 8601 date-time string of when the tool was last
            updated.
        function:
          description: >-
            This is the function definition of the tool.


            For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled
            based on tool-specific fields like `tool.destinations`. But, even in
            those cases, you can provide a custom function definition for
            advanced use cases.


            An example of an advanced use case is if you want to customize the
            message that's spoken for `endCall` tool. You can specify a function
            where it returns an argument "reason". Then, in `messages` array,
            you can have many "request-complete" messages. One of these messages
            will be triggered if the `messages[].conditions` matches the
            "reason" argument.
          allOf:
            - $ref: '#/components/schemas/OpenAIFunction'
      required:
        - type
        - id
        - orgId
        - createdAt
        - updatedAt
    OutputTool:
      type: object
      properties:
        messages:
          type: array
          description: >-
            These are the messages that will be spoken to the user as the tool
            is running.


            For some tools, this is auto-filled based on special fields like
            `tool.destinations`. For others like the function tool, these can be
            custom configured.
          items:
            oneOf:
              - $ref: '#/components/schemas/ToolMessageStart'
                title: ToolMessageStart
              - $ref: '#/components/schemas/ToolMessageComplete'
                title: ToolMessageComplete
              - $ref: '#/components/schemas/ToolMessageFailed'
                title: ToolMessageFailed
              - $ref: '#/components/schemas/ToolMessageDelayed'
                title: ToolMessageDelayed
        type:
          type: string
          enum:
            - output
          description: The type of tool. "output" for Output tool.
        id:
          type: string
          description: This is the unique identifier for the tool.
        orgId:
          type: string
          description: >-
            This is the unique identifier for the organization that this tool
            belongs to.
        createdAt:
          format: date-time
          type: string
          description: This is the ISO 8601 date-time string of when the tool was created.
        updatedAt:
          format: date-time
          type: string
          description: >-
            This is the ISO 8601 date-time string of when the tool was last
            updated.
        function:
          description: >-
            This is the function definition of the tool.


            For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled
            based on tool-specific fields like `tool.destinations`. But, even in
            those cases, you can provide a custom function definition for
            advanced use cases.


            An example of an advanced use case is if you want to customize the
            message that's spoken for `endCall` tool. You can specify a function
            where it returns an argument "reason". Then, in `messages` array,
            you can have many "request-complete" messages. One of these messages
            will be triggered if the `messages[].conditions` matches the
            "reason" argument.
          allOf:
            - $ref: '#/components/schemas/OpenAIFunction'
      required:
        - type
        - id
        - orgId
        - createdAt
        - updatedAt
    BashTool:
      type: object
      properties:
        messages:
          type: array
          description: >-
            These are the messages that will be spoken to the user as the tool
            is running.


            For some tools, this is auto-filled based on special fields like
            `tool.destinations`. For others like the function tool, these can be
            custom configured.
          items:
            oneOf:
              - $ref: '#/components/schemas/ToolMessageStart'
                title: ToolMessageStart
              - $ref: '#/components/schemas/ToolMessageComplete'
                title: ToolMessageComplete
              - $ref: '#/components/schemas/ToolMessageFailed'
                title: ToolMessageFailed
              - $ref: '#/components/schemas/ToolMessageDelayed'
                title: ToolMessageDelayed
        type:
          type: string
          enum:
            - bash
          description: The type of tool. "bash" for Bash tool.
        subType:
          type: string
          enum:
            - bash_20241022
          description: The sub type of tool.
        server:
          description: |2-

              This is the server where a `tool-calls` webhook will be sent.

              Notes:
              - Webhook is sent to this server when a tool call is made.
              - Webhook contains the call, assistant, and phone number objects.
              - Webhook contains the variables set on the assistant.
              - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.
              - Webhook expects a response with tool call result.
          allOf:
            - $ref: '#/components/schemas/Server'
        id:
          type: string
          description: This is the unique identifier for the tool.
        orgId:
          type: string
          description: >-
            This is the unique identifier for the organization that this tool
            belongs to.
        createdAt:
          format: date-time
          type: string
          description: This is the ISO 8601 date-time string of when the tool was created.
        updatedAt:
          format: date-time
          type: string
          description: >-
            This is the ISO 8601 date-time string of when the tool was last
            updated.
        function:
          description: >-
            This is the function definition of the tool.


            For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled
            based on tool-specific fields like `tool.destinations`. But, even in
            those cases, you can provide a custom function definition for
            advanced use cases.


            An example of an advanced use case is if you want to customize the
            message that's spoken for `endCall` tool. You can specify a function
            where it returns an argument "reason". Then, in `messages` array,
            you can have many "request-complete" messages. One of these messages
            will be triggered if the `messages[].conditions` matches the
            "reason" argument.
          allOf:
            - $ref: '#/components/schemas/OpenAIFunction'
        name:
          type: string
          description: The name of the tool, fixed to 'bash'
          default: bash
          enum:
            - bash
      required:
        - type
        - subType
        - id
        - orgId
        - createdAt
        - updatedAt
        - name
    ComputerTool:
      type: object
      properties:
        messages:
          type: array
          description: >-
            These are the messages that will be spoken to the user as the tool
            is running.


            For some tools, this is auto-filled based on special fields like
            `tool.destinations`. For others like the function tool, these can be
            custom configured.
          items:
            oneOf:
              - $ref: '#/components/schemas/ToolMessageStart'
                title: ToolMessageStart
              - $ref: '#/components/schemas/ToolMessageComplete'
                title: ToolMessageComplete
              - $ref: '#/components/schemas/ToolMessageFailed'
                title: ToolMessageFailed
              - $ref: '#/components/schemas/ToolMessageDelayed'
                title: ToolMessageDelayed
        type:
          type: string
          enum:
            - computer
          description: The type of tool. "computer" for Computer tool.
        subType:
          type: string
          enum:
            - computer_20241022
          description: The sub type of tool.
        server:
          description: |2-

              This is the server where a `tool-calls` webhook will be sent.

              Notes:
              - Webhook is sent to this server when a tool call is made.
              - Webhook contains the call, assistant, and phone number objects.
              - Webhook contains the variables set on the assistant.
              - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.
              - Webhook expects a response with tool call result.
          allOf:
            - $ref: '#/components/schemas/Server'
        id:
          type: string
          description: This is the unique identifier for the tool.
        orgId:
          type: string
          description: >-
            This is the unique identifier for the organization that this tool
            belongs to.
        createdAt:
          format: date-time
          type: string
          description: This is the ISO 8601 date-time string of when the tool was created.
        updatedAt:
          format: date-time
          type: string
          description: >-
            This is the ISO 8601 date-time string of when the tool was last
            updated.
        function:
          description: >-
            This is the function definition of the tool.


            For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled
            based on tool-specific fields like `tool.destinations`. But, even in
            those cases, you can provide a custom function definition for
            advanced use cases.


            An example of an advanced use case is if you want to customize the
            message that's spoken for `endCall` tool. You can specify a function
            where it returns an argument "reason". Then, in `messages` array,
            you can have many "request-complete" messages. One of these messages
            will be triggered if the `messages[].conditions` matches the
            "reason" argument.
          allOf:
            - $ref: '#/components/schemas/OpenAIFunction'
        name:
          type: string
          description: The name of the tool, fixed to 'computer'
          default: computer
          enum:
            - computer
        displayWidthPx:
          type: number
          description: The display width in pixels
        displayHeightPx:
          type: number
          description: The display height in pixels
        displayNumber:
          type: number
          description: Optional display number
      required:
        - type
        - subType
        - id
        - orgId
        - createdAt
        - updatedAt
        - name
        - displayWidthPx
        - displayHeightPx
    TextEditorTool:
      type: object
      properties:
        messages:
          type: array
          description: >-
            These are the messages that will be spoken to the user as the tool
            is running.


            For some tools, this is auto-filled based on special fields like
            `tool.destinations`. For others like the function tool, these can be
            custom configured.
          items:
            oneOf:
              - $ref: '#/components/schemas/ToolMessageStart'
                title: ToolMessageStart
              - $ref: '#/components/schemas/ToolMessageComplete'
                title: ToolMessageComplete
              - $ref: '#/components/schemas/ToolMessageFailed'
                title: ToolMessageFailed
              - $ref: '#/components/schemas/ToolMessageDelayed'
                title: ToolMessageDelayed
        type:
          type: string
          enum:
            - textEditor
          description: The type of tool. "textEditor" for Text Editor tool.
        subType:
          type: string
          enum:
            - text_editor_20241022
          description: The sub type of tool.
        server:
          description: |2-

              This is the server where a `tool-calls` webhook will be sent.

              Notes:
              - Webhook is sent to this server when a tool call is made.
              - Webhook contains the call, assistant, and phone number objects.
              - Webhook contains the variables set on the assistant.
              - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.
              - Webhook expects a response with tool call result.
          allOf:
            - $ref: '#/components/schemas/Server'
        id:
          type: string
          description: This is the unique identifier for the tool.
        orgId:
          type: string
          description: >-
            This is the unique identifier for the organization that this tool
            belongs to.
        createdAt:
          format: date-time
          type: string
          description: This is the ISO 8601 date-time string of when the tool was created.
        updatedAt:
          format: date-time
          type: string
          description: >-
            This is the ISO 8601 date-time string of when the tool was last
            updated.
        function:
          description: >-
            This is the function definition of the tool.


            For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled
            based on tool-specific fields like `tool.destinations`. But, even in
            those cases, you can provide a custom function definition for
            advanced use cases.


            An example of an advanced use case is if you want to customize the
            message that's spoken for `endCall` tool. You can specify a function
            where it returns an argument "reason". Then, in `messages` array,
            you can have many "request-complete" messages. One of these messages
            will be triggered if the `messages[].conditions` matches the
            "reason" argument.
          allOf:
            - $ref: '#/components/schemas/OpenAIFunction'
        name:
          type: string
          description: The name of the tool, fixed to 'str_replace_editor'
          default: str_replace_editor
          enum:
            - str_replace_editor
      required:
        - type
        - subType
        - id
        - orgId
        - createdAt
        - updatedAt
        - name
    QueryTool:
      type: object
      properties:
        messages:
          type: array
          description: >-
            These are the messages that will be spoken to the user as the tool
            is running.


            For some tools, this is auto-filled based on special fields like
            `tool.destinations`. For others like the function tool, these can be
            custom configured.
          items:
            oneOf:
              - $ref: '#/components/schemas/ToolMessageStart'
                title: ToolMessageStart
              - $ref: '#/components/schemas/ToolMessageComplete'
                title: ToolMessageComplete
              - $ref: '#/components/schemas/ToolMessageFailed'
                title: ToolMessageFailed
              - $ref: '#/components/schemas/ToolMessageDelayed'
                title: ToolMessageDelayed
        type:
          type: string
          enum:
            - query
          description: The type of tool. "query" for Query tool.
        knowledgeBases:
          description: The knowledge bases to query
          type: array
          items:
            $ref: '#/components/schemas/KnowledgeBase'
        id:
          type: string
          description: This is the unique identifier for the tool.
        orgId:
          type: string
          description: >-
            This is the unique identifier for the organization that this tool
            belongs to.
        createdAt:
          format: date-time
          type: string
          description: This is the ISO 8601 date-time string of when the tool was created.
        updatedAt:
          format: date-time
          type: string
          description: >-
            This is the ISO 8601 date-time string of when the tool was last
            updated.
        function:
          description: >-
            This is the function definition of the tool.


            For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled
            based on tool-specific fields like `tool.destinations`. But, even in
            those cases, you can provide a custom function definition for
            advanced use cases.


            An example of an advanced use case is if you want to customize the
            message that's spoken for `endCall` tool. You can specify a function
            where it returns an argument "reason". Then, in `messages` array,
            you can have many "request-complete" messages. One of these messages
            will be triggered if the `messages[].conditions` matches the
            "reason" argument.
          allOf:
            - $ref: '#/components/schemas/OpenAIFunction'
      required:
        - type
        - id
        - orgId
        - createdAt
        - updatedAt
    GoogleCalendarCreateEventTool:
      type: object
      properties:
        messages:
          type: array
          description: >-
            These are the messages that will be spoken to the user as the tool
            is running.


            For some tools, this is auto-filled based on special fields like
            `tool.destinations`. For others like the function tool, these can be
            custom configured.
          items:
            oneOf:
              - $ref: '#/components/schemas/ToolMessageStart'
                title: ToolMessageStart
              - $ref: '#/components/schemas/ToolMessageComplete'
                title: ToolMessageComplete
              - $ref: '#/components/schemas/ToolMessageFailed'
                title: ToolMessageFailed
              - $ref: '#/components/schemas/ToolMessageDelayed'
                title: ToolMessageDelayed
        type:
          type: string
          enum:
            - google.calendar.event.create
          description: >-
            The type of tool. "google.calendar.event.create" for Google Calendar
            tool.
        id:
          type: string
          description: This is the unique identifier for the tool.
        orgId:
          type: string
          description: >-
            This is the unique identifier for the organization that this tool
            belongs to.
        createdAt:
          format: date-time
          type: string
          description: This is the ISO 8601 date-time string of when the tool was created.
        updatedAt:
          format: date-time
          type: string
          description: >-
            This is the ISO 8601 date-time string of when the tool was last
            updated.
        function:
          description: >-
            This is the function definition of the tool.


            For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled
            based on tool-specific fields like `tool.destinations`. But, even in
            those cases, you can provide a custom function definition for
            advanced use cases.


            An example of an advanced use case is if you want to customize the
            message that's spoken for `endCall` tool. You can specify a function
            where it returns an argument "reason". Then, in `messages` array,
            you can have many "request-complete" messages. One of these messages
            will be triggered if the `messages[].conditions` matches the
            "reason" argument.
          allOf:
            - $ref: '#/components/schemas/OpenAIFunction'
      required:
        - type
        - id
        - orgId
        - createdAt
        - updatedAt
    GoogleSheetsRowAppendTool:
      type: object
      properties:
        messages:
          type: array
          description: >-
            These are the messages that will be spoken to the user as the tool
            is running.


            For some tools, this is auto-filled based on special fields like
            `tool.destinations`. For others like the function tool, these can be
            custom configured.
          items:
            oneOf:
              - $ref: '#/components/schemas/ToolMessageStart'
                title: ToolMessageStart
              - $ref: '#/components/schemas/ToolMessageComplete'
                title: ToolMessageComplete
              - $ref: '#/components/schemas/ToolMessageFailed'
                title: ToolMessageFailed
              - $ref: '#/components/schemas/ToolMessageDelayed'
                title: ToolMessageDelayed
        type:
          type: string
          enum:
            - google.sheets.row.append
          description: The type of tool. "google.sheets.row.append" for Google Sheets tool.
        id:
          type: string
          description: This is the unique identifier for the tool.
        orgId:
          type: string
          description: >-
            This is the unique identifier for the organization that this tool
            belongs to.
        createdAt:
          format: date-time
          type: string
          description: This is the ISO 8601 date-time string of when the tool was created.
        updatedAt:
          format: date-time
          type: string
          description: >-
            This is the ISO 8601 date-time string of when the tool was last
            updated.
        function:
          description: >-
            This is the function definition of the tool.


            For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled
            based on tool-specific fields like `tool.destinations`. But, even in
            those cases, you can provide a custom function definition for
            advanced use cases.


            An example of an advanced use case is if you want to customize the
            message that's spoken for `endCall` tool. You can specify a function
            where it returns an argument "reason". Then, in `messages` array,
            you can have many "request-complete" messages. One of these messages
            will be triggered if the `messages[].conditions` matches the
            "reason" argument.
          allOf:
            - $ref: '#/components/schemas/OpenAIFunction'
      required:
        - type
        - id
        - orgId
        - createdAt
        - updatedAt
    GoogleCalendarCheckAvailabilityTool:
      type: object
      properties:
        messages:
          type: array
          description: >-
            These are the messages that will be spoken to the user as the tool
            is running.


            For some tools, this is auto-filled based on special fields like
            `tool.destinations`. For others like the function tool, these can be
            custom configured.
          items:
            oneOf:
              - $ref: '#/components/schemas/ToolMessageStart'
                title: ToolMessageStart
              - $ref: '#/components/schemas/ToolMessageComplete'
                title: ToolMessageComplete
              - $ref: '#/components/schemas/ToolMessageFailed'
                title: ToolMessageFailed
              - $ref: '#/components/schemas/ToolMessageDelayed'
                title: ToolMessageDelayed
        type:
          type: string
          enum:
            - google.calendar.availability.check
          description: >-
            The type of tool. "google.calendar.availability.check" for Google
            Calendar availability check tool.
        id:
          type: string
          description: This is the unique identifier for the tool.
        orgId:
          type: string
          description: >-
            This is the unique identifier for the organization that this tool
            belongs to.
        createdAt:
          format: date-time
          type: string
          description: This is the ISO 8601 date-time string of when the tool was created.
        updatedAt:
          format: date-time
          type: string
          description: >-
            This is the ISO 8601 date-time string of when the tool was last
            updated.
        function:
          description: >-
            This is the function definition of the tool.


            For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled
            based on tool-specific fields like `tool.destinations`. But, even in
            those cases, you can provide a custom function definition for
            advanced use cases.


            An example of an advanced use case is if you want to customize the
            message that's spoken for `endCall` tool. You can specify a function
            where it returns an argument "reason". Then, in `messages` array,
            you can have many "request-complete" messages. One of these messages
            will be triggered if the `messages[].conditions` matches the
            "reason" argument.
          allOf:
            - $ref: '#/components/schemas/OpenAIFunction'
      required:
        - type
        - id
        - orgId
        - createdAt
        - updatedAt
    SlackSendMessageTool:
      type: object
      properties:
        messages:
          type: array
          description: >-
            These are the messages that will be spoken to the user as the tool
            is running.


            For some tools, this is auto-filled based on special fields like
            `tool.destinations`. For others like the function tool, these can be
            custom configured.
          items:
            oneOf:
              - $ref: '#/components/schemas/ToolMessageStart'
                title: ToolMessageStart
              - $ref: '#/components/schemas/ToolMessageComplete'
                title: ToolMessageComplete
              - $ref: '#/components/schemas/ToolMessageFailed'
                title: ToolMessageFailed
              - $ref: '#/components/schemas/ToolMessageDelayed'
                title: ToolMessageDelayed
        type:
          type: string
          enum:
            - slack.message.send
          description: The type of tool. "slack.message.send" for Slack send message tool.
        id:
          type: string
          description: This is the unique identifier for the tool.
        orgId:
          type: string
          description: >-
            This is the unique identifier for the organization that this tool
            belongs to.
        createdAt:
          format: date-time
          type: string
          description: This is the ISO 8601 date-time string of when the tool was created.
        updatedAt:
          format: date-time
          type: string
          description: >-
            This is the ISO 8601 date-time string of when the tool was last
            updated.
        function:
          description: >-
            This is the function definition of the tool.


            For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled
            based on tool-specific fields like `tool.destinations`. But, even in
            those cases, you can provide a custom function definition for
            advanced use cases.


            An example of an advanced use case is if you want to customize the
            message that's spoken for `endCall` tool. You can specify a function
            where it returns an argument "reason". Then, in `messages` array,
            you can have many "request-complete" messages. One of these messages
            will be triggered if the `messages[].conditions` matches the
            "reason" argument.
          allOf:
            - $ref: '#/components/schemas/OpenAIFunction'
      required:
        - type
        - id
        - orgId
        - createdAt
        - updatedAt
    SmsTool:
      type: object
      properties:
        messages:
          type: array
          description: >-
            These are the messages that will be spoken to the user as the tool
            is running.


            For some tools, this is auto-filled based on special fields like
            `tool.destinations`. For others like the function tool, these can be
            custom configured.
          items:
            oneOf:
              - $ref: '#/components/schemas/ToolMessageStart'
                title: ToolMessageStart
              - $ref: '#/components/schemas/ToolMessageComplete'
                title: ToolMessageComplete
              - $ref: '#/components/schemas/ToolMessageFailed'
                title: ToolMessageFailed
              - $ref: '#/components/schemas/ToolMessageDelayed'
                title: ToolMessageDelayed
        type:
          type: string
          enum:
            - sms
          description: The type of tool. "sms" for Twilio SMS sending tool.
        id:
          type: string
          description: This is the unique identifier for the tool.
        orgId:
          type: string
          description: >-
            This is the unique identifier for the organization that this tool
            belongs to.
        createdAt:
          format: date-time
          type: string
          description: This is the ISO 8601 date-time string of when the tool was created.
        updatedAt:
          format: date-time
          type: string
          description: >-
            This is the ISO 8601 date-time string of when the tool was last
            updated.
        function:
          description: >-
            This is the function definition of the tool.


            For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled
            based on tool-specific fields like `tool.destinations`. But, even in
            those cases, you can provide a custom function definition for
            advanced use cases.


            An example of an advanced use case is if you want to customize the
            message that's spoken for `endCall` tool. You can specify a function
            where it returns an argument "reason". Then, in `messages` array,
            you can have many "request-complete" messages. One of these messages
            will be triggered if the `messages[].conditions` matches the
            "reason" argument.
          allOf:
            - $ref: '#/components/schemas/OpenAIFunction'
      required:
        - type
        - id
        - orgId
        - createdAt
        - updatedAt
    McpTool:
      type: object
      properties:
        messages:
          type: array
          description: >-
            These are the messages that will be spoken to the user as the tool
            is running.


            For some tools, this is auto-filled based on special fields like
            `tool.destinations`. For others like the function tool, these can be
            custom configured.
          items:
            oneOf:
              - $ref: '#/components/schemas/ToolMessageStart'
                title: ToolMessageStart
              - $ref: '#/components/schemas/ToolMessageComplete'
                title: ToolMessageComplete
              - $ref: '#/components/schemas/ToolMessageFailed'
                title: ToolMessageFailed
              - $ref: '#/components/schemas/ToolMessageDelayed'
                title: ToolMessageDelayed
        type:
          type: string
          enum:
            - mcp
          description: The type of tool. "mcp" for MCP tool.
        server:
          description: |2-

              This is the server where a `tool-calls` webhook will be sent.

              Notes:
              - Webhook is sent to this server when a tool call is made.
              - Webhook contains the call, assistant, and phone number objects.
              - Webhook contains the variables set on the assistant.
              - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.
              - Webhook expects a response with tool call result.
          allOf:
            - $ref: '#/components/schemas/Server'
        id:
          type: string
          description: This is the unique identifier for the tool.
        orgId:
          type: string
          description: >-
            This is the unique identifier for the organization that this tool
            belongs to.
        createdAt:
          format: date-time
          type: string
          description: This is the ISO 8601 date-time string of when the tool was created.
        updatedAt:
          format: date-time
          type: string
          description: >-
            This is the ISO 8601 date-time string of when the tool was last
            updated.
        function:
          description: >-
            This is the function definition of the tool.


            For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled
            based on tool-specific fields like `tool.destinations`. But, even in
            those cases, you can provide a custom function definition for
            advanced use cases.


            An example of an advanced use case is if you want to customize the
            message that's spoken for `endCall` tool. You can specify a function
            where it returns an argument "reason". Then, in `messages` array,
            you can have many "request-complete" messages. One of these messages
            will be triggered if the `messages[].conditions` matches the
            "reason" argument.
          allOf:
            - $ref: '#/components/schemas/OpenAIFunction'
        metadata:
          $ref: '#/components/schemas/McpToolMetadata'
      required:
        - type
        - id
        - orgId
        - createdAt
        - updatedAt
    GoHighLevelCalendarAvailabilityTool:
      type: object
      properties:
        messages:
          type: array
          description: >-
            These are the messages that will be spoken to the user as the tool
            is running.


            For some tools, this is auto-filled based on special fields like
            `tool.destinations`. For others like the function tool, these can be
            custom configured.
          items:
            oneOf:
              - $ref: '#/components/schemas/ToolMessageStart'
                title: ToolMessageStart
              - $ref: '#/components/schemas/ToolMessageComplete'
                title: ToolMessageComplete
              - $ref: '#/components/schemas/ToolMessageFailed'
                title: ToolMessageFailed
              - $ref: '#/components/schemas/ToolMessageDelayed'
                title: ToolMessageDelayed
        type:
          type: string
          enum:
            - gohighlevel.calendar.availability.check
          description: >-
            The type of tool. "gohighlevel.calendar.availability.check" for
            GoHighLevel Calendar availability check tool.
        id:
          type: string
          description: This is the unique identifier for the tool.
        orgId:
          type: string
          description: >-
            This is the unique identifier for the organization that this tool
            belongs to.
        createdAt:
          format: date-time
          type: string
          description: This is the ISO 8601 date-time string of when the tool was created.
        updatedAt:
          format: date-time
          type: string
          description: >-
            This is the ISO 8601 date-time string of when the tool was last
            updated.
        function:
          description: >-
            This is the function definition of the tool.


            For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled
            based on tool-specific fields like `tool.destinations`. But, even in
            those cases, you can provide a custom function definition for
            advanced use cases.


            An example of an advanced use case is if you want to customize the
            message that's spoken for `endCall` tool. You can specify a function
            where it returns an argument "reason". Then, in `messages` array,
            you can have many "request-complete" messages. One of these messages
            will be triggered if the `messages[].conditions` matches the
            "reason" argument.
          allOf:
            - $ref: '#/components/schemas/OpenAIFunction'
      required:
        - type
        - id
        - orgId
        - createdAt
        - updatedAt
    GoHighLevelCalendarEventCreateTool:
      type: object
      properties:
        messages:
          type: array
          description: >-
            These are the messages that will be spoken to the user as the tool
            is running.


            For some tools, this is auto-filled based on special fields like
            `tool.destinations`. For others like the function tool, these can be
            custom configured.
          items:
            oneOf:
              - $ref: '#/components/schemas/ToolMessageStart'
                title: ToolMessageStart
              - $ref: '#/components/schemas/ToolMessageComplete'
                title: ToolMessageComplete
              - $ref: '#/components/schemas/ToolMessageFailed'
                title: ToolMessageFailed
              - $ref: '#/components/schemas/ToolMessageDelayed'
                title: ToolMessageDelayed
        type:
          type: string
          enum:
            - gohighlevel.calendar.event.create
          description: >-
            The type of tool. "gohighlevel.calendar.event.create" for
            GoHighLevel Calendar event create tool.
        id:
          type: string
          description: This is the unique identifier for the tool.
        orgId:
          type: string
          description: >-
            This is the unique identifier for the organization that this tool
            belongs to.
        createdAt:
          format: date-time
          type: string
          description: This is the ISO 8601 date-time string of when the tool was created.
        updatedAt:
          format: date-time
          type: string
          description: >-
            This is the ISO 8601 date-time string of when the tool was last
            updated.
        function:
          description: >-
            This is the function definition of the tool.


            For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled
            based on tool-specific fields like `tool.destinations`. But, even in
            those cases, you can provide a custom function definition for
            advanced use cases.


            An example of an advanced use case is if you want to customize the
            message that's spoken for `endCall` tool. You can specify a function
            where it returns an argument "reason". Then, in `messages` array,
            you can have many "request-complete" messages. One of these messages
            will be triggered if the `messages[].conditions` matches the
            "reason" argument.
          allOf:
            - $ref: '#/components/schemas/OpenAIFunction'
      required:
        - type
        - id
        - orgId
        - createdAt
        - updatedAt
    GoHighLevelContactCreateTool:
      type: object
      properties:
        messages:
          type: array
          description: >-
            These are the messages that will be spoken to the user as the tool
            is running.


            For some tools, this is auto-filled based on special fields like
            `tool.destinations`. For others like the function tool, these can be
            custom configured.
          items:
            oneOf:
              - $ref: '#/components/schemas/ToolMessageStart'
                title: ToolMessageStart
              - $ref: '#/components/schemas/ToolMessageComplete'
                title: ToolMessageComplete
              - $ref: '#/components/schemas/ToolMessageFailed'
                title: ToolMessageFailed
              - $ref: '#/components/schemas/ToolMessageDelayed'
                title: ToolMessageDelayed
        type:
          type: string
          enum:
            - gohighlevel.contact.create
          description: >-
            The type of tool. "gohighlevel.contact.create" for GoHighLevel
            contact create tool.
        id:
          type: string
          description: This is the unique identifier for the tool.
        orgId:
          type: string
          description: >-
            This is the unique identifier for the organization that this tool
            belongs to.
        createdAt:
          format: date-time
          type: string
          description: This is the ISO 8601 date-time string of when the tool was created.
        updatedAt:
          format: date-time
          type: string
          description: >-
            This is the ISO 8601 date-time string of when the tool was last
            updated.
        function:
          description: >-
            This is the function definition of the tool.


            For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled
            based on tool-specific fields like `tool.destinations`. But, even in
            those cases, you can provide a custom function definition for
            advanced use cases.


            An example of an advanced use case is if you want to customize the
            message that's spoken for `endCall` tool. You can specify a function
            where it returns an argument "reason". Then, in `messages` array,
            you can have many "request-complete" messages. One of these messages
            will be triggered if the `messages[].conditions` matches the
            "reason" argument.
          allOf:
            - $ref: '#/components/schemas/OpenAIFunction'
      required:
        - type
        - id
        - orgId
        - createdAt
        - updatedAt
    GoHighLevelContactGetTool:
      type: object
      properties:
        messages:
          type: array
          description: >-
            These are the messages that will be spoken to the user as the tool
            is running.


            For some tools, this is auto-filled based on special fields like
            `tool.destinations`. For others like the function tool, these can be
            custom configured.
          items:
            oneOf:
              - $ref: '#/components/schemas/ToolMessageStart'
                title: ToolMessageStart
              - $ref: '#/components/schemas/ToolMessageComplete'
                title: ToolMessageComplete
              - $ref: '#/components/schemas/ToolMessageFailed'
                title: ToolMessageFailed
              - $ref: '#/components/schemas/ToolMessageDelayed'
                title: ToolMessageDelayed
        type:
          type: string
          enum:
            - gohighlevel.contact.get
          description: >-
            The type of tool. "gohighlevel.contact.get" for GoHighLevel contact
            get tool.
        id:
          type: string
          description: This is the unique identifier for the tool.
        orgId:
          type: string
          description: >-
            This is the unique identifier for the organization that this tool
            belongs to.
        createdAt:
          format: date-time
          type: string
          description: This is the ISO 8601 date-time string of when the tool was created.
        updatedAt:
          format: date-time
          type: string
          description: >-
            This is the ISO 8601 date-time string of when the tool was last
            updated.
        function:
          description: >-
            This is the function definition of the tool.


            For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled
            based on tool-specific fields like `tool.destinations`. But, even in
            those cases, you can provide a custom function definition for
            advanced use cases.


            An example of an advanced use case is if you want to customize the
            message that's spoken for `endCall` tool. You can specify a function
            where it returns an argument "reason". Then, in `messages` array,
            you can have many "request-complete" messages. One of these messages
            will be triggered if the `messages[].conditions` matches the
            "reason" argument.
          allOf:
            - $ref: '#/components/schemas/OpenAIFunction'
      required:
        - type
        - id
        - orgId
        - createdAt
        - updatedAt
    ToolMessageStart:
      type: object
      properties:
        contents:
          type: array
          description: >-
            This is an alternative to the `content` property. It allows to
            specify variants of the same content, one per language.


            Usage:

            - If your assistants are multilingual, you can provide content for
            each language.

            - If you don't provide content for a language, the first item in the
            array will be automatically translated to the active language at
            that moment.


            This will override the `content` property.
          items:
            oneOf:
              - $ref: '#/components/schemas/TextContent'
                title: Text
        type:
          type: string
          enum:
            - request-start
          description: >-
            This message is triggered when the tool call starts.


            This message is never triggered for async tools.


            If this message is not provided, one of the default filler messages
            "Hold on a sec", "One moment", "Just a sec", "Give me a moment" or
            "This'll just take a sec" will be used.
        blocking:
          type: boolean
          description: >-
            This is an optional boolean that if true, the tool call will only
            trigger after the message is spoken. Default is false.


            @default false
          example: false
          default: false
        content:
          type: string
          description: >-
            This is the content that the assistant says when this message is
            triggered.
          maxLength: 1000
        conditions:
          description: >-
            This is an optional array of conditions that the tool call arguments
            must meet in order for this message to be triggered.
          type: array
          items:
            $ref: '#/components/schemas/Condition'
      required:
        - type
    ToolMessageComplete:
      type: object
      properties:
        contents:
          type: array
          description: >-
            This is an alternative to the `content` property. It allows to
            specify variants of the same content, one per language.


            Usage:

            - If your assistants are multilingual, you can provide content for
            each language.

            - If you don't provide content for a language, the first item in the
            array will be automatically translated to the active language at
            that moment.


            This will override the `content` property.
          items:
            oneOf:
              - $ref: '#/components/schemas/TextContent'
                title: Text
        type:
          type: string
          description: >-
            This message is triggered when the tool call is complete.


            This message is triggered immediately without waiting for your
            server to respond for async tool calls.


            If this message is not provided, the model will be requested to
            respond.


            If this message is provided, only this message will be spoken and
            the model will not be requested to come up with a response. It's an
            exclusive OR.
          enum:
            - request-complete
        role:
          type: string
          description: >-
            This is optional and defaults to "assistant".


            When role=assistant, `content` is said out loud.


            When role=system, `content` is passed to the model in a system
            message. Example:
                system: default one
                assistant:
                user:
                assistant:
                user:
                assistant:
                user:
                assistant: tool called
                tool: your server response
                <--- system prompt as hint
                ---> model generates response which is spoken
            This is useful when you want to provide a hint to the model about
            what to say next.
          enum:
            - assistant
            - system
        endCallAfterSpokenEnabled:
          type: boolean
          description: >-
            This is an optional boolean that if true, the call will end after
            the message is spoken. Default is false.


            This is ignored if `role` is set to `system`.


            @default false
          example: false
        content:
          type: string
          description: >-
            This is the content that the assistant says when this message is
            triggered.
          maxLength: 1000
        conditions:
          description: >-
            This is an optional array of conditions that the tool call arguments
            must meet in order for this message to be triggered.
          type: array
          items:
            $ref: '#/components/schemas/Condition'
      required:
        - type
    ToolMessageFailed:
      type: object
      properties:
        contents:
          type: array
          description: >-
            This is an alternative to the `content` property. It allows to
            specify variants of the same content, one per language.


            Usage:

            - If your assistants are multilingual, you can provide content for
            each language.

            - If you don't provide content for a language, the first item in the
            array will be automatically translated to the active language at
            that moment.


            This will override the `content` property.
          items:
            oneOf:
              - $ref: '#/components/schemas/TextContent'
                title: Text
        type:
          type: string
          description: >-
            This message is triggered when the tool call fails.


            This message is never triggered for async tool calls.


            If this message is not provided, the model will be requested to
            respond.


            If this message is provided, only this message will be spoken and
            the model will not be requested to come up with a response. It's an
            exclusive OR.
          enum:
            - request-failed
        endCallAfterSpokenEnabled:
          type: boolean
          description: >-
            This is an optional boolean that if true, the call will end after
            the message is spoken. Default is false.


            @default false
          example: false
        content:
          type: string
          description: >-
            This is the content that the assistant says when this message is
            triggered.
          maxLength: 1000
        conditions:
          description: >-
            This is an optional array of conditions that the tool call arguments
            must meet in order for this message to be triggered.
          type: array
          items:
            $ref: '#/components/schemas/Condition'
      required:
        - type
    ToolMessageDelayed:
      type: object
      properties:
        contents:
          type: array
          description: >-
            This is an alternative to the `content` property. It allows to
            specify variants of the same content, one per language.


            Usage:

            - If your assistants are multilingual, you can provide content for
            each language.

            - If you don't provide content for a language, the first item in the
            array will be automatically translated to the active language at
            that moment.


            This will override the `content` property.
          items:
            oneOf:
              - $ref: '#/components/schemas/TextContent'
                title: Text
        type:
          type: string
          description: >-
            This message is triggered when the tool call is delayed.


            There are the two things that can trigger this message:

            1. The user talks with the assistant while your server is processing
            the request. Default is "Sorry, a few more seconds."

            2. The server doesn't respond within `timingMilliseconds`.


            This message is never triggered for async tool calls.
          enum:
            - request-response-delayed
        timingMilliseconds:
          type: number
          minimum: 100
          maximum: 120000
          example: 1000
          description: >-
            The number of milliseconds to wait for the server response before
            saying this message.
        content:
          type: string
          description: >-
            This is the content that the assistant says when this message is
            triggered.
          maxLength: 1000
        conditions:
          description: >-
            This is an optional array of conditions that the tool call arguments
            must meet in order for this message to be triggered.
          type: array
          items:
            $ref: '#/components/schemas/Condition'
      required:
        - type
    OpenAIFunction:
      type: object
      properties:
        strict:
          type: boolean
          description: >-
            This is a boolean that controls whether to enable strict schema
            adherence when generating the function call. If set to true, the
            model will follow the exact schema defined in the parameters field.
            Only a subset of JSON Schema is supported when strict is true. Learn
            more about Structured Outputs in the [OpenAI
            guide](https://openai.com/index/introducing-structured-outputs-in-the-api/).


            @default false
          default: false
        name:
          type: string
          description: >-
            This is the the name of the function to be called.


            Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a
            maximum length of 64.
          maxLength: 64
          pattern: /^[a-zA-Z0-9_-]{1,64}$/
        description:
          type: string
          description: >-
            This is the description of what the function does, used by the AI to
            choose when and how to call the function.
          maxLength: 1000
        parameters:
          description: >-
            These are the parameters the functions accepts, described as a JSON
            Schema object.


            See the [OpenAI
            guide](https://platform.openai.com/docs/guides/function-calling) for
            examples, and the [JSON Schema
            reference](https://json-schema.org/understanding-json-schema) for
            documentation about the format.


            Omitting parameters defines a function with an empty parameter list.
          allOf:
            - $ref: '#/components/schemas/OpenAIFunctionParameters'
      required:
        - name
    JsonSchema:
      type: object
      properties:
        type:
          type: string
          description: >-
            This is the type of output you'd like.


            `string`, `number`, `integer`, `boolean` are the primitive types and
            should be obvious.


            `array` and `object` are more interesting and quite powerful. They
            allow you to define nested structures.


            For `array`, you can define the schema of the items in the array
            using the `items` property.


            For `object`, you can define the properties of the object using the
            `properties` property.
          enum:
            - string
            - number
            - integer
            - boolean
            - array
            - object
        items:
          type: object
          description: >-
            This is required if the type is "array". This is the schema of the
            items in the array.


            This is of type JsonSchema. However, Swagger doesn't support
            circular references.
        properties:
          type: object
          description: >-
            This is required if the type is "object". This specifies the
            properties of the object.


            This is a map of string to JsonSchema. However, Swagger doesn't
            support circular references.
        description:
          type: string
          description: >-
            This is the description to help the model understand what it needs
            to output.
        pattern:
          type: string
          description: >-
            This is the pattern of the string. This is a regex that will be used
            to validate the data in question. To use a common format, use the
            `format` property instead.


            OpenAI documentation:
            https://platform.openai.com/docs/guides/structured-outputs#supported-properties
        format:
          type: string
          description: >-
            This is the format of the string. To pass a regex, use the `pattern`
            property instead.


            OpenAI documentation:
            https://platform.openai.com/docs/guides/structured-outputs?api-mode=chat&type-restrictions=string-restrictions
          enum:
            - date-time
            - time
            - date
            - duration
            - email
            - hostname
            - ipv4
            - ipv6
            - uuid
        required:
          description: |-
            This is a list of properties that are required.

            This only makes sense if the type is "object".
          type: array
          items:
            type: string
        enum:
          description: >-
            This array specifies the allowed values that can be used to restrict
            the output of the model.
          type: array
          items:
            type: string
        title:
          type: string
          description: This is the title of the schema.
      required:
        - type
    BackoffPlan:
      type: object
      properties:
        type:
          type: object
          description: |-
            This is the type of backoff plan to use. Defaults to fixed.

            @default fixed
          enum:
            - fixed
            - exponential
          example: fixed
        maxRetries:
          type: number
          description: >-
            This is the maximum number of retries to attempt if the request
            fails. Defaults to 0 (no retries).


            @default 0
          minimum: 0
          maximum: 10
          example: 0
        baseDelaySeconds:
          type: number
          description: >-
            This is the base delay in seconds. For linear backoff, this is the
            delay between each retry. For exponential backoff, this is the
            initial delay.
          minimum: 0
          maximum: 10
          example: 1
      required:
        - type
        - maxRetries
        - baseDelaySeconds
    VariableExtractionPlan:
      type: object
      properties:
        schema:
          description: >-
            This is the schema to extract.


            Examples:

            1. To extract object properties, you can use the following schema:

            ```json

            {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "age": {
                  "type": "number"
                }
              }
            }

            ```


            These will be extracted as `{{ name }}` and `{{ age }}`
            respectively. To emphasize, object properties are extracted as
            direct global variables.


            2. To extract nested properties, you can use the following schema:

            ```json

            {
              "type": "object",
              "properties": {
                "name": {
                  "type": "object",
                  "properties": {
                    "first": {
                      "type": "string"
                    },
                    "last": {
                      "type": "string"
                    }
                  }
                }
              }
            }

            ```


            These will be extracted as `{{ name }}`. And, `{{ name.first }}` and
            `{{ name.last }}` will be accessible.


            3. To extract array items, you can use the following schema:

            ```json

            {
              "type": "array",
              "title": "zipCodes",
              "items": {
                "type": "string"
              }
            }

            ```


            This will be extracted as `{{ zipCodes }}`. To access the array
            items, you can use `{{ zipCodes[0] }}` and `{{ zipCodes[1] }}`.


            4. To extract array of objects, you can use the following schema:


            ```json

            {
              "type": "array",
              "name": "people",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "age": {
                    "type": "number"
                  },
                  "zipCodes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }

            ```


            This will be extracted as `{{ people }}`. To access the array items,
            you can use `{{ people[n].name }}`, `{{ people[n].age }}`, `{{
            people[n].zipCodes }}`, `{{ people[n].zipCodes[0] }}` and `{{
            people[n].zipCodes[1] }}`.
          allOf:
            - $ref: '#/components/schemas/JsonSchema'
        aliases:
          description: >-
            These are additional variables to create.


            These will be accessible during the call as `{{key}}` and stored in
            `call.artifact.variableValues` after the call.


            Example:

            ```json

            {
              "aliases": [
                {
                  "key": "customerName",
                  "value": "{{name}}"
                },
                {
                  "key": "fullName",
                  "value": "{{firstName}} {{lastName}}"
                },
                {
                  "key": "greeting",
                  "value": "Hello {{name}}, welcome to {{company}}!"
                },
                {
                  "key": "customerEmail",
                  "value": "{{addresses[0].city}}"
                },
                {
                  "key": "something",
                  "value": "{{any liquid}}"
                }
              ]
            }

            ```


            This will create variables `customerName`, `fullName`,
            `customerEmail`, `greeting`, and `something`. To access these
            variables, you can reference them as `{{customerName}}`,
            `{{fullName}}`, `{{customerEmail}}`, `{{greeting}}`, and
            `{{something}}`.
          type: array
          items:
            $ref: '#/components/schemas/VariableExtractionAlias'
    Server:
      type: object
      properties:
        timeoutSeconds:
          type: number
          description: >-
            This is the timeout in seconds for the request. Defaults to 20
            seconds.


            @default 20
          minimum: 1
          maximum: 300
          example: 20
        url:
          type: string
          description: This is where the request will be sent.
        headers:
          type: object
          description: |-
            These are the headers to include in the request.

            Each key-value pair represents a header name and its value.
        backoffPlan:
          description: >-
            This is the backoff plan if the request fails. Defaults to undefined
            (the request will not be retried).


            @default undefined (the request will not be retried)
          allOf:
            - $ref: '#/components/schemas/BackoffPlan'
    GhlToolMetadata:
      type: object
      properties:
        workflowId:
          type: string
        locationId:
          type: string
    MakeToolMetadata:
      type: object
      properties:
        scenarioId:
          type: number
        triggerHookId:
          type: number
    TransferDestinationAssistant:
      type: object
      properties:
        message:
          description: >-
            This is spoken to the customer before connecting them to the
            destination.


            Usage:

            - If this is not provided and transfer tool messages is not
            provided, default is "Transferring the call now".

            - If set to "", nothing is spoken. This is useful when you want to
            silently transfer. This is especially useful when transferring
            between assistants in a squad. In this scenario, you likely also
            want to set
            `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message`
            for the destination assistant.


            This accepts a string or a ToolMessageStart class. Latter is useful
            if you want to specify multiple messages for different languages
            through the `contents` field.
          oneOf:
            - type: string
            - $ref: '#/components/schemas/CustomMessage'
        type:
          type: string
          enum:
            - assistant
        transferMode:
          type: string
          description: >-
            This is the mode to use for the transfer. Defaults to
            `rolling-history`.


            - `rolling-history`: This is the default mode. It keeps the entire
            conversation history and appends the new assistant's system message
            on transfer.

              Example:

              Pre-transfer:
                system: assistant1 system message
                assistant: assistant1 first message
                user: hey, good morning
                assistant: how can i help?
                user: i need help with my account
                assistant: (destination.message)

              Post-transfer:
                system: assistant1 system message
                assistant: assistant1 first message
                user: hey, good morning
                assistant: how can i help?
                user: i need help with my account
                assistant: (destination.message)
                system: assistant2 system message
                assistant: assistant2 first message (or model generated if firstMessageMode is set to `assistant-speaks-first-with-model-generated-message`)

            - `swap-system-message-in-history`: This replaces the original
            system message with the new assistant's system message on transfer.

              Example:

              Pre-transfer:
                system: assistant1 system message
                assistant: assistant1 first message
                user: hey, good morning
                assistant: how can i help?
                user: i need help with my account
                assistant: (destination.message)

              Post-transfer:
                system: assistant2 system message
                assistant: assistant1 first message
                user: hey, good morning
                assistant: how can i help?
                user: i need help with my account
                assistant: (destination.message)
                assistant: assistant2 first message (or model generated if firstMessageMode is set to `assistant-speaks-first-with-model-generated-message`)

            - `delete-history`: This deletes the entire conversation history on
            transfer.

              Example:

              Pre-transfer:
                system: assistant1 system message
                assistant: assistant1 first message
                user: hey, good morning
                assistant: how can i help?
                user: i need help with my account
                assistant: (destination.message)

              Post-transfer:
                system: assistant2 system message
                assistant: assistant2 first message
                user: Yes, please
                assistant: how can i help?
                user: i need help with my account

            -
            `swap-system-message-in-history-and-remove-transfer-tool-messages`:
            This replaces the original system message with the new assistant's
            system message on transfer and removes transfer tool messages from
            conversation history sent to the LLM.

              Example:

              Pre-transfer:
                system: assistant1 system message
                assistant: assistant1 first message
                user: hey, good morning
                assistant: how can i help?
                user: i need help with my account
                transfer-tool
                transfer-tool-result
                assistant: (destination.message)

              Post-transfer:
                system: assistant2 system message
                assistant: assistant1 first message
                user: hey, good morning
                assistant: how can i help?
                user: i need help with my account
                assistant: (destination.message)
                assistant: assistant2 first message (or model generated if firstMessageMode is set to `assistant-speaks-first-with-model-generated-message`)

            @default 'rolling-history'
          enum:
            - rolling-history
            - swap-system-message-in-history
            - swap-system-message-in-history-and-remove-transfer-tool-messages
            - delete-history
        assistantName:
          type: string
          description: This is the assistant to transfer the call to.
        description:
          type: string
          description: >-
            This is the description of the destination, used by the AI to choose
            when and how to transfer the call.
      required:
        - type
        - assistantName
    TransferDestinationNumber:
      type: object
      properties:
        message:
          description: >-
            This is spoken to the customer before connecting them to the
            destination.


            Usage:

            - If this is not provided and transfer tool messages is not
            provided, default is "Transferring the call now".

            - If set to "", nothing is spoken. This is useful when you want to
            silently transfer. This is especially useful when transferring
            between assistants in a squad. In this scenario, you likely also
            want to set
            `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message`
            for the destination assistant.


            This accepts a string or a ToolMessageStart class. Latter is useful
            if you want to specify multiple messages for different languages
            through the `contents` field.
          oneOf:
            - type: string
            - $ref: '#/components/schemas/CustomMessage'
        type:
          type: string
          enum:
            - number
        numberE164CheckEnabled:
          type: boolean
          description: >-
            This is the flag to toggle the E164 check for the `number` field.
            This is an advanced property which should be used if you know your
            use case requires it.


            Use cases:

            - `false`: To allow non-E164 numbers like `+001234567890`, `1234`,
            or `abc`. This is useful for dialing out to non-E164 numbers on your
            SIP trunks.

            - `true` (default): To allow only E164 numbers like `+14155551234`.
            This is standard for PSTN calls.


            If `false`, the `number` is still required to only contain
            alphanumeric characters (regex: `/^\+?[a-zA-Z0-9]+$/`).


            @default true (E164 check is enabled)
          default: true
        number:
          type: string
          description: This is the phone number to transfer the call to.
          minLength: 3
          maxLength: 40
        extension:
          type: string
          description: >-
            This is the extension to dial after transferring the call to the
            `number`.
          minLength: 1
          maxLength: 10
        callerId:
          type: string
          description: >-
            This is the caller ID to use when transferring the call to the
            `number`.


            Usage:

            - If not provided, the caller ID will be the number the call is
            coming from. Example, +14151111111 calls in to and the assistant
            transfers out to +16470000000. +16470000000 will see +14151111111 as
            the caller.

            - To change this behavior, provide a `callerId`.

            - Set to '{{customer.number}}' to always use the customer's number
            as the caller ID.

            - Set to '{{phoneNumber.number}}' to always use the phone number of
            the assistant as the caller ID.

            - Set to any E164 number to always use that number as the caller ID.
            This needs to be a number that is owned or verified by your
            Transport provider like Twilio.


            For Twilio, you can read up more here:
            https://www.twilio.com/docs/voice/twiml/dial#callerid
          maxLength: 40
        transferPlan:
          description: >-
            This configures how transfer is executed and the experience of the
            destination party receiving the call. Defaults to `blind-transfer`.


            @default `transferPlan.mode='blind-transfer'`
          allOf:
            - $ref: '#/components/schemas/TransferPlan'
        description:
          type: string
          description: >-
            This is the description of the destination, used by the AI to choose
            when and how to transfer the call.
      required:
        - type
        - number
    TransferDestinationSip:
      type: object
      properties:
        message:
          description: >-
            This is spoken to the customer before connecting them to the
            destination.


            Usage:

            - If this is not provided and transfer tool messages is not
            provided, default is "Transferring the call now".

            - If set to "", nothing is spoken. This is useful when you want to
            silently transfer. This is especially useful when transferring
            between assistants in a squad. In this scenario, you likely also
            want to set
            `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message`
            for the destination assistant.


            This accepts a string or a ToolMessageStart class. Latter is useful
            if you want to specify multiple messages for different languages
            through the `contents` field.
          oneOf:
            - type: string
            - $ref: '#/components/schemas/CustomMessage'
        type:
          type: string
          enum:
            - sip
        sipUri:
          type: string
          description: This is the SIP URI to transfer the call to.
        transferPlan:
          description: >-
            This configures how transfer is executed and the experience of the
            destination party receiving the call. Defaults to `blind-transfer`.


            @default `transferPlan.mode='blind-transfer'`
          allOf:
            - $ref: '#/components/schemas/TransferPlan'
        sipHeaders:
          type: object
          description: >-
            These are custom headers to be added to SIP refer during transfer
            call.
        description:
          type: string
          description: >-
            This is the description of the destination, used by the AI to choose
            when and how to transfer the call.
      required:
        - type
        - sipUri
    KnowledgeBase:
      type: object
      properties:
        name:
          type: string
          description: The name of the knowledge base
          example: My Knowledge Base
        provider:
          type: string
          description: The provider of the knowledge base
          enum:
            - google
          example: google
        model:
          type: string
          description: The model to use for the knowledge base
          enum:
            - gemini-2.5-pro
            - gemini-2.5-flash
            - gemini-2.5-flash-lite
            - gemini-2.5-pro-preview-05-06
            - gemini-2.5-flash-preview-05-20
            - gemini-2.5-flash-preview-04-17
            - gemini-2.0-flash-thinking-exp
            - gemini-2.0-pro-exp-02-05
            - gemini-2.0-flash
            - gemini-2.0-flash-lite
            - gemini-2.0-flash-lite-preview-02-05
            - gemini-2.0-flash-exp
            - gemini-2.0-flash-realtime-exp
            - gemini-1.5-flash
            - gemini-1.5-flash-002
            - gemini-1.5-pro
            - gemini-1.5-pro-002
            - gemini-1.0-pro
        description:
          type: string
          description: A description of the knowledge base
        fileIds:
          description: The file IDs associated with this knowledge base
          type: array
          items:
            type: string
      required:
        - name
        - provider
        - description
        - fileIds
    McpToolMetadata:
      type: object
      properties:
        protocol:
          type: string
          enum:
            - sse
            - shttp
          description: >-
            This is the protocol used for MCP communication. Defaults to
            Streamable HTTP.
    TextContent:
      type: object
      properties:
        type:
          type: string
          enum:
            - text
        text:
          type: string
        language:
          type: string
          enum:
            - aa
            - ab
            - ae
            - af
            - ak
            - am
            - an
            - ar
            - as
            - av
            - ay
            - az
            - ba
            - be
            - bg
            - bh
            - bi
            - bm
            - bn
            - bo
            - br
            - bs
            - ca
            - ce
            - ch
            - co
            - cr
            - cs
            - cu
            - cv
            - cy
            - da
            - de
            - dv
            - dz
            - ee
            - el
            - en
            - eo
            - es
            - et
            - eu
            - fa
            - ff
            - fi
            - fj
            - fo
            - fr
            - fy
            - ga
            - gd
            - gl
            - gn
            - gu
            - gv
            - ha
            - he
            - hi
            - ho
            - hr
            - ht
            - hu
            - hy
            - hz
            - ia
            - id
            - ie
            - ig
            - ii
            - ik
            - io
            - is
            - it
            - iu
            - ja
            - jv
            - ka
            - kg
            - ki
            - kj
            - kk
            - kl
            - km
            - kn
            - ko
            - kr
            - ks
            - ku
            - kv
            - kw
            - ky
            - la
            - lb
            - lg
            - li
            - ln
            - lo
            - lt
            - lu
            - lv
            - mg
            - mh
            - mi
            - mk
            - ml
            - mn
            - mr
            - ms
            - mt
            - my
            - na
            - nb
            - nd
            - ne
            - ng
            - nl
            - nn
            - 'no'
            - nr
            - nv
            - ny
            - oc
            - oj
            - om
            - or
            - os
            - pa
            - pi
            - pl
            - ps
            - pt
            - qu
            - rm
            - rn
            - ro
            - ru
            - rw
            - sa
            - sc
            - sd
            - se
            - sg
            - si
            - sk
            - sl
            - sm
            - sn
            - so
            - sq
            - sr
            - ss
            - st
            - su
            - sv
            - sw
            - ta
            - te
            - tg
            - th
            - ti
            - tk
            - tl
            - tn
            - to
            - tr
            - ts
            - tt
            - tw
            - ty
            - ug
            - uk
            - ur
            - uz
            - ve
            - vi
            - vo
            - wa
            - wo
            - xh
            - yi
            - yue
            - yo
            - za
            - zh
            - zu
      required:
        - type
        - text
        - language
    Condition:
      type: object
      properties:
        operator:
          type: string
          description: >-
            This is the operator you want to use to compare the parameter and
            value.
          enum:
            - eq
            - neq
            - gt
            - gte
            - lt
            - lte
        param:
          type: string
          description: This is the name of the parameter that you want to check.
          maxLength: 1000
        value:
          type: string
          description: This is the value you want to compare against the parameter.
          maxLength: 1000
      required:
        - operator
        - param
        - value
    OpenAIFunctionParameters:
      type: object
      properties:
        type:
          type: string
          description: >-
            This must be set to 'object'. It instructs the model to return a
            JSON object containing the function call properties.
          enum:
            - object
        properties:
          type: object
          description: >-
            This provides a description of the properties required by the
            function.

            JSON Schema can be used to specify expectations for each property.

            Refer to [this
            doc](https://ajv.js.org/json-schema.html#json-data-type) for a
            comprehensive guide on JSON Schema.
          additionalProperties:
            $ref: '#/components/schemas/JsonSchema'
        required:
          description: This specifies the properties that are required by the function.
          type: array
          items:
            type: string
      required:
        - type
        - properties
    VariableExtractionAlias:
      type: object
      properties:
        key:
          type: string
          description: >-
            This is the key of the variable.


            This variable will be accessible during the call as `{{key}}` and
            stored in `call.artifact.variableValues` after the call.


            Rules:

            - Must start with a letter (a-z, A-Z).

            - Subsequent characters can be letters, numbers, or underscores.

            - Minimum length of 1 and maximum length of 40.
          minLength: 1
          maxLength: 40
          pattern: /^[a-zA-Z][a-zA-Z0-9_]*$/
        value:
          type: string
          description: >-
            This is the value of the variable.


            This can reference existing variables, use filters, and perform
            transformations.


            Examples: "{{name}}", "{{customer.email}}", "Hello {{name |
            upcase}}"
          maxLength: 10000
      required:
        - key
        - value
    CustomMessage:
      type: object
      properties:
        contents:
          type: array
          description: >-
            This is an alternative to the `content` property. It allows to
            specify variants of the same content, one per language.


            Usage:

            - If your assistants are multilingual, you can provide content for
            each language.

            - If you don't provide content for a language, the first item in the
            array will be automatically translated to the active language at
            that moment.


            This will override the `content` property.
          items:
            oneOf:
              - $ref: '#/components/schemas/TextContent'
                title: Text
        type:
          type: string
          description: This is a custom message.
          enum:
            - custom-message
        content:
          type: string
          description: >-
            This is the content that the assistant will say when this message is
            triggered.
          maxLength: 1000
      required:
        - type
    TransferPlan:
      type: object
      properties:
        mode:
          type: string
          description: >-
            This configures how transfer is executed and the experience of the
            destination party receiving the call.


            Usage:

            - `blind-transfer`: The assistant forwards the call to the
            destination without any message or summary.

            - `blind-transfer-add-summary-to-sip-header`: The assistant forwards
            the call to the destination and adds a SIP header X-Transfer-Summary
            to the call to include the summary.

            - `warm-transfer-say-message`: The assistant dials the destination,
            delivers the `message` to the destination party, connects the
            customer, and leaves the call.

            - `warm-transfer-say-summary`: The assistant dials the destination,
            provides a summary of the call to the destination party, connects
            the customer, and leaves the call.

            -
            `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`:
            The assistant dials the destination, waits for the operator to
            speak, delivers the `message` to the destination party, and then
            connects the customer.

            -
            `warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary`:
            The assistant dials the destination, waits for the operator to
            speak, provides a summary of the call to the destination party, and
            then connects the customer.

            - `warm-transfer-twiml`: The assistant dials the destination,
            executes the twiml instructions on the destination call leg,
            connects the customer, and leaves the call.

            - `warm-transfer-experimental`: The assistant puts the customer on
            hold, dials the destination, and if the destination answers (and is
            human), delivers a message or summary before connecting the
            customer. If the destination is unreachable or not human (e.g., with
            voicemail detection), the assistant delivers the `fallbackMessage`
            to the customer and optionally ends the call.


            @default 'blind-transfer'
          enum:
            - blind-transfer
            - blind-transfer-add-summary-to-sip-header
            - warm-transfer-say-message
            - warm-transfer-say-summary
            - warm-transfer-twiml
            - >-
              warm-transfer-wait-for-operator-to-speak-first-and-then-say-message
            - >-
              warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary
            - warm-transfer-experimental
        message:
          description: >-
            This is the message the assistant will deliver to the destination
            party before connecting the customer.


            Usage:

            - Used only when `mode` is
            `blind-transfer-add-summary-to-sip-header`,
            `warm-transfer-say-message`,
            `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`,
            or `warm-transfer-experimental`.
          oneOf:
            - type: string
            - $ref: '#/components/schemas/CustomMessage'
        timeout:
          type: number
          description: >-
            This is the timeout in seconds for the
            warm-transfer-wait-for-operator-to-speak-first-and-then-say-message/summary


            @default 60
          minimum: 1
          maximum: 600
          default: 60
        sipVerb:
          type: object
          description: |-
            This specifies the SIP verb to use while transferring the call.
            - 'refer': Uses SIP REFER to transfer the call (default)
            - 'bye': Ends current call with SIP BYE
            - 'dial': Uses SIP DIAL to transfer the call
          default: refer
          enum:
            - refer
            - bye
            - dial
        holdAudioUrl:
          type: string
          description: >-
            This is the URL to an audio file played while the customer is on
            hold during transfer.


            Usage:

            - Used only when `mode` is `warm-transfer-experimental`.

            - Used when transferring calls to play hold audio for the customer.

            - Must be a publicly accessible URL to an audio file.

            - Supported formats: MP3 and WAV.

            - If not provided, the default hold audio will be used.
        transferCompleteAudioUrl:
          type: string
          description: >-
            This is the URL to an audio file played after the warm transfer
            message or summary is delivered to the destination party.

            It can be used to play a custom sound like 'beep' to notify that the
            transfer is complete.


            Usage:

            - Used only when `mode` is `warm-transfer-experimental`.

            - Used when transferring calls to play hold audio for the
            destination party.

            - Must be a publicly accessible URL to an audio file.

            - Supported formats: MP3 and WAV.
        twiml:
          type: string
          description: >-
            This is the TwiML instructions to execute on the destination call
            leg before connecting the customer.


            Usage:

            - Used only when `mode` is `warm-transfer-twiml`.

            - Supports only `Play`, `Say`, `Gather`, `Hangup` and `Pause` verbs.

            - Maximum length is 4096 characters.


            Example:

            ```

            <Say voice="alice" language="en-US">Hello, transferring a customer
            to you.</Say>

            <Pause length="2"/>

            <Say>They called about billing questions.</Say>

            ```
          maxLength: 4096
        summaryPlan:
          description: >-
            This is the plan for generating a summary of the call to present to
            the destination party.


            Usage:

            - Used only when `mode` is
            `blind-transfer-add-summary-to-sip-header` or
            `warm-transfer-say-summary` or
            `warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary`
            or `warm-transfer-experimental`.
          allOf:
            - $ref: '#/components/schemas/SummaryPlan'
        sipHeadersInReferToEnabled:
          type: boolean
          description: >-
            This flag includes the sipHeaders from above in the refer to sip uri
            as url encoded query params.


            @default false
        fallbackPlan:
          description: >-
            This configures the fallback plan when the transfer fails
            (destination unreachable, busy, or not human).


            Usage:

            - Used only when `mode` is `warm-transfer-experimental`.

            - If not provided when using `warm-transfer-experimental`, a default
            message will be used.
          allOf:
            - $ref: '#/components/schemas/TransferFallbackPlan'
      required:
        - mode
    SummaryPlan:
      type: object
      properties:
        messages:
          description: >-
            These are the messages used to generate the summary.


            @default: ```

            [
              {
                "role": "system",
                "content": "You are an expert note-taker. You will be given a transcript of a call. Summarize the call in 2-3 sentences. DO NOT return anything except the summary."
              },
              {
                "role": "user",
                "content": "Here is the transcript:\n\n{{transcript}}\n\n. Here is the ended reason of the call:\n\n{{endedReason}}\n\n"
              }
            ]```


            You can customize by providing any messages you want.


            Here are the template variables available:

            - {{transcript}}: The transcript of the call from
            `call.artifact.transcript` 

            - {{systemPrompt}}: The system prompt of the call from
            `assistant.model.messages[type=system].content` 

            - {{endedReason}}: The ended reason of the call from
            `call.endedReason`
          type: array
          items:
            type: object
        enabled:
          type: boolean
          description: >-
            This determines whether a summary is generated and stored in
            `call.analysis.summary`. Defaults to true.


            Usage:

            - If you want to disable the summary, set this to false.


            @default true
        timeoutSeconds:
          type: number
          description: >-
            This is how long the request is tried before giving up. When request
            times out, `call.analysis.summary` will be empty.


            Usage:

            - To guarantee the summary is generated, set this value high. Note,
            this will delay the end of call report in cases where model is slow
            to respond.


            @default 5 seconds
          minimum: 1
          maximum: 60
    TransferFallbackPlan:
      type: object
      properties:
        message:
          description: >-
            This is the message the assistant will deliver to the customer if
            the transfer fails.
          oneOf:
            - type: string
            - $ref: '#/components/schemas/CustomMessage'
        endCallEnabled:
          type: boolean
          description: >-
            This controls what happens after delivering the failure message to
            the customer.

            - true: End the call after delivering the failure message (default)

            - false: Keep the assistant on the call to continue handling the
            customer's request


            @default true
          default: true
      required:
        - message
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: Bearer
      type: http
      description: Retrieve your API Key from [Dashboard](dashboard.cozmox.ai).

````