Skip to main content
Glama
DLHellMe
by DLHellMe

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']
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It adds useful context about authentication ('Uses authenticated session if logged in'), which is a behavioral trait not in the schema. However, it doesn't disclose other potential behaviors like rate limits, error handling, or response format, leaving gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise with two sentences that are front-loaded and waste no words. Each sentence adds value: the first defines the tool's purpose and scope, and the second clarifies authentication behavior.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (single parameter, no output schema, no annotations), the description is moderately complete. It covers purpose and authentication but lacks details on output format, error cases, or how it differs from similar tools like 'api_get_channel_info,' which could be important for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema already documents the 'url' parameter fully. The description does not add any additional meaning or context about the parameter beyond what the schema provides, such as URL format examples or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('channel/group information'), specifying it excludes post scraping. It distinguishes from siblings like 'scrape_channel' by emphasizing the limited scope, though it doesn't explicitly name alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by stating 'without scraping posts,' suggesting this tool is for metadata retrieval rather than content extraction. However, it lacks explicit guidance on when to use this versus alternatives like 'api_get_channel_info' or other scraping tools, leaving some ambiguity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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