Skip to main content
Glama

get_channel_info

Retrieve detailed information about Telegram channels using the Bot API, enabling automated management and monitoring of channel data for bot operations.

Instructions

Get information about the Telegram channel

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "type": "object" }

Implementation Reference

  • The handler logic for the 'get_channel_info' tool. It uses the TelegramBot instance to call getChat(CHANNEL_ID), retrieves channel details like title, ID, type, username, description, and member count, and returns a formatted text response.
    case 'get_channel_info': { const chat = await bot.getChat(CHANNEL_ID); return { content: [ { type: 'text', text: `๐Ÿ“ฑ Channel Information:\n\n๐Ÿท๏ธ Title: ${chat.title}\n๐Ÿ†” ID: ${chat.id}\n๐Ÿ“ Type: ${chat.type}\n๐Ÿ‘ค Username: ${chat.username || 'Not set'}\n๐Ÿ“„ Description: ${chat.description || 'No description'}\n๐Ÿ‘ฅ Members: ${(chat as any).member_count || 'Unknown'}`, }, ], }; }
  • src/index.ts:188-195 (registration)
    Registration of the 'get_channel_info' tool in the listTools response, including its name, description, and empty input schema (no parameters required).
    { name: 'get_channel_info', description: 'Get information about the Telegram channel', inputSchema: { type: 'object', properties: {}, }, },
  • Input schema for 'get_channel_info' tool, defined as an empty object since no input parameters are needed.
    inputSchema: { type: 'object', properties: {}, }, },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bobidk91-ops/telegram-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server