Skip to main content
Glama
bobidk91-ops

Telegram MCP Server

by bobidk91-ops

send_poll

Create and send interactive polls to Telegram channels with customizable questions, multiple options, and anonymous voting settings for gathering feedback and engagement.

Instructions

Create and send a poll to the Telegram channel

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
is_anonymousNoWhether the poll is anonymous
optionsYesPoll options (2-10 items)
questionYesPoll question
typeNoPoll typeregular

Implementation Reference

  • The switch case handler that executes the 'send_poll' tool. It destructures arguments, validates the number of options, sends the poll via Telegram bot, and returns a formatted success response.
    case 'send_poll': {
      const { question, options, is_anonymous = true, type = 'regular' } = args as {
        question: string;
        options: string[];
        is_anonymous?: boolean;
        type?: string;
      };
      
      if (options.length < 2 || options.length > 10) {
        throw new Error('Poll must have between 2 and 10 options');
      }
      
      const result = await bot.sendPoll(CHANNEL_ID, question, options, {
        is_anonymous,
        type: type as any,
      });
      
      return {
        content: [
          {
            type: 'text',
            text: `āœ… Poll created successfully!\n\nšŸ“± Channel: ${CHANNEL_ID}\nšŸ“ Message ID: ${result.message_id}\nā“ Question: ${question}\nšŸ“Š Options: ${options.length}\nšŸ”’ Anonymous: ${is_anonymous ? 'Yes' : 'No'}\nšŸ“‹ Type: ${type}`,
          },
        ],
      };
    }
  • src/index.ts:103-132 (registration)
    The tool registration in the ListToolsRequestSchema handler, defining the name, description, and input schema for 'send_poll'.
    {
      name: 'send_poll',
      description: 'Create and send a poll to the Telegram channel',
      inputSchema: {
        type: 'object',
        properties: {
          question: {
            type: 'string',
            description: 'Poll question',
          },
          options: {
            type: 'array',
            items: { type: 'string' },
            minItems: 2,
            maxItems: 10,
            description: 'Poll options (2-10 items)',
          },
          is_anonymous: {
            type: 'boolean',
            description: 'Whether the poll is anonymous (default: true)',
          },
          type: {
            type: 'string',
            enum: ['quiz', 'regular'],
            description: 'Poll type (default: regular)',
          },
        },
        required: ['question', 'options'],
      },
    },
  • The detailed input schema for the 'send_poll' tool, specifying properties, types, descriptions, and required fields.
    inputSchema: {
      type: 'object',
      properties: {
        question: {
          type: 'string',
          description: 'Poll question',
        },
        options: {
          type: 'array',
          items: { type: 'string' },
          minItems: 2,
          maxItems: 10,
          description: 'Poll options (2-10 items)',
        },
        is_anonymous: {
          type: 'boolean',
          description: 'Whether the poll is anonymous (default: true)',
        },
        type: {
          type: 'string',
          enum: ['quiz', 'regular'],
          description: 'Poll type (default: regular)',
        },
      },
      required: ['question', 'options'],
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Create and send' implies a write operation, it lacks details on permissions, rate limits, error handling, or what happens after sending (e.g., poll visibility). For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 front-loads the core action and resource without unnecessary words. Every part earns its place by directly stating the tool's function, making it highly concise and well-structured.

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?

Given the complexity of a mutation tool (creating and sending a poll) with no annotations and no output schema, the description is incomplete. It doesn't cover behavioral aspects like authentication needs, side effects, or response format, leaving gaps that could hinder an agent's ability to use the tool effectively.

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 fully documents all parameters (question, options, type, is_anonymous) with details like defaults and constraints. The description adds no additional parameter semantics beyond what's in the schema, resulting in a baseline score of 3 as the schema handles the heavy lifting.

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 ('Create and send') and resource ('a poll to the Telegram channel'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like send_message or send_photo, which could also involve Telegram channel interactions, leaving some ambiguity about when to choose this specific tool.

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. It doesn't mention prerequisites (e.g., channel access), exclusions, or comparisons to siblings like send_message for non-poll content. Without such context, the agent must infer usage based on the tool name alone.

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