Get media metadata
get_media_infoRetrieve 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
| Name | Required | Description | Default |
|---|---|---|---|
| peer | Yes | Chat reference: { kind:'id', value:'<decimal id>' } | { kind:'username', value:'@name' } | { kind:'me' }. | |
| messageId | Yes | A positive per-chat message id. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | Media classification. | |
| width | No | Media width in pixels. | |
| height | No | Media height in pixels. | |
| mime_type | No | Sender-controlled MIME type (untrusted). | |
| size_bytes | No | Media size in bytes. | |
| untrusted_text | No | Attacker-controlled file name (untrusted). | |
| duration_seconds | No | Audio/video duration in seconds. |