Skip to main content
Glama
grammy-mcp
by louietyj

pinChatMessage

Add a message to a chat's pinned messages so important content stays visible. Specify the chat and message IDs; bots need pin or edit rights in groups and channels.

Instructions

Use this method to add a message to the list of pinned messages in a chat. In private chats and channel direct messages chats, all non-service messages can be pinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to pin 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>",
      "message_id": "<message_id>"
    },
    "name": "pinChatMessage"
  }
}

Input Schema

NameRequiredDescriptionDefault
chat_idYesUnique identifier for the target chat or username of the target channel in the format `@username`
message_idYesIdentifier of a message to pin
disable_notificationNoPass True if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats.
business_connection_idNoUnique identifier of the business connection on behalf of which the message will be pinned

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already flag this as a non-read-only, open-world, non-destructive mutation. The description adds genuinely useful context beyond them: the admin-rights prerequisite and the success return value. It stops short of saying what happens to existing pins or whether a pin replaces the previous one.

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 tight sentences, each carrying a distinct fact (action, permissions, return value), with the core operation front-loaded. No filler or repetition.

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 four-parameter mutation with a fully documented schema and no output schema, the description covers action, permissions, and the 'Returns True on success' outcome. The only meaningful omission is interaction with prior pins, which is minor for this tool's complexity.

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%, so all four parameters (chat_id, message_id, disable_notification, business_connection_id) are already documented. The description adds nothing parameter-specific beyond what the schema covers — its notification note duplicates the disable_notification description verbatim in substance. 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?

States a specific verb+resource: "add a message to the list of pinned messages in a chat." An agent can immediately tell this pins a message rather than unpinning (unpinChatMessage) or sending. No explicit sibling naming, so not quite a 5.

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 preconditions: non-service messages in private chats and channel DMs can be pinned, while groups/channels require administrator rights ('can_pin_messages' or 'can_edit_messages'). That effectively tells the caller when the call will succeed, though it never names unpinChatMessage as the counterpart operation.

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