# 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
from .dynamic_variable_assignment import DynamicVariableAssignment
from .mcp_tool_config_override_input_input_overrides_value import McpToolConfigOverrideInputInputOverridesValue
from .mcp_tool_config_override_input_tool_call_sound import McpToolConfigOverrideInputToolCallSound
from .pre_tool_speech_mode import PreToolSpeechMode
from .tool_call_sound_behavior import ToolCallSoundBehavior
from .tool_execution_mode import ToolExecutionMode
from .tool_interruption_mode import ToolInterruptionMode
from .tool_response_mock_config_input import ToolResponseMockConfigInput


class McpToolConfigOverrideInput(UncheckedBaseModel):
    tool_name: str = pydantic.Field()
    """
    The name of the MCP tool
    """

    force_pre_tool_speech: typing.Optional[bool] = pydantic.Field(default=None)
    """
    DEPRECATED: use `pre_tool_speech` instead. If set, overrides the server's force_pre_tool_speech setting for this tool.
    """

    pre_tool_speech: typing.Optional[PreToolSpeechMode] = pydantic.Field(default=None)
    """
    If set, overrides the server's pre_tool_speech setting for this tool.
    """

    disable_interruptions: typing.Optional[bool] = pydantic.Field(default=None)
    """
    DEPRECATED: use `interruption_mode` instead. If set, overrides the server's disable_interruptions setting for this tool.
    """

    interruption_mode: typing.Optional[ToolInterruptionMode] = pydantic.Field(default=None)
    """
    If set, overrides the server's interruption_mode setting for this tool.
    """

    tool_call_sound: typing.Optional[McpToolConfigOverrideInputToolCallSound] = pydantic.Field(default=None)
    """
    Overrides the server's tool_call_sound setting for this tool. A sound name plays that sound; 'off' overrides to no sound (silence); null means do not override (inherit the server default).
    """

    tool_call_sound_behavior: typing.Optional[ToolCallSoundBehavior] = pydantic.Field(default=None)
    """
    If set, overrides the server's tool_call_sound_behavior setting for this tool
    """

    execution_mode: typing.Optional[ToolExecutionMode] = pydantic.Field(default=None)
    """
    If set, overrides the server's execution_mode setting for this tool
    """

    response_timeout_secs: typing.Optional[int] = pydantic.Field(default=None)
    """
    If set, overrides the server's response timeout for this MCP tool (seconds).
    """

    assignments: typing.Optional[typing.List[DynamicVariableAssignment]] = pydantic.Field(default=None)
    """
    Dynamic variable assignments for this MCP tool
    """

    input_overrides: typing.Optional[
        typing.Dict[str, typing.Optional[McpToolConfigOverrideInputInputOverridesValue]]
    ] = pydantic.Field(default=None)
    """
    Mapping of json path to input override configuration
    """

    response_mocks: typing.Optional[typing.List[ToolResponseMockConfigInput]] = pydantic.Field(default=None)
    """
    Mock responses with optional parameter conditions. Evaluated top-to-bottom; first match wins.
    """

    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
