export declare namespace MCP {
    interface CompleteRequest2 extends MCP.CompleteRequest {
        params: MCP.CompleteRequest["params"] & {
            resolved?: {
                [key: string]: string;
            };
        };
    }
}
export declare namespace MCP {
    type JSONRPCMessage = JSONRPCRequest | JSONRPCNotification | JSONRPCBatchRequest | JSONRPCResponse | JSONRPCError | JSONRPCBatchResponse;
    type JSONRPCBatchRequest = (JSONRPCRequest | JSONRPCNotification)[];
    type JSONRPCBatchResponse = (JSONRPCResponse | JSONRPCError)[];
    const LATEST_PROTOCOL_VERSION = "2025-03-26";
    const JSONRPC_VERSION = "2.0";
    type ProgressToken = string | number;
    type Cursor = string;
    interface Request {
        method: string;
        params?: {
            _meta?: {
                progressToken?: ProgressToken;
            };
            [key: string]: unknown;
        };
    }
    interface Notification {
        method: string;
        params?: {
            _meta?: {
                [key: string]: unknown;
            };
            [key: string]: unknown;
        };
    }
    interface Result {
        _meta?: {
            [key: string]: unknown;
        };
        [key: string]: unknown;
    }
    type RequestId = string | number;
    interface JSONRPCRequest extends Request {
        jsonrpc: typeof JSONRPC_VERSION;
        id: RequestId;
    }
    interface JSONRPCNotification extends Notification {
        jsonrpc: typeof JSONRPC_VERSION;
    }
    interface JSONRPCResponse {
        jsonrpc: typeof JSONRPC_VERSION;
        id: RequestId;
        result: Result;
    }
    const PARSE_ERROR = -32700;
    const INVALID_REQUEST = -32600;
    const METHOD_NOT_FOUND = -32601;
    const INVALID_PARAMS = -32602;
    const INTERNAL_ERROR = -32603;
    interface JSONRPCError {
        jsonrpc: typeof JSONRPC_VERSION;
        id: RequestId;
        error: {
            code: number;
            message: string;
            data?: unknown;
        };
    }
    type EmptyResult = Result;
    interface CancelledNotification extends Notification {
        method: "notifications/cancelled";
        params: {
            requestId: RequestId;
            reason?: string;
        };
    }
    interface InitializeRequest extends Request {
        method: "initialize";
        params: {
            protocolVersion: string;
            capabilities: ClientCapabilities;
            clientInfo: Implementation;
        };
    }
    interface InitializeResult extends Result {
        protocolVersion: string;
        capabilities: ServerCapabilities;
        serverInfo: Implementation;
        instructions?: string;
    }
    interface InitializedNotification extends Notification {
        method: "notifications/initialized";
    }
    interface ClientCapabilities {
        experimental?: {
            [key: string]: object;
        };
        roots?: {
            listChanged?: boolean;
        };
        sampling?: object;
    }
    interface ServerCapabilities {
        experimental?: {
            [key: string]: object;
        };
        logging?: object;
        completions?: object;
        prompts?: {
            listChanged?: boolean;
        };
        resources?: {
            subscribe?: boolean;
            listChanged?: boolean;
        };
        tools?: {
            listChanged?: boolean;
        };
    }
    interface Implementation {
        name: string;
        version: string;
    }
    interface PingRequest extends Request {
        method: "ping";
    }
    interface ProgressNotification extends Notification {
        method: "notifications/progress";
        params: {
            progressToken: ProgressToken;
            progress: number;
            total?: number;
            message?: string;
        };
    }
    interface PaginatedRequest extends Request {
        params?: {
            cursor?: Cursor;
        };
    }
    interface PaginatedResult extends Result {
        nextCursor?: Cursor;
    }
    interface ListResourcesRequest extends PaginatedRequest {
        method: "resources/list";
    }
    interface ListResourcesResult extends PaginatedResult {
        resources: Resource[];
    }
    interface ListResourceTemplatesRequest extends PaginatedRequest {
        method: "resources/templates/list";
    }
    interface ListResourceTemplatesResult extends PaginatedResult {
        resourceTemplates: ResourceTemplate[];
    }
    interface ReadResourceRequest extends Request {
        method: "resources/read";
        params: {
            uri: string;
        };
    }
    interface ReadResourceResult extends Result {
        contents: (TextResourceContents | BlobResourceContents)[];
    }
    interface ResourceListChangedNotification extends Notification {
        method: "notifications/resources/list_changed";
    }
    interface SubscribeRequest extends Request {
        method: "resources/subscribe";
        params: {
            uri: string;
        };
    }
    interface UnsubscribeRequest extends Request {
        method: "resources/unsubscribe";
        params: {
            uri: string;
        };
    }
    interface ResourceUpdatedNotification extends Notification {
        method: "notifications/resources/updated";
        params: {
            uri: string;
        };
    }
    interface Resource {
        uri: string;
        name: string;
        description?: string;
        mimeType?: string;
        annotations?: Annotations;
        size?: number;
    }
    interface ResourceTemplate {
        uriTemplate: string;
        name: string;
        description?: string;
        mimeType?: string;
        annotations?: Annotations;
    }
    interface ResourceContents {
        uri: string;
        mimeType?: string;
    }
    interface TextResourceContents extends ResourceContents {
        text: string;
    }
    interface BlobResourceContents extends ResourceContents {
        blob: string;
    }
    interface ListPromptsRequest extends PaginatedRequest {
        method: "prompts/list";
    }
    interface ListPromptsResult extends PaginatedResult {
        prompts: Prompt[];
    }
    interface GetPromptRequest extends Request {
        method: "prompts/get";
        params: {
            name: string;
            arguments?: {
                [key: string]: string;
            };
        };
    }
    interface GetPromptResult extends Result {
        description?: string;
        messages: PromptMessage[];
    }
    interface Prompt {
        name: string;
        description?: string;
        arguments?: PromptArgument[];
    }
    interface PromptArgument {
        name: string;
        description?: string;
        required?: boolean;
    }
    type Role = "user" | "assistant";
    interface PromptMessage {
        role: Role;
        content: TextContent | ImageContent | AudioContent | EmbeddedResource;
    }
    interface EmbeddedResource {
        type: "resource";
        resource: TextResourceContents | BlobResourceContents;
        annotations?: Annotations;
    }
    interface PromptListChangedNotification extends Notification {
        method: "notifications/prompts/list_changed";
    }
    interface ListToolsRequest extends PaginatedRequest {
        method: "tools/list";
    }
    interface ListToolsResult extends PaginatedResult {
        tools: Tool[];
    }
    interface CallToolResult extends Result {
        content: (TextContent | ImageContent | AudioContent | EmbeddedResource)[];
        isError?: boolean;
    }
    interface CallToolRequest extends Request {
        method: "tools/call";
        params: {
            name: string;
            arguments?: {
                [key: string]: unknown;
            };
        };
    }
    interface ToolListChangedNotification extends Notification {
        method: "notifications/tools/list_changed";
    }
    interface ToolAnnotations {
        title?: string;
        readOnlyHint?: boolean;
        destructiveHint?: boolean;
        idempotentHint?: boolean;
        openWorldHint?: boolean;
    }
    interface Tool {
        name: string;
        description?: string;
        inputSchema: {
            type: "object";
            properties?: {
                [key: string]: object;
            };
            required?: string[];
        };
        annotations?: ToolAnnotations;
    }
    interface SetLevelRequest extends Request {
        method: "logging/setLevel";
        params: {
            level: LoggingLevel;
        };
    }
    interface LoggingMessageNotification extends Notification {
        method: "notifications/message";
        params: {
            level: LoggingLevel;
            logger?: string;
            data: unknown;
        };
    }
    type LoggingLevel = "debug" | "info" | "notice" | "warning" | "error" | "critical" | "alert" | "emergency";
    interface CreateMessageRequest extends Request {
        method: "sampling/createMessage";
        params: {
            messages: SamplingMessage[];
            modelPreferences?: ModelPreferences;
            systemPrompt?: string;
            includeContext?: "none" | "thisServer" | "allServers";
            temperature?: number;
            maxTokens: number;
            stopSequences?: string[];
            metadata?: object;
        };
    }
    interface CreateMessageResult extends Result, SamplingMessage {
        model: string;
        stopReason?: "endTurn" | "stopSequence" | "maxTokens" | string;
    }
    interface SamplingMessage {
        role: Role;
        content: TextContent | ImageContent | AudioContent;
    }
    interface Annotations {
        audience?: Role[];
        priority?: number;
    }
    interface TextContent {
        type: "text";
        text: string;
        annotations?: Annotations;
    }
    interface ImageContent {
        type: "image";
        data: string;
        mimeType: string;
        annotations?: Annotations;
    }
    interface AudioContent {
        type: "audio";
        data: string;
        mimeType: string;
        annotations?: Annotations;
    }
    interface ModelPreferences {
        hints?: ModelHint[];
        costPriority?: number;
        speedPriority?: number;
        intelligencePriority?: number;
    }
    interface ModelHint {
        name?: string;
    }
    interface CompleteRequest extends Request {
        method: "completion/complete";
        params: {
            ref: PromptReference | ResourceReference;
            argument: {
                name: string;
                value: string;
            };
        };
    }
    interface CompleteResult extends Result {
        completion: {
            values: string[];
            total?: number;
            hasMore?: boolean;
        };
    }
    interface ResourceReference {
        type: "ref/resource";
        uri: string;
    }
    interface PromptReference {
        type: "ref/prompt";
        name: string;
    }
    interface ListRootsRequest extends Request {
        method: "roots/list";
    }
    interface ListRootsResult extends Result {
        roots: Root[];
    }
    interface Root {
        uri: string;
        name?: string;
    }
    interface RootsListChangedNotification extends Notification {
        method: "notifications/roots/list_changed";
    }
    type ClientRequest = PingRequest | InitializeRequest | CompleteRequest | SetLevelRequest | GetPromptRequest | ListPromptsRequest | ListResourcesRequest | ListResourceTemplatesRequest | ReadResourceRequest | SubscribeRequest | UnsubscribeRequest | CallToolRequest | ListToolsRequest;
    type ClientNotification = CancelledNotification | ProgressNotification | InitializedNotification | RootsListChangedNotification;
    type ClientResult = EmptyResult | CreateMessageResult | ListRootsResult;
    type ServerRequest = PingRequest | CreateMessageRequest | ListRootsRequest;
    type ServerNotification = CancelledNotification | ProgressNotification | LoggingMessageNotification | ResourceUpdatedNotification | ResourceListChangedNotification | ToolListChangedNotification | PromptListChangedNotification;
    type ServerResult = EmptyResult | InitializeResult | CompleteResult | GetPromptResult | ListPromptsResult | ListResourcesResult | ListResourceTemplatesResult | ReadResourceResult | CallToolResult | ListToolsResult;
}
