Skip to main content
Glama
mcp-telegram-agent

mcp-telegram-agent

answer_callback_query

Acknowledge a Telegram callback button press to stop its loading spinner and optionally display a text message, alert, or open a URL; invoke immediately after receiving the callback query.

Instructions

Acknowledge a callback button press so the loading spinner on the button stops.

對使用者點擊的行內按鈕回應,關閉按鈕上的載入動畫;text 可顯示小提示。
callback_query_id 來自 get_updates / wait_for_reply 的 callback_query 事件。

url 傳入時以開啟網址取代 text 提示(須為 http/https 開頭),
並與 text 互斥(兩者不可同時傳入);cache_time 為結果快取秒數
(0-604800),預設 0。
show_alert=True 時必須帶 text,否則回傳錯誤。
注意:callback_query 只有數秒有效,get_updates / wait_for_reply 回傳後
應立刻呼叫本工具;輪詢架構下若間隔過長會收到 query is too old,
建議搭配 wait_for_reply 的長輪詢,或背景常駐輪詢並立即應答。

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": {
      "callback_query_id": "<callback_query_id>"
    },
    "name": "answer_callback_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNo
textNo
cache_timeNo
show_alertNo
callback_query_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.1

TDQS

A4.9/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the full burden and does so: it discloses the short validity window of callback_query, the resulting 'query is too old' error, the hard constraint that show_alert=True requires text or the call errors, the url/text mutual exclusion, and the cache_time range (0–604800, default 0). These are behavioral constraints and failure modes not present in any structured field.

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?

Front-loads the purpose in one English sentence and then packs each remaining line with a distinct constraint, with almost no filler. The mixed-language layout (one English sentence followed by a Chinese body) and mid-sentence line breaks slightly fragment readability, which keeps it off a 5.

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?

For a 5-parameter mutation-adjacent tool with no annotations, the description covers purpose, invocation timing, parameter semantics, mutual exclusion, error conditions, and polling architecture guidance. An output schema exists, so the absence of return-value documentation is not a gap.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate, and it does for all five parameters: callback_query_id's origin, text's display role, url's http/https requirement and exclusivity with text, cache_time's bounds and default, and show_alert's dependency on text. This adds real meaning well beyond the bare property names and defaults in the schema.

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?

Opens with a specific verb+resource+effect: 'Acknowledge a callback button press so the loading spinner on the button stops.' It also ties the input to its sibling source ('callback_query_id 來自 get_updates / wait_for_reply 的 callback_query 事件'), so an agent can place this tool relative to get_updates/wait_for_reply without opening any schema.

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?

Gives explicit when-to-use guidance — call immediately after get_updates/wait_for_reply returns a callback_query event — plus an architectural recommendation (use wait_for_reply long polling, or a resident background poller that answers instantly) and a stated failure mode ('query is too old'). It also states the mutual-exclusion rule between url and text, which is a when-not condition.

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