Skip to main content
Glama

get_channel_info

Retrieve Telegram channel or group metadata like title, description, and subscriber count from a URL without extracting posts. Uses authenticated access when available.

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 for the 'get_channel_info' tool. It determines if authenticated scraping is available, scrapes the channel metadata (no posts), and formats the channel name, username, description, subscriber count, and scrape time into 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 } ] }; }
  • src/server.ts:185-198 (registration)
    Registers the 'get_channel_info' tool with the MCP server, including its description and input schema requiring a 'url' parameter.
    { 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'] } },
  • Input schema for the 'get_channel_info' tool, defining an object with a required 'url' string property.
    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