"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .mcpserver import Mcpserver, McpserverTypedDict
from .mcptoolannotations import Mcptoolannotations, McptoolannotationsTypedDict
from acuvity.types import BaseModel
from enum import Enum
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class Category(str, Enum):
    r"""The category of the tool. This relays information about where the tool is being
    used. This can be empty if unknown or if this is a tool listing of MCP servers.
    """

    CLIENT = "Client"
    SERVER = "Server"
    REMOTE_MCP = "RemoteMCP"


class ToolTypedDict(TypedDict):
    r"""Represents a tool that can enhance a genAI model's capabilities."""

    mcp_annotations: NotRequired[McptoolannotationsTypedDict]
    r"""Represents the tool annotations as they can be optionally defined for MCP tools."""
    mcp_server: NotRequired[McpserverTypedDict]
    r"""Represents an MCP server object."""
    category: NotRequired[Category]
    r"""The category of the tool. This relays information about where the tool is being
    used. This can be empty if unknown or if this is a tool listing of MCP servers.
    """
    description: NotRequired[str]
    r"""The description of the tool."""
    name: NotRequired[str]
    r"""The name of the tool."""
    type: NotRequired[str]
    r"""The type of the tool as can be optionally passed by the provider."""


class Tool(BaseModel):
    r"""Represents a tool that can enhance a genAI model's capabilities."""

    mcp_annotations: Annotated[
        Optional[Mcptoolannotations], pydantic.Field(alias="MCPAnnotations")
    ] = None
    r"""Represents the tool annotations as they can be optionally defined for MCP tools."""

    mcp_server: Annotated[Optional[Mcpserver], pydantic.Field(alias="MCPServer")] = None
    r"""Represents an MCP server object."""

    category: Optional[Category] = None
    r"""The category of the tool. This relays information about where the tool is being
    used. This can be empty if unknown or if this is a tool listing of MCP servers.
    """

    description: Optional[str] = None
    r"""The description of the tool."""

    name: Optional[str] = None
    r"""The name of the tool."""

    type: Optional[str] = None
    r"""The type of the tool as can be optionally passed by the provider."""
