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

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'send' implies a write operation, it doesn't mention authentication requirements, rate limits, error conditions, or what happens on success (e.g., message ID returned). The description lacks crucial operational context for a mutation tool.

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 a single, efficient sentence that states the core purpose without unnecessary words. It's appropriately sized for a simple tool and front-loads the essential information.

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

Completeness2/5

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

For a mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what happens after sending (success response, error handling), doesn't mention authentication or permissions needed, and provides minimal context about the Telegram channel environment.

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?

Schema description coverage is 100%, so the schema already documents both parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema, but doesn't need to compensate for gaps either. This meets the baseline for high schema coverage.

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 ('send a text message') and target ('to the Telegram channel'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from its sibling 'send_photo' or 'send_poll' which also send messages but with different content types.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'send_photo' for images or 'edit_message' for modifications. It mentions the channel context but doesn't specify prerequisites, limitations, or when other tools might be more appropriate.

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

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