Skip to main content
Glama

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

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

Input Schema (JSON Schema)

{ "properties": { "parse_mode": { "description": "Parse mode (HTML, Markdown, or MarkdownV2)", "enum": [ "HTML", "Markdown", "MarkdownV2" ], "type": "string" }, "text": { "description": "Message text to send", "type": "string" } }, "required": [ "text" ], "type": "object" }

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'], }, },

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