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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel


class ToolDetails(UncheckedBaseModel):
    """
    Details about a single tool.
    """

    tool_name: str = pydantic.Field()
    """
    Unique identifier for the tool from @tool decorator
    """

    tool_cname: str = pydantic.Field()
    """
    Display name of the tool
    """

    group: typing.Optional[str] = pydantic.Field(default=None)
    """
    Group the tool belongs to
    """

    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    Description of what the tool does
    """

    icon_url: typing.Optional[str] = pydantic.Field(default=None)
    """
    URL of the tool's icon
    """

    input_schema: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
    """
    JSON Schema for the tool's input parameters
    """

    labels: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Labels/tags associated with the tool
    """

    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
