Skip to main content
Glama
TONresistor

Telegram MCP Server

by TONresistor

deleteMessage

Deletes a message from a chat within 48 hours, subject to bot permissions and service-message restrictions. Also handles dice messages with specific time limits.

Instructions

Delete a message, including service messages, with the following limitations: A message can only be deleted if it was sent less than 48 hours ago. Service messages about a supergroup, channel, or forum topic creation can't be deleted. A dice message in a private chat can only be deleted if it was sent more than 24 hours ago. Bots can delete outgoing messages in private chats, groups, and supergroups. Bots can delete incoming messages in private chats. Bots granted can_post_messages permissions can delete outgoing messages in channels. If the bot is an administrator of a group, it can delete any message there. If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there. Returns True on success.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chat_idYesUnique identifier for the target chat or username of the target channel (in the format @channelusername).
message_idYesIdentifier of the message to delete.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and does so thoroughly. It discloses deletion limitations, the 48-hour window, specific exceptions for dice messages and creation service messages, permission requirements across chat types, and the success return value. This is far beyond the bare operation name.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but every sentence adds necessary information about deletion constraints and permissions. It is front-loaded with the core action and the most important qualifier. It could be tightened with bullet points for readability, but there is no wasted content.

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

Completeness5/5

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

Given a simple two-parameter tool with no annotations and no output schema, this description is unusually complete. It covers all essential edge cases: service messages, time limits, dice messages, bot permissions, channel/supergroup/group behavior, and the return value. An agent has enough information to know when the call will succeed or fail.

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?

The input schema already documents both parameters fully, including chat_id format and message_id meaning, with 100% schema description coverage. The description adds no extra parameter-level detail beyond what the schema provides, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description begins with 'Delete a message' which is a specific verb and resource, and adds the key qualifier 'including service messages.' It clearly identifies the tool's function and is distinguishable from the sibling deleteMessages, which targets multiple messages.

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

Usage Guidelines4/5

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

The description provides rich context on when deletion is allowed, including time limits, message types, bot permissions, and chat types. However, it does not explicitly compare against the sibling deleteMessages tool or state when to prefer one over the other, so it lacks explicit alternative routing.

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/TONresistor/telegram-mcp'

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