Skip to main content
Glama

Set channel post pin

telegram_set_post_pinned
Idempotent

Pin or unpin one specific channel post. Confirm the channel, post and desired pinned state first. Never unpins all posts. Requires owner or administrator access and Edit messages permission for both you and the bot. Use an already connected Session where supported; preserve source, coverage and actual errors. Do not suggest connecting or reconnecting Session unless the user explicitly asks for Session setup. Never switch sender automatically or request login codes/passwords in chat.

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": {
      "channel_id": "<channel_id>",
      "request_id": "<request_id>",
      "confirmed": "<confirmed>",
      "message_id": "<message_id>",
      "pinned": "<pinned>"
    },
    "name": "telegram_set_post_pinned"
  }
}

Input Schema

NameRequiredDescriptionDefault
pinnedYes
confirmedYesTrue only after showing the channel, exact content/button destinations or target post/action and receiving explicit user confirmation.
channel_idYesChannel chat_id returned by telegram_list_chats or telegram_find_chat, connected through /channels.
message_idYesPost message_id from this channel, not an ID from its discussion group.
request_idYesUnique key for this user-approved action. Reuse the same key for retries; never generate a new one to retry uncertain delivery.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare the operation is not read-only but non-destructive and idempotent, so the description's real contribution is the permission model (owner/administrator plus Edit messages for both user and bot) and the scoping guarantee that a single post is affected rather than all pins. That is genuinely useful context beyond structured fields, though it says nothing about what the response looks like or what happens when the target post is already in the requested state.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and confirmation rule are correctly front-loaded and the sentences are individually short. However, the closing block about Session reuse, not suggesting reconnects, not switching senders, and not requesting login codes reads as generic cross-tool agent policy rather than information needed to select or invoke this pinning tool, so it dilutes the signal without breaking clarity.

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 five-parameter mutation with no output schema, the definition covers the essentials an agent needs before calling: authorization requirements, the confirmation precondition, the single-post scope, and retry-safe behavior (reinforced by the idempotent annotation). The only real gap is outcome behavior — success/failure indication and already-pinned handling — which is minor given the annotation set.

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

Parameters4/5

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

Schema coverage is 80%, so the baseline would be 3, but the description adds real meaning to two parameters: 'Confirm the channel, post and desired pinned state first' explains the ordering role of the `confirmed` flag, and 'Never unpins all posts' clarifies that `pinned=false` targets only the identified `message_id` rather than clearing the channel. It still adds nothing about `request_id` retry semantics, which the schema already covers in detail.

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 opening sentence gives a precise verb pair ('pin or unpin') and a tightly bounded resource ('one specific channel post'), and the scope line 'Never unpins all posts' removes the most likely ambiguity. It does not name a sibling tool (e.g., a bulk-unpin or delete-post alternative), so an agent must still infer differentiation from scope rather than from an explicit contrast.

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 states prerequisites ('Requires owner or administrator access and Edit messages permission') and a hard usage rule ('Confirm the channel, post and desired pinned state first'), which tells the agent how to invoke it correctly. What it lacks is any routing guidance to alternatives — there is no statement of when to use this versus editing, deleting, or reacting to a post, and no explicit 'do not use this for X' beyond the bulk-unpin exclusion.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources