Skip to main content
Glama
Telegram MCP Server

Telegram MCP Server

by lyduchuy1204

clear_chat_history

Destructive

Delete all messages from a Telegram chat while keeping the chat in your list; optionally clear messages for everyone in private chats or as a supergroup admin.

Instructions

Wipe ALL messages in a chat but keep the chat in your list.

Private chats, bots and small groups: cleared for you (for_everyone=True also clears the other side of a private chat). Supergroups: for_everyone needs admin rights. Broadcast channels cannot be cleared; use leave_or_delete_chats instead.

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": "<chat>"
    },
    "name": "clear_chat_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
chatYes
dry_runNo
for_everyoneNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds real value on top: the permission requirement for for_everyone in supergroups, the cross-side effect in private chats, and the fact that channels are rejected outright. The notable omission is the dry_run default of true — the fact that the call is a no-op unless explicitly turned off is a major behavioral trait disclosed only by a schema default with no explanation.

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?

Front-loaded one-sentence summary of the effect, followed by compact per-chat-type clauses. Every sentence carries a distinct constraint; nothing is redundant with the annotations or schema.

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

Completeness4/5

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

For a destructive, no-output-schema mutation this covers the essential context: what is destroyed, what survives, permission requirements, and the unsupported case with a redirect. Incomplete only on the dry_run default and on what happens to the messages after the wipe (irreversibility).

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 0%, so the description must carry parameter meaning. It explains for_everyone well (per-chat-type semantics plus admin-rights requirement), but says nothing about the required chat identifier's accepted format, and dry_run — the parameter that decides whether anything actually happens — is never mentioned despite defaulting to true.

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?

States a specific verb and resource with explicit scope: "Wipe ALL messages in a chat but keep the chat in your list." The retention clause (chat stays in the list) is exactly what separates this from delete_chat/leave_or_delete_chats, and the sibling routing is named explicitly.

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?

Gives concrete when-it-works/when-it-doesn't guidance by chat type (private/bot/small group vs supergroup vs broadcast channel) and names the alternative, leave_or_delete_chats, for the unsupported case. It does not disambiguate against the closer siblings delete_messages and delete_my_messages, which are partial-clear alternatives an agent would plausibly consider.

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