Skip to main content
Glama
bobidk91-ops

Telegram MCP Server

by bobidk91-ops

send_message

Send text messages to Telegram channels using specified parse modes like HTML or Markdown for automated bot communication and content distribution.

Instructions

Send a text message to the Telegram channel

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
parse_modeNoParse mode (HTML, Markdown, or MarkdownV2)
textYesMessage text to send

Implementation Reference

  • The handler for the 'send_message' tool. Extracts text and optional parse_mode from arguments, sends the message to the specified Telegram channel using bot.sendMessage, and returns a formatted success response with message details.
    case 'send_message': {
      const { text, parse_mode = 'HTML' } = args as {
        text: string;
        parse_mode?: string;
      };
      
      const result = await bot.sendMessage(CHANNEL_ID, text, {
        parse_mode: parse_mode as any,
      });
      
      return {
        content: [
          {
            type: 'text',
            text: `āœ… Message sent successfully!\n\nšŸ“± Channel: ${CHANNEL_ID}\nšŸ“ Message ID: ${result.message_id}\nšŸ“„ Text: ${result.text}\nšŸ“… Date: ${new Date(result.date * 1000).toLocaleString()}`,
          },
        ],
      };
    }
  • The input schema definition for the 'send_message' tool, specifying required 'text' parameter and optional 'parse_mode'.
    {
      name: 'send_message',
      description: 'Send a text message to the Telegram channel',
      inputSchema: {
        type: 'object',
        properties: {
          text: {
            type: 'string',
            description: 'Message text to send',
          },
          parse_mode: {
            type: 'string',
            enum: ['HTML', 'Markdown'],
            description: 'Parse mode for the message (HTML or Markdown)',
          },
        },
        required: ['text'],
      },
    },

Tool Definition Quality

Score is being calculated. Check back soon.

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

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