/**
 * MCP Error Types
 *
 * Reference: structured MCP error handling patterns.
 */
/**
 * Error codes for MCP operations.
 */
export declare enum MCPErrorCode {
    /** Failed to connect to MCP server */
    CONNECTION_FAILED = "CONNECTION_FAILED",
    /** Request timed out */
    TIMEOUT = "TIMEOUT",
    /** Tool not found on server */
    TOOL_NOT_FOUND = "TOOL_NOT_FOUND",
    /** Invalid parameters for tool call */
    INVALID_PARAMETERS = "INVALID_PARAMETERS",
    /** Server returned an error */
    SERVER_ERROR = "SERVER_ERROR",
    /** Transport layer error */
    TRANSPORT_ERROR = "TRANSPORT_ERROR",
    /** Not connected to server */
    NOT_CONNECTED = "NOT_CONNECTED",
    /** Protocol error */
    PROTOCOL_ERROR = "PROTOCOL_ERROR",
    /** Configuration error */
    CONFIG_ERROR = "CONFIG_ERROR",
    /** Schema conversion error */
    SCHEMA_CONVERSION_ERROR = "SCHEMA_CONVERSION_ERROR",
    /** Resource not found */
    RESOURCE_NOT_FOUND = "RESOURCE_NOT_FOUND",
    /** Prompt not found */
    PROMPT_NOT_FOUND = "PROMPT_NOT_FOUND",
    /** Session error (requires reconnection) */
    SESSION_ERROR = "SESSION_ERROR"
}
/**
 * Error class for MCP operations.
 * Provides structured error information with error codes and details.
 */
export declare class MCPError extends Error {
    /** Error code */
    readonly code: MCPErrorCode;
    /** Additional error details */
    readonly details?: unknown;
    /** Server name where error occurred */
    readonly serverName?: string;
    /** Tool name if error occurred during tool execution */
    readonly toolName?: string;
    constructor(message: string, code: MCPErrorCode, details?: unknown, options?: {
        serverName?: string;
        toolName?: string;
        cause?: Error;
    });
    /**
     * Convert error to JSON for logging/serialization.
     */
    toJSON(): Record<string, unknown>;
    /**
     * Create a string representation of the error.
     */
    toString(): string;
}
/**
 * Type guard to check if an error is an MCPError.
 */
export declare function isMCPError(error: unknown): error is MCPError;
/**
 * Check if an error indicates a session problem requiring reconnection.
 */
export declare function isSessionError(error: unknown): boolean;
/**
 * Create a connection failed error.
 */
export declare function createConnectionError(serverName: string, cause?: Error): MCPError;
/**
 * Create a timeout error.
 */
export declare function createTimeoutError(operation: string, serverName?: string): MCPError;
/**
 * Create a tool not found error.
 */
export declare function createToolNotFoundError(toolName: string, serverName?: string): MCPError;
/**
 * Create an invalid parameters error.
 */
export declare function createInvalidParametersError(toolName: string, details: unknown, serverName?: string): MCPError;
/**
 * Create a server error.
 */
export declare function createServerError(message: string, serverName?: string, details?: unknown): MCPError;
/**
 * Create a not connected error.
 */
export declare function createNotConnectedError(serverName?: string): MCPError;
/**
 * Create a config error.
 */
export declare function createConfigError(message: string, details?: unknown): MCPError;
/**
 * Create a schema conversion error.
 */
export declare function createSchemaConversionError(toolName: string, details: unknown, serverName?: string): MCPError;
