Skip to main content
Glama
grammy-mcp
by louietyj

unpinChatMessage

Destructive

Removes a message from a chat's pinned messages, letting you target a specific message ID or the latest pinned item. Use it to clear outdated pins.

Instructions

Use this method to remove a message from the list of pinned messages in a chat. In private chats and channel direct messages chats, all messages can be unpinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin 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": "unpinChatMessage"
  }
}

Input Schema

NameRequiredDescriptionDefault
chat_idYesUnique identifier for the target chat or username of the target channel in the format `@username`
message_idNoIdentifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.
business_connection_idNoUnique identifier of the business connection on behalf of which the message will be unpinned

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/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 known from structured data. The description adds valuable context beyond that: the per-chat-type permission requirements and the 'Returns True on success' outcome. Missing is any note that unpinning is reversible by re-pinning or what happens if the message isn't pinned; with annotations carrying the safety profile, a 3 is fair.

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?

Three tight sentences: action first, then permission constraints, then return value. No filler, and the most important information leads.

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 mutation with no output schema, the description covers permissions and the success signal, which is what an agent needs to call it safely. The only gap is routing to the bulk alternatives (unpinAllChatMessages, unpinAllForumTopicMessages) when the goal is broader than one message.

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 100%, including the useful default that an omitted message_id unpins the most recent pinned message, so the schema does the heavy lifting. The description adds no parameter-level meaning beyond it (e.g. no comment on business_connection_id). Baseline 3 applies.

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?

"Use this method to remove a message from the list of pinned messages in a chat" names a specific verb (remove/unpin) and resource (pinned message in a chat), which clearly separates it from message-editing or sending siblings. It does not, however, distinguish itself from unpinAllChatMessages or pinChatMessage, so the differentiation stops short of the top band.

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 gives concrete usage conditions: unpinning is unrestricted in private chats and channel DMs, but requires 'can_pin_messages' in groups or 'can_edit_messages' in channels. That is a real precondition an agent needs. It stops short of naming when to pick this versus unpinAllChatMessages, so not a 5.

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