Skip to main content
Glama

messages_press_button

Destructive

Press a button under a message in a Telegram chat, as the connected Telegram account: the inline menus bots such as @BotFather reply with. Name the button by its exact label.

Returns the message as it looks after the press (bots usually edit it into the next menu) and anything the bot sent after it, each with its own buttons and a message_id you can pass back to press the next one.

Refused: buttons that need the account's cloud password (the owner confirms those in the Telegram app), and buttons that share a phone number or location, pay, or open a web app. A link button is not pressed; its URL is returned. A label that matches no button returns the buttons that exist.

Get the message_id from messages.read_history. Telegram user accounts only; a bot account cannot press buttons.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thread_idYesThread containing the message (numeric DB id or channel_ref like 'telegram:123456789').
message_idYesMessage the button is under: a DB id from messages.read_history, or a 'telegram:<id>' returned by a previous press.
button_textYesThe button's label, exactly as shown (case is ignored if nothing matches exactly).
in_workspaceNoRun this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / in_workspace
      Added value: +{
      +  "description": "Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.",
      +  "type": "integer"
      +}
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only give the generic destructive/non-idempotent/openWorld profile, but the description discloses the specific refusals (cloud-password buttons, phone/location sharing, pay, web apps) and why ('the owner confirms those in the Telegram app'). It also describes the return payload — the edited message plus subsequent bot messages with their own buttons and message_ids — which no annotation conveys.

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?

It is front-loaded with the action and what is returned, then the refusals and prerequisites. Four sentences for this much behavior is efficient, though a couple of return-value details pad it slightly beyond the minimum an agent needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description carries the return-value burden and does so fully: post-press message state, follow-on bot messages, per-message buttons and message_ids. Account-type restriction, refusal cases, and the id-hop pattern round out a complete picture for a 4-param, non-idempotent, destructive tool.

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 the meaning of thread_id, message_id, button_text, and in_workspace is already documented, making 3 the baseline. The description adds only marginal param-level value: it reiterates the exact-label requirement (case ignored) and the message_id chaining workflow, both of which the schema already states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a precise verb+resource+scope: 'Press a button under a message in a Telegram chat, as the connected Telegram account,' and immediately narrows it to the inline menus bots like @BotFather reply with. This is unmistakably distinct from siblings such as messages_send, messages_read_history, or browser_click.

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

Usage Guidelines5/5

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

It states the prerequisite source of message_id ('Get the message_id from messages.read_history'), the account constraint ('Telegram user accounts only; a bot account cannot press buttons'), and the conditions under which the tool will not act. The alternatives are handled explicitly: link buttons are not pressed but returned, and non-matching labels return the buttons that exist.

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.