Skip to main content
Glama

get_channel_info

Retrieve detailed Telegram channel or group information directly from the URL without extracting posts. Utilizes authenticated sessions for enhanced access through the Telegram MCP Server.

Instructions

Get only the channel/group information without scraping posts. Uses authenticated session if logged in.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe Telegram channel/group URL

Implementation Reference

  • The handler function that implements the core logic of the 'get_channel_info' tool. It selects the appropriate scraper (authenticated or unauthenticated), scrapes only channel metadata (no posts), and formats the information as markdown.
    private async handleGetChannelInfo(args: any): Promise<any> { // Check if authenticated and use authenticated scraper by default const isAuthenticated = await this.auth.isAuthenticated(); const scraperToUse = isAuthenticated ? this.authScraper : this.scraper; const options: ScrapeOptions = { url: args.url, maxPosts: 0 // Don't scrape posts }; const result = await scraperToUse.scrape(options); const info = `# Channel Information **Name:** ${result.channel.name}${result.channel.verified ? ' ✓' : ''} **Username:** @${result.channel.username} ${result.channel.description ? `**Description:** ${result.channel.description}` : ''} ${result.channel.subscriberCount ? `**Subscribers:** ${result.channel.subscriberCount.toLocaleString()}` : ''} *Scraped at: ${result.scrapedAt.toISOString()}*`; return { content: [ { type: 'text', text: info } ] }; }
  • Input schema for the 'get_channel_info' tool, defining the required 'url' parameter.
    inputSchema: { type: 'object', properties: { url: { type: 'string', description: 'The Telegram channel/group URL' } }, required: ['url'] }
  • src/server.ts:185-198 (registration)
    Registration of the 'get_channel_info' tool in the server's tool list, including name, description, and input schema.
    { name: 'get_channel_info', description: 'Get only the channel/group information without scraping posts. Uses authenticated session if logged in.', inputSchema: { type: 'object', properties: { url: { type: 'string', description: 'The Telegram channel/group URL' } }, required: ['url'] } },

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/DLHellMe/telegram-mcp-server'

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