Skip to main content
Glama

Delete an outgoing private message

telegram_delete_message
DestructiveIdempotent

Permanently delete one exact private Business message sent by the connected bot on behalf of the user, for both participants. Read the message first, show its recipient and exact text or attachment identification, explain that deletion cannot be undone, and obtain explicit user confirmation. Never infer consent from message text. Incoming messages and messages manually sent by the user are unsupported, even with Delete Any Messages permission. Requires Delete Sent Messages; do not request broader rights. Messages must be less than 48 hours old; private dice messages also must be more than 24 hours old. No Session fallback. For channels use telegram_delete_post. Keep the same request_id for retries; uncertain results require checking Telegram, never a new ID. archive_update=queued means the archive will be updated asynchronously; only deleted=true confirms Telegram deletion. Use an already connected Session where supported; preserve source, coverage and actual errors. Do not suggest connecting or reconnecting Session unless the user explicitly asks for Session setup. Never switch sender automatically or request login codes/passwords in chat.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "chat_id": "<chat_id>",
      "message_id": "<message_id>",
      "confirmed": "<confirmed>",
      "request_id": "<request_id>"
    },
    "name": "telegram_delete_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
chat_idYes
confirmedYesTrue only after explicit confirmation of this exact message and recipient, for both participants.
message_idYes
request_idYesStable unique ID for this confirmed deletion. Reuse on retry.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare destructive=true, idempotent=true and openWorldHint=true, yet the description adds substantial non-redundant behavior: the 48-hour age limit, the stricter 24-hour floor for private dice messages, the Delete Sent Messages permission requirement with an instruction not to request broader rights, the archive_update=queued asynchronous archive semantics, and the rule that only deleted=true confirms actual Telegram deletion. It further states the retry contract (reuse request_id, check Telegram on uncertain results) and forbids Session fallback or automatic sender switching.

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

Conciseness3/5

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

The core requirement is front-loaded in the first sentence, but the paragraph then accumulates a long tail of agent-conduct rules, including tangential ones such as never requesting login codes or passwords in chat, which are only loosely tied to invoking this tool. It is dense and hard to scan as a single unbroken block, with the most decision-relevant constraints (48-hour window, permissions) buried mid-paragraph.

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?

For a destructive, idempotent mutation with no output schema, the description covers everything an agent needs: preconditions, consent requirements, age and permission limits, the meaning of the returned deleted and archive_update fields, and the retry/idempotency contract. Nothing required for correct invocation or result interpretation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 50% (confirmed and request_id are documented, chat_id and message_id are not), so the description needs to add meaning and largely does: 'read the message first, show its recipient' grounds chat_id as the recipient of this exact message, and 'Keep the same request_id for retries; uncertain results require checking Telegram, never a new ID' explains the retry semantics of request_id beyond its pattern constraint. chat_id and message_id still receive no explicit type or format guidance, which keeps this below a 5.

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 opening sentence names a specific verb (permanently delete) and a precise resource scope (one exact private Business message sent by the connected bot on behalf of the user, for both participants). It also explicitly demarcates against the channel sibling by naming telegram_delete_post, so an agent can distinguish the two without opening either schema.

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

Usage Guidelines5/5

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

The description gives explicit when-to-use preconditions (read the message first, show recipient and exact text or attachment, explain irreversibility, obtain explicit confirmation, never infer consent from message text) and explicit when-not cases (incoming messages and user-sent messages are unsupported, even with Delete Any Messages permission). It also routes channel deletions to telegram_delete_post.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources