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

import typing

import typing_extensions
from ..types.tool_endpoint_method import ToolEndpointMethod
from ..types.tool_execution_mode import ToolExecutionMode
from ..types.tool_type import ToolType
from .tool_parameter import ToolParameterParams
from .tool_project import ToolProjectParams


class ToolParams(typing_extensions.TypedDict):
    id: str
    """
    The ID of the tool.
    """

    name: str
    """
    The name of the tool.
    """

    description: str
    """
    Description of what the tool does.
    """

    project: ToolProjectParams
    type: ToolType
    """
    The type of tool.
    """

    execution_mode: ToolExecutionMode
    """
    Mode of operation - sync waits for response, async continues without waiting.
    """

    parameters: typing.Sequence[ToolParameterParams]
    """
    Array of parameter definitions for the tool.
    """

    endpoint_method: typing_extensions.NotRequired[ToolEndpointMethod]
    """
    HTTP method for webhook tools.
    """

    endpoint_url: typing_extensions.NotRequired[str]
    """
    URL for webhook tools.
    """

    endpoint_headers: typing_extensions.NotRequired[typing.Dict[str, str]]
    """
    Headers for webhook tools.
    """

    endpoint_timeout_ms: typing_extensions.NotRequired[int]
    """
    Timeout in milliseconds for webhook tools.
    """

    tool_call_output_timeout_ms: typing_extensions.NotRequired[int]
    """
    Timeout in milliseconds for WebSocket tool responses.
    """

    phone_number: typing_extensions.NotRequired[str]
    """
    The E.164 formatted phone number to transfer calls to. Required for built_in_transfer_to_phone_number tools.
    """
