Skip to main content
Glama
yomi

yomi

Official
by RikaiDev

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

NameRequiredDescriptionDefault
asImageNoIf 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_idYesLINE chat/group/room MID the message belongs to. Required to locate E2EE key material.
previewNoFetch the smaller preview object instead of the full-resolution original (images/video only).
message_idYesLINE message id, as returned by get_chat_messages.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.7.2
    • addedInput schema / properties / asImage
      Added value: +{
      +  "description": "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.",
      +  "type": "boolean"
      +}
    • removedInput schema / properties / chatId
      Removed value: -{
      -  "description": "LINE chat/group/room MID the message belongs to. Required to locate E2EE key material.",
      -  "type": "string"
      -}
    • addedInput schema / properties / chat_id
      Added value: +{
      +  "description": "LINE chat/group/room MID the message belongs to. Required to locate E2EE key material.",
      +  "type": "string"
      +}
    • removedInput schema / properties / messageId
      Removed value: -{
      -  "description": "LINE message id, as returned by get_chat_messages.",
      -  "type": "string"
      -}
    • addedInput schema / properties / message_id
      Added value: +{
      +  "description": "LINE message id, as returned by get_chat_messages.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "chatId",
      -  "messageId"
      -]New value: +[
      +  "chat_id",
      +  "message_id"
      +]
  2. Addedv0.4.1
  3. Removedv0.3.0
  4. First observedv0.2.0

TDQS

A4.1/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: it states that content is decrypted, discloses the two distinct return shapes (MCP image/audio content vs. embedded resource blob with filename when known), and commits to an explicit failure contract ('honest error naming the content type — never fabricated bytes'). That is meaningful behavioral context an agent cannot get from structured fields.

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?

Four sentences, front-loaded with the core action and return contract, with the PDF/asImage special case placed after the main behavior. There is minor redundancy: the asImage conversion is explained once in the description and again in the schema, so the sentence partially repeats structured data.

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 tool with no annotations and no output schema, the description covers the essentials: encryption handling, return modality per media type, filename behavior, and error semantics. It stops short of noting practical edges such as size limits, expiry of media objects, or how large video/file blobs are delivered, which an agent might reasonably want to know.

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 are already documented, including asImage, preview, chat_id, and message_id. The description's asImage sentence largely restates the schema's own wording, and it adds nothing about preview or the required identifiers. Baseline 3 is appropriate since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb pair ('download and decrypt') and a clearly scoped resource ('one LINE media message of any downloadable type'), then enumerates the covered types (image, video, audio, file). It never names the sibling get_message_image or explains why an agent would pick this tool over that one, so differentiation for the image case is left to inference.

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?

It gives clear applicability conditions (any downloadable media type) and an explicit boundary case: non-media messages such as text, sticker refs, and unsupported types yield an error rather than data. It also tells the agent when to set asImage=true (PDF attachments). What it lacks is any routing statement toward or away from sibling tools like get_message_image.

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