declare module '@nucleoriofrio/webmcp/src/webmcp.js' {
  interface WebMCPOptions {
    color?: string
    position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'
    inactivityTimeout?: number
  }

  interface ToolSchema {
    type: string
    properties: Record<string, any>
    required?: string[]
  }

  type ToolHandler = (args: any) => string | Promise<string>

  class WebMCP {
    constructor(options?: WebMCPOptions)
    registerTool(name: string, description: string, schema: ToolSchema, handler: ToolHandler): void
    unregisterTool(name: string): void
    connect(): Promise<void>
    disconnect(): void
    on?(event: 'connected' | 'disconnected' | string, callback: () => void): void
    off?(event: string, callback: () => void): void
    isConnected?: boolean
  }

  export default WebMCP
}
