Skip to main content
Glama
grammy-mcp
by louietyj

getUpdates

Receives incoming Telegram updates via long polling for bot processing; recalculate the offset after each response to prevent duplicate updates.

Instructions

Use this method to receive incoming updates using long polling (wiki). Returns an Array of Update objects.

Notes

  1. This method will not work if an outgoing webhook is set up.

  2. In order to avoid getting duplicate updates, recalculate offset after each server response.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "getUpdates"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoLimits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.
offsetNoIdentifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will be forgotten.
timeoutNoTimeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.
allowed_updatesNoA list of the update types you want your bot to receive. For example, specify ["message", "edited_channel_post", "callback_query"] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member, message_reaction, and message_reaction_count (default). If not specified, the previous setting will be used. Please note that this parameter doesn't affect updates created before the call to getUpdates, so unwanted updates may be received for a short period of time.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false, openWorldHint=true, destructiveHint=false; the description's note about confirming updates via offset is consistent with a non-read-only tool and adds useful context about queue state being consumed. However, it does not mention blocking behavior of long polling (timeout), what happens to the update queue when a webhook is installed, or any error/conflict response, so the behavioral picture is partial.

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-loaded purpose sentence followed by a numbered notes block, both of which carry real information. The '(wiki)' pointer is minor filler but nothing else is redundant.

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, fully schema-documented tool with no output schema, the description covers the return type, the failure mode, and the offset discipline. Remaining gaps (conflict errors, blocking duration) are secondary and largely covered by the timeout parameter description.

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 100% so the parameters are already documented in detail, but the description adds meaning beyond the schema: that offset must be recalculated after each response and that this is what prevents duplicate delivery, plus the webhook precondition. That stateful confirmation model is the key non-obvious semantic.

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?

States a specific verb+resource (receive incoming updates), the mechanism (long polling), and the return shape (Array of Update objects). An agent can immediately tell this is the polling-based ingress point rather than a query for some stored resource.

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?

Explicitly gives a when-not condition ('will not work if an outgoing webhook is set up') and an operational rule ('recalculate offset after each server response'), which tells the agent how to use it correctly in a loop. It does not name the webhook-management alternative tool, only linking a wiki, so routing is implied rather than spelled out.

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