Skip to main content
Glama

Get Telegram Message

tg_get_message
Read-only

Fetch one stored Telegram message by its id or cursor — the one a webhook announced, say. For a WhatsApp message use wa_get_message.

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": "tg_get_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
cursorNothe message's cursor, as tg_list_messages returned it (a webhook delivery carries it as message_seq). Pass this or message_id
account_idNothe Telegram account the message belongs to, from wa_list_accounts; omit it when the workspace has only one Telegram account
message_idNothe message's Telegram id — the message_id a webhook delivery, tg_list_messages or tg_send_message gave you. Pass this or cursor
include_media_urlsNoalso return attachment.media_url when the message carries an available attachment — a time-limited (1h) signed URL to GET the bytes with plain HTTP instead of a tg_get_media call; off by default

Output Schema

NameRequiredDescriptionDefault
messageNothe message; absent when the request was declined
refusalNopresent only when the request was declined — including when no such message is stored
account_noticesNopresent when a number this read covers is not working: new messages are not arriving on it; says why and what to do

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and idempotentHint=false, so the safety profile is covered. The description adds modest context by calling the message 'stored' and tying it to webhook delivery, but says nothing about failures (unknown id, ambiguous account) or the fact that include_media_urls yields a short-lived URL — that detail lives only in the schema.

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

Conciseness5/5

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

Two short sentences, the primary action and lookup keys front-loaded, with the sibling routing tucked at the end. No filler or repeated schema detail.

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?

An output schema and full annotation coverage carry the return-shape and safety burden, so the description needn't explain them. It covers storage semantics, lookup keys, and platform routing; the only minor gap is what happens when both keys are supplied or when the account is ambiguous.

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 (cursor, account_id, message_id, include_media_urls) are already documented in detail, including the 1h signed URL behavior. The description only echoes the id-or-cursor lookup choice, adding no syntax or precedence rule for supplying both. Baseline 3 applies.

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 (fetch) and resource (one stored Telegram message) plus the two lookup keys (id or cursor). It also names the sibling it is not: 'For a WhatsApp message use wa_get_message.' An agent can choose between the two without opening either schema.

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 a concrete trigger scenario ('the one a webhook announced, say') and an explicit platform-based alternative routing to wa_get_message. It doesn't spell out the boundary against tg_list_messages or say what to do when neither id nor cursor is known, so it falls short of fully explicit when/when-not guidance.

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