Skip to main content
Glama
Telegram MCP Server

Telegram MCP Server

by lyduchuy1204

leave_or_delete_chats

Destructive

Bulk-clean Telegram junk chats by leaving groups and channels, deleting private or bot conversations, and optionally blocking users.

Instructions

Clean up junk chats in bulk.

group / channel: leave it and remove it from your chat list. private chat / bot: delete the chat for you; block_users=True also blocks the user or bot.

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": {
      "chats": "<chats>"
    },
    "name": "leave_or_delete_chats"
  }
}

Input Schema

NameRequiredDescriptionDefault
chatsYes
dry_runNo
block_usersNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior3/5

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

The annotations already declare destructiveHint=true, readOnlyHint=false and openWorldHint=true, and the description adds genuinely useful specifics about what gets destroyed per chat type and that block_users=True blocks the user/bot. However it completely omits the dry_run default of true, which is a critical behavioral trait — an agent may call the tool expecting deletion and instead get a no-op preview. It also says nothing about partial failures or return values.

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?

Short, front-loaded and organized as an intent line followed by per-chat-type behavior bullets, with no filler. The only structural weakness is that the critical dry_run default is absent rather than merely brief.

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?

For a destructive bulk mutation with zero schema description coverage and no output schema, the description should cover the dry_run safety default, the format of the chats array, and what a call returns (counts, skipped chats, errors). It covers only block_users, leaving the agent under-informed about how to invoke this safely and correctly.

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

Parameters2/5

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

Schema description coverage is 0%, so the description carries the full burden, and it only covers two of three parameters. It explains block_users precisely, but dry_run — the most consequential parameter, defaulting to true — is never mentioned, and the format of the chats array (IDs vs usernames vs links) is left unspecified.

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 names a specific verb+resource ('Clean up junk chats in bulk') and then spells out the two distinct outcomes: group/channel chats are left and removed from the chat list, while private chats/bots are deleted. An agent can distinguish this from archive_chats or clear_chat_history by the per-chat-type behavior, though it never names those siblings explicitly.

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

Usage Guidelines3/5

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

The phrase 'Clean up junk chats in bulk' implies the use case (bulk removal of unwanted chats), but there is no explicit when-to-use/when-not guidance and no mention of the nearby alternatives such as archive_chats, which is the non-destructive option an agent would want to compare against. Usage is inferable, not stated.

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