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

from ..core.pydantic_utilities import UniversalBaseModel
import pydantic
import typing
from .tool_result import ToolResult
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class ToolCall(UniversalBaseModel):
    """
    Information about a tool call.
    """

    tool_id: str = pydantic.Field()
    """
    Unique identifier for the tool in format 'service_name:tool_name'
    """

    arguments: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field()
    """
    A `dict` of the arguments to the tool call
    """

    result: ToolResult

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
            extra="allow", frozen=True
        )  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
