// Define our own types based on the MCP SDK structure /** * MCP text content type */ export interface McpTextContent { [key: string]: unknown; // This is required by the MCP SDK type: 'text'; text: string; } /** * MCP tool response type */ export interface McpToolResponse { [key: string]: unknown; // This is required by the MCP SDK content: McpTextContent[]; } /** * Configuration options for the MCP client */ export interface ClientConfig { /** Server URL for the MCP server connection */ serverUrl: string; /** Connection timeout in milliseconds */ connectionTimeout: number; } /** * Default configuration values for the client */ export const DEFAULT_CLIENT_CONFIG: ClientConfig = { serverUrl: 'http://localhost:3000', connectionTimeout: 10000, // 10 seconds }; /** * Result from AWS connection test */ export interface AwsConnectionResult { /** Whether the connection was successful */ success: boolean; /** Message describing the connection result */ message: string; /** Optional log group name if found */ logGroupName?: string; /** Error details if connection failed */ error?: Error | unknown; } /** * Response from listing MCP tools */ export interface ToolsListResponse { /** Array of available tools */ tools: ToolInfo[]; } /** * Information about an MCP tool */ export interface ToolInfo { /** Tool name */ name: string; /** Tool description */ description: string; /** Schema for the tool's parameters */ schema?: Record; } /** * Type for tool call parameters */ export interface ToolCallParams> { /** Name of the tool to call */ name: string; /** Arguments to pass to the tool */ arguments: T; } /** * Error handler function type */ export type ErrorHandler = (error: Error | unknown) => void; /** * Health status for system components */ export enum HealthStatus { HEALTHY = 'healthy', DEGRADED = 'degraded', FAILING = 'failing', UNKNOWN = 'unknown' } /** * Health check result for a system component */ export interface ComponentHealth { name: string; status: HealthStatus; message: string; lastChecked: string; details?: Record; } /** * Overall system health check result */ export interface SystemHealth { status: HealthStatus; timestamp: string; components: ComponentHealth[]; version: string; uptime: number; }