# This file was auto-generated by Fern from our API Definition.

import typing_extensions
from ..types.tool_parameter_item_type import ToolParameterItemType
from ..types.tool_parameter_location import ToolParameterLocation
from ..types.tool_parameter_type import ToolParameterType


class ToolParameterParams(typing_extensions.TypedDict):
    type: ToolParameterType
    """
    The parameter type.
    """

    item_type: typing_extensions.NotRequired[ToolParameterItemType]
    """
    Required only when type is "array". The type of items in the array.
    """

    name: str
    """
    The parameter name.
    """

    description: str
    """
    Description of the parameter.
    """

    is_required: bool
    """
    Whether the parameter is required.
    """

    location: typing_extensions.NotRequired[ToolParameterLocation]
    """
    Only applicable for `custom_webhook` tools. Specifies where the parameter should be sent in the webhook request.
    - For GET webhooks: defaults to `"query_string"` and `"request_body"` is not allowed.
    - For POST webhooks: required, can be either `"request_body"` or `"query_string"`.
    - Not allowed for `custom_websocket` or `built_in_transfer_to_phone_number` tools.
    When updating a tool's type or endpoint_method, all parameters must include explicit `location` values.
    """
