Skip to main content
Glama
grammy-mcp
by louietyj

unpinAllChatMessages

Destructive

Clear all pinned messages from a Telegram chat by providing its chat ID; use it to remove pinned content in private chats, groups, or channels when bot rights allow.

Instructions

Use this method to clear the list of pinned messages in a chat. In private chats and channel direct messages chats, no additional rights are required to unpin all pinned messages. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin all pinned messages in groups and channels respectively. Returns True on success.

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

Input Schema

NameRequiredDescriptionDefault
chat_idYesUnique identifier for the target chat or username of the target channel in the format `@username`

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/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, so the mutation profile is covered. The description adds genuinely new behavioral context beyond that: the exact permission model per chat type and the fact that it returns True on success. It does not state what happens when the chat has no pins or whether the operation is idempotent.

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?

Three sentences, front-loaded with the action, then permissions, then the return value. Dense with no filler, though the permission sentence is slightly convoluted in its 'groups and channels respectively' construction.

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 one-parameter mutation with no output schema, the definition covers action, authorization requirements, and success signal. Edge cases such as an empty pin list or failure modes are absent but are not critical for correct invocation.

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?

There is a single required parameter with 100% schema description coverage, so the schema fully documents chat_id including the @username form. The description adds nothing about the parameter, which is the expected baseline when the schema already does the work.

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 opens with a specific verb and resource: 'clear the list of pinned messages in a chat'. That is unambiguous and distinguishes it in spirit from single-message unpinning, though it never names the sibling tool (unpinChatMessage) that handles the singular case.

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?

It gives useful conditional guidance on prerequisites: no extra rights in private chats and channel DMs, but admin rights with 'can_pin_messages' or 'can_edit_messages' in groups and channels respectively. That is prerequisite context rather than when-to-use-vs-alternative guidance; it never says to use unpinChatMessage when targeting a single pin.

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

Deploy Server

Other Tools