get_message_media
Download and decrypt one LINE media message (image, video, audio, file) using chat and message IDs; convert PDFs to PNG for image reading.
Instructions
Download and decrypt one LINE media message of any downloadable type (image, video, audio, file). Returns image/audio MCP content, or an embedded resource blob (with filename when known) for video/file. Set asImage=true to convert a PDF attachment to a PNG image (first page) so it can be read as MCP image content. Non-media messages (text, sticker refs, unsupported types) return an honest error naming the content type — never fabricated bytes.
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": {
"chat_id": "<chat_id>",
"message_id": "<message_id>"
},
"name": "get_message_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asImage | No | If true and the attachment is a PDF, convert the first page to a PNG image and return it as MCP image content instead of a resource blob. | |
| chat_id | Yes | LINE chat/group/room MID the message belongs to. Required to locate E2EE key material. | |
| preview | No | Fetch the smaller preview object instead of the full-resolution original (images/video only). | |
| message_id | Yes | LINE message id, as returned by get_chat_messages. |