telegram_logout
Clear authentication cookies to log out from Telegram sessions, removing stored login credentials and access tokens.
Instructions
Clear Telegram authentication cookies
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "telegram_logout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:595-606 (handler)The handler function that implements the core logic of the 'telegram_logout' tool. It invokes the auth.logout() method to clear Telegram authentication cookies and returns a standardized MCP response confirming the logout.
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)The registration of the 'telegram_logout' tool within the MCP server's tool list, including its name, description, and input schema (which requires no parameters).
{ name: 'telegram_logout', description: 'Clear Telegram authentication cookies', inputSchema: { type: 'object', properties: {}, required: [] } }, - src/server.ts:238-242 (schema)The input schema definition for the 'telegram_logout' tool, specifying an empty object with no required properties.
inputSchema: { type: 'object', properties: {}, required: [] } - src/server.ts:83-84 (handler)The dispatch case in the main tool execution switch statement that routes calls to the 'telegram_logout' handler.
case 'telegram_logout': return await this.handleTelegramLogout();