telegram_logout
Remove Telegram authentication cookies to ensure secure session termination and prevent unauthorized access to your account.
Instructions
Clear Telegram authentication cookies
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:595-606 (handler)The main handler function for the 'telegram_logout' tool. It calls the auth.logout() method and returns a success message confirming cookies have been cleared.private async handleTelegramLogout(): Promise<any> { await this.auth.logout(); return { content: [ { type: 'text', text: '✅ Successfully logged out from Telegram. Authentication cookies have been cleared.' } ] }; }
- src/server.ts:235-243 (registration)Tool registration in getTools() method, defining the name, description, and empty input schema for 'telegram_logout'.{ name: 'telegram_logout', description: 'Clear Telegram authentication cookies', inputSchema: { type: 'object', properties: {}, required: [] } },
- src/server.ts:83-84 (registration)Dispatch logic in the tool call request handler switch statement that routes 'telegram_logout' calls to the handler function.case 'telegram_logout': return await this.handleTelegramLogout();
- src/auth/telegram-auth.ts:302-305 (helper)Supporting logout method in TelegramAuth class that clears authentication cookies via CookieManager.async logout(): Promise<void> { await this.cookieManager.clearCookies(); logger.info('Logged out (cookies cleared)'); }