"""This module defines the types for the MCP protocol.

Check the latest schema at:
https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/schema/2025-11-25/schema.json
"""

# Re-export everything from _types for backward compatibility
from mcp.types._types import (
    DEFAULT_NEGOTIATED_VERSION,
    LATEST_PROTOCOL_VERSION,
    TASK_FORBIDDEN,
    TASK_OPTIONAL,
    TASK_REQUIRED,
    TASK_STATUS_CANCELLED,
    TASK_STATUS_COMPLETED,
    TASK_STATUS_FAILED,
    TASK_STATUS_INPUT_REQUIRED,
    TASK_STATUS_WORKING,
    Annotations,
    AudioContent,
    BaseMetadata,
    BlobResourceContents,
    CallToolRequest,
    CallToolRequestParams,
    CallToolResult,
    CancelledNotification,
    CancelledNotificationParams,
    CancelTaskRequest,
    CancelTaskRequestParams,
    CancelTaskResult,
    ClientCapabilities,
    ClientNotification,
    ClientRequest,
    ClientResult,
    ClientTasksCapability,
    ClientTasksRequestsCapability,
    CompleteRequest,
    CompleteRequestParams,
    CompleteResult,
    Completion,
    CompletionArgument,
    CompletionContext,
    CompletionsCapability,
    ContentBlock,
    CreateMessageRequest,
    CreateMessageRequestParams,
    CreateMessageResult,
    CreateMessageResultWithTools,
    CreateTaskResult,
    ElicitationCapability,
    ElicitationRequiredErrorData,
    ElicitCompleteNotification,
    ElicitCompleteNotificationParams,
    ElicitRequest,
    ElicitRequestedSchema,
    ElicitRequestFormParams,
    ElicitRequestParams,
    ElicitRequestURLParams,
    ElicitResult,
    EmbeddedResource,
    EmptyResult,
    FormElicitationCapability,
    GetPromptRequest,
    GetPromptRequestParams,
    GetPromptResult,
    GetTaskPayloadRequest,
    GetTaskPayloadRequestParams,
    GetTaskPayloadResult,
    GetTaskRequest,
    GetTaskRequestParams,
    GetTaskResult,
    Icon,
    ImageContent,
    Implementation,
    IncludeContext,
    InitializedNotification,
    InitializeRequest,
    InitializeRequestParams,
    InitializeResult,
    ListPromptsRequest,
    ListPromptsResult,
    ListResourcesRequest,
    ListResourcesResult,
    ListResourceTemplatesRequest,
    ListResourceTemplatesResult,
    ListRootsRequest,
    ListRootsResult,
    ListTasksRequest,
    ListTasksResult,
    ListToolsRequest,
    ListToolsResult,
    LoggingCapability,
    LoggingLevel,
    LoggingMessageNotification,
    LoggingMessageNotificationParams,
    ModelHint,
    ModelPreferences,
    Notification,
    NotificationParams,
    PaginatedRequest,
    PaginatedRequestParams,
    PaginatedResult,
    PingRequest,
    ProgressNotification,
    ProgressNotificationParams,
    ProgressToken,
    Prompt,
    PromptArgument,
    PromptListChangedNotification,
    PromptMessage,
    PromptReference,
    PromptsCapability,
    ReadResourceRequest,
    ReadResourceRequestParams,
    ReadResourceResult,
    RelatedTaskMetadata,
    Request,
    RequestParams,
    RequestParamsMeta,
    Resource,
    ResourceContents,
    ResourceLink,
    ResourceListChangedNotification,
    ResourcesCapability,
    ResourceTemplate,
    ResourceTemplateReference,
    ResourceUpdatedNotification,
    ResourceUpdatedNotificationParams,
    Result,
    Role,
    Root,
    RootsCapability,
    RootsListChangedNotification,
    SamplingCapability,
    SamplingContent,
    SamplingContextCapability,
    SamplingMessage,
    SamplingMessageContentBlock,
    SamplingToolsCapability,
    ServerCapabilities,
    ServerNotification,
    ServerRequest,
    ServerResult,
    ServerTasksCapability,
    ServerTasksRequestsCapability,
    SetLevelRequest,
    SetLevelRequestParams,
    StopReason,
    SubscribeRequest,
    SubscribeRequestParams,
    Task,
    TaskExecutionMode,
    TaskMetadata,
    TasksCallCapability,
    TasksCancelCapability,
    TasksCreateElicitationCapability,
    TasksCreateMessageCapability,
    TasksElicitationCapability,
    TasksListCapability,
    TasksSamplingCapability,
    TaskStatus,
    TaskStatusNotification,
    TaskStatusNotificationParams,
    TasksToolsCapability,
    TextContent,
    TextResourceContents,
    Tool,
    ToolAnnotations,
    ToolChoice,
    ToolExecution,
    ToolListChangedNotification,
    ToolResultContent,
    ToolsCapability,
    ToolUseContent,
    UnsubscribeRequest,
    UnsubscribeRequestParams,
    UrlElicitationCapability,
    client_notification_adapter,
    client_request_adapter,
    client_result_adapter,
    server_notification_adapter,
    server_request_adapter,
    server_result_adapter,
)

# Re-export JSONRPC types
from mcp.types.jsonrpc import (
    CONNECTION_CLOSED,
    INTERNAL_ERROR,
    INVALID_PARAMS,
    INVALID_REQUEST,
    METHOD_NOT_FOUND,
    PARSE_ERROR,
    REQUEST_TIMEOUT,
    URL_ELICITATION_REQUIRED,
    ErrorData,
    JSONRPCError,
    JSONRPCMessage,
    JSONRPCNotification,
    JSONRPCRequest,
    JSONRPCResponse,
    RequestId,
    jsonrpc_message_adapter,
)

__all__ = [
    # Protocol version constants
    "LATEST_PROTOCOL_VERSION",
    "DEFAULT_NEGOTIATED_VERSION",
    # Task execution mode constants
    "TASK_FORBIDDEN",
    "TASK_OPTIONAL",
    "TASK_REQUIRED",
    # Task status constants
    "TASK_STATUS_CANCELLED",
    "TASK_STATUS_COMPLETED",
    "TASK_STATUS_FAILED",
    "TASK_STATUS_INPUT_REQUIRED",
    "TASK_STATUS_WORKING",
    # Type aliases and variables
    "ContentBlock",
    "ElicitRequestedSchema",
    "ElicitRequestParams",
    "IncludeContext",
    "LoggingLevel",
    "ProgressToken",
    "Role",
    "SamplingContent",
    "SamplingMessageContentBlock",
    "StopReason",
    "TaskExecutionMode",
    "TaskStatus",
    # Base classes
    "BaseMetadata",
    "Request",
    "Notification",
    "Result",
    "RequestParams",
    "RequestParamsMeta",
    "NotificationParams",
    "PaginatedRequest",
    "PaginatedRequestParams",
    "PaginatedResult",
    "EmptyResult",
    # Capabilities
    "ClientCapabilities",
    "ClientTasksCapability",
    "ClientTasksRequestsCapability",
    "CompletionsCapability",
    "ElicitationCapability",
    "FormElicitationCapability",
    "LoggingCapability",
    "PromptsCapability",
    "ResourcesCapability",
    "RootsCapability",
    "SamplingCapability",
    "SamplingContextCapability",
    "SamplingToolsCapability",
    "ServerCapabilities",
    "ServerTasksCapability",
    "ServerTasksRequestsCapability",
    "TasksCancelCapability",
    "TasksCallCapability",
    "TasksCreateElicitationCapability",
    "TasksCreateMessageCapability",
    "TasksElicitationCapability",
    "TasksListCapability",
    "TasksSamplingCapability",
    "TasksToolsCapability",
    "ToolsCapability",
    "UrlElicitationCapability",
    # Content types
    "Annotations",
    "AudioContent",
    "BlobResourceContents",
    "EmbeddedResource",
    "Icon",
    "ImageContent",
    "ResourceContents",
    "ResourceLink",
    "TextContent",
    "TextResourceContents",
    "ToolResultContent",
    "ToolUseContent",
    # Entity types
    "Completion",
    "CompletionArgument",
    "CompletionContext",
    "Implementation",
    "ModelHint",
    "ModelPreferences",
    "Prompt",
    "PromptArgument",
    "PromptMessage",
    "PromptReference",
    "Resource",
    "ResourceTemplate",
    "ResourceTemplateReference",
    "Root",
    "SamplingMessage",
    "Task",
    "TaskMetadata",
    "RelatedTaskMetadata",
    "Tool",
    "ToolAnnotations",
    "ToolChoice",
    "ToolExecution",
    # Requests
    "CallToolRequest",
    "CallToolRequestParams",
    "CancelTaskRequest",
    "CancelTaskRequestParams",
    "CompleteRequest",
    "CompleteRequestParams",
    "CreateMessageRequest",
    "CreateMessageRequestParams",
    "ElicitRequest",
    "ElicitRequestFormParams",
    "ElicitRequestURLParams",
    "GetPromptRequest",
    "GetPromptRequestParams",
    "GetTaskPayloadRequest",
    "GetTaskPayloadRequestParams",
    "GetTaskRequest",
    "GetTaskRequestParams",
    "InitializeRequest",
    "InitializeRequestParams",
    "ListPromptsRequest",
    "ListResourcesRequest",
    "ListResourceTemplatesRequest",
    "ListRootsRequest",
    "ListTasksRequest",
    "ListToolsRequest",
    "PingRequest",
    "ReadResourceRequest",
    "ReadResourceRequestParams",
    "SetLevelRequest",
    "SetLevelRequestParams",
    "SubscribeRequest",
    "SubscribeRequestParams",
    "UnsubscribeRequest",
    "UnsubscribeRequestParams",
    # Results
    "CallToolResult",
    "CancelTaskResult",
    "CompleteResult",
    "CreateMessageResult",
    "CreateMessageResultWithTools",
    "CreateTaskResult",
    "ElicitResult",
    "ElicitationRequiredErrorData",
    "GetPromptResult",
    "GetTaskPayloadResult",
    "GetTaskResult",
    "InitializeResult",
    "ListPromptsResult",
    "ListResourcesResult",
    "ListResourceTemplatesResult",
    "ListRootsResult",
    "ListTasksResult",
    "ListToolsResult",
    "ReadResourceResult",
    # Notifications
    "CancelledNotification",
    "CancelledNotificationParams",
    "ElicitCompleteNotification",
    "ElicitCompleteNotificationParams",
    "InitializedNotification",
    "LoggingMessageNotification",
    "LoggingMessageNotificationParams",
    "ProgressNotification",
    "ProgressNotificationParams",
    "PromptListChangedNotification",
    "ResourceListChangedNotification",
    "ResourceUpdatedNotification",
    "ResourceUpdatedNotificationParams",
    "RootsListChangedNotification",
    "TaskStatusNotification",
    "TaskStatusNotificationParams",
    "ToolListChangedNotification",
    # Union types for request/response routing
    "ClientNotification",
    "ClientRequest",
    "ClientResult",
    "ServerNotification",
    "ServerRequest",
    "ServerResult",
    # Type adapters
    "client_notification_adapter",
    "client_request_adapter",
    "client_result_adapter",
    "server_notification_adapter",
    "server_request_adapter",
    "server_result_adapter",
    # JSON-RPC types
    "CONNECTION_CLOSED",
    "INTERNAL_ERROR",
    "INVALID_PARAMS",
    "INVALID_REQUEST",
    "METHOD_NOT_FOUND",
    "PARSE_ERROR",
    "REQUEST_TIMEOUT",
    "URL_ELICITATION_REQUIRED",
    "ErrorData",
    "JSONRPCError",
    "JSONRPCMessage",
    "JSONRPCNotification",
    "JSONRPCRequest",
    "JSONRPCResponse",
    "RequestId",
    "jsonrpc_message_adapter",
]
