Skip to main content
Glama

Get Telegram Media

tg_get_media
Read-only

[Not included in your plan — calling it returns a plan_required refusal; wa_get_plan's excluded_tools lists what your plan leaves out.] Download the attachment from a received Telegram message — image, video, audio or document. For a WhatsApp attachment use wa_get_media.

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": {
      "message_id": "<message_id>"
    },
    "name": "tg_get_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
account_idNothe Telegram account that received the message, from wa_list_accounts; omit it when the workspace has only one Telegram account
message_idYesthe message id whose attachment to fetch, from tg_list_messages (a Telegram message id of the form <chat>_<n>)

Output Schema

NameRequiredDescriptionDefault
mimeNo
sizeNothe attachment size in bytes
statusYesok (media returned, inline or as a url) or refused
refusalNo
media_urlNoa time-limited (1h) URL to GET a large attachment's bytes, present instead of media_base64 when the attachment is over the inline cap
media_base64Nobase64 of the attachment, present for a small attachment

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and idempotentHint; the description adds genuinely non-obvious behavior — that the call is plan-gated and will return a plan_required refusal, plus a pointer to wa_get_plan's excluded_tools. It does not say what happens when the message carries no media or whether downloads expire, so it is strong but not complete.

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?

Three tight clauses: an availability warning, a statement of function, and a cross-platform redirect. Everything is front-loaded with no filler, though the bracketed plan note is slightly dense and could be trimmed without losing meaning.

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?

With an output schema present, return values need no explanation, and the schema covers both parameters fully. The description supplies platform disambiguation and plan gating, leaving only minor gaps around non-media messages and download constraints for a read-only fetch 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 coverage is 100% and both parameters are documented in-schema, including the <chat>_<n> id format and the single-account omission rule for account_id. The description adds no parameter meaning beyond that, so the baseline of 3 is appropriate.

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 and resource ("Download the attachment from a received Telegram message") and enumerates the payload types (image, video, audio, document). It also names the cadence sibling it is not (wa_get_media for WhatsApp), so the agent can distinguish it 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 explicit routing guidance: use this for Telegram attachments, use wa_get_media for WhatsApp attachments, and warns that calling under the current plan returns a plan_required refusal. It stops short of covering edge cases such as messages with no attachment or how to locate the tool's alternatives via wa_get_plan in detail.

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