Skip to main content
Glama
secure-telegram-mcp

secure-telegram-mcp

Get media metadata

get_media_info
Read-only

Retrieve metadata only—kind, MIME type, byte size, dimensions, duration, and file name—for media attached to one Telegram message without downloading the file.

Instructions

Return METADATA ONLY (kind, mime type, size in bytes, dimensions, duration, file name) for the media attached to a single in-scope message. Does NOT download bytes. The file name is untrusted and is surfaced under a named key, never as a bare instruction-bearing string.

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": {
      "peer": "<peer>",
      "messageId": "<messageId>"
    },
    "name": "get_media_info"
  }
}

Input Schema

NameRequiredDescriptionDefault
peerYesChat reference: { kind:'id', value:'<decimal id>' } | { kind:'username', value:'@name' } | { kind:'me' }.
messageIdYesA positive per-chat message id.

Output Schema

NameRequiredDescriptionDefault
kindYesMedia classification.
widthNoMedia width in pixels.
heightNoMedia height in pixels.
mime_typeNoSender-controlled MIME type (untrusted).
size_bytesNoMedia size in bytes.
untrusted_textNoAttacker-controlled file name (untrusted).
duration_secondsNoAudio/video duration in seconds.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered; the description adds real value beyond that by confirming no bytes are transferred and by warning that the file name is untrusted and surfaced under a named key rather than as a bare string. That prompt-injection-relevant detail is not derivable from any structured field. It does not address the notable idempotentHint=false for what reads like a pure read, nor error behavior for out-of-scope messages.

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?

Three short sentences, each earning its place: capability and scope first, the negative constraint second, the untrusted-input caveat last. The parenthetical field list is compact and the 'METADATA ONLY' capitalization front-loads the key distinction.

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 two-parameter read tool with an output schema and full annotation coverage, the description supplies the essential behavioral context: no bytes, metadata fields only, untrusted filename handling. The remaining gap is the undefined term 'in-scope', which an agent must infer means chats the account can access.

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%, with both peer and messageId fully documented including the anyOf variants, so the schema carries the parameter burden. The description adds only the vague phrase 'in-scope message' and no format or constraint detail beyond the schema. Baseline 3 applies when structured data does the heavy lifting.

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 ('Return METADATA ONLY ... for the media attached to a single in-scope message') and immediately distinguishes itself from byte-returning siblings with 'Does NOT download bytes.' An agent can separate it from download_media, prepare_media, and send_media 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 Guidelines4/5

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

The 'METADATA ONLY ... Does NOT download bytes' framing makes the selection condition clear relative to byte-fetching siblings, and 'single in-scope message' signals the scope restriction. It stops short of naming download_media as the explicit alternative or stating what to do when the message is out of scope, so it is strong but not fully prescriptive.

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