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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .tool_capabilities_response import ToolCapabilitiesResponse


class SystemToolResponse(UniversalBaseModel):
    """
    Response schema for system tool entries.
    """

    id: str = pydantic.Field()
    """
    System tool ID with stool_ prefix
    """

    name: str = pydantic.Field()
    """
    Human-readable name for the tool
    """

    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    Detailed tool description
    """

    category: str = pydantic.Field()
    """
    Tool category: search, computation, generation, automation, analysis
    """

    tool_key: typing_extensions.Annotated[
        str,
        FieldMetadata(alias="toolKey"),
        pydantic.Field(alias="toolKey", description="Configuration key used in assistant toolConfigurations"),
    ]
    default_provider: typing_extensions.Annotated[
        str,
        FieldMetadata(alias="defaultProvider"),
        pydantic.Field(
            alias="defaultProvider", description="Provider selection strategy: 'auto' or specific provider name"
        ),
    ]
    capabilities: typing.Optional[ToolCapabilitiesResponse] = pydantic.Field(default=None)
    """
    Tool capabilities and features
    """

    is_preview: typing_extensions.Annotated[
        bool,
        FieldMetadata(alias="isPreview"),
        pydantic.Field(alias="isPreview", description="Whether this tool is in preview/beta status"),
    ]
    created_at: typing_extensions.Annotated[
        int,
        FieldMetadata(alias="createdAt"),
        pydantic.Field(alias="createdAt", description="Unix timestamp (seconds) when the tool was created"),
    ]
    updated_at: typing_extensions.Annotated[
        int,
        FieldMetadata(alias="updatedAt"),
        pydantic.Field(alias="updatedAt", description="Unix timestamp (seconds) when the tool was last updated"),
    ]

    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
