Skip to main content
Glama
bobidk91-ops

Telegram MCP Server

by bobidk91-ops

delete_message

Remove a specific message from a Telegram channel using its unique message ID to maintain content accuracy and channel management.

Instructions

Delete a message from the channel

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
message_idYesMessage ID to delete

Implementation Reference

  • Handler for delete_message tool: extracts message_id from args, calls bot.deleteMessage, and returns success message.
    case 'delete_message': {
      const { message_id } = args as { message_id: number };
      
      const result = await bot.deleteMessage(CHANNEL_ID, message_id);
      
      return {
        content: [
          {
            type: 'text',
            text: `✅ Message deleted successfully!\n\n📱 Channel: ${CHANNEL_ID}\n📝 Message ID: ${message_id}`,
          },
        ],
      };
    }
  • Schema definition for delete_message tool in the ListTools response, specifying input as object with required number message_id.
    {
      name: 'delete_message',
      description: 'Delete a message',
      inputSchema: {
        type: 'object',
        properties: {
          message_id: {
            type: 'number',
            description: 'ID of the message to delete',
          },
        },
        required: ['message_id'],
      },
    },
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 'Delete' implies a destructive mutation, the description lacks details on permissions required, whether deletion is permanent or reversible, rate limits, or error conditions (e.g., invalid message ID). This leaves significant gaps for safe and effective use.

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, clear sentence with zero waste—it directly states the tool's function without unnecessary words. It's front-loaded and efficiently communicates the core action, making it easy to parse quickly.

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 tool's destructive nature (implied by 'Delete'), no annotations, and no output schema, the description is incomplete. It doesn't address critical aspects like success/error responses, side effects, or security considerations, which are essential for a mutation tool in a messaging context with sibling operations.

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%, with the single parameter 'message_id' documented as 'Message ID to delete'. The description doesn't add any meaning beyond this, such as format examples or sourcing instructions. With high schema coverage, the baseline score of 3 is appropriate, as the schema handles the parameter documentation adequately.

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 ('Delete') and the resource ('a message from the channel'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its siblings (like 'edit_message' or 'send_message'), which would require specifying what makes deletion distinct from other message operations.

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., needing message ID), exclusions (e.g., cannot delete messages from other users), or comparisons to sibling tools (like 'edit_message' for modifications instead of deletion).

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