Skip to main content
Glama
yomi

yomi

Official
by RikaiDev

get_chat_messages

Fetches messages from one LINE conversation, decrypts E2EE text when keys exist, and pages older messages with a cursor for chat history review and media lookup.

Instructions

Fetch messages from one LINE conversation. Text is E2EE-decrypted when keys are available; each message has fromName (resolved sender), a mediaType flag (image/video/audio/file) plus message_id for get_message_media, and mentions (LINE's raw contentMetadata.MENTION, or null — a literal "@name" in text is not itself a mention). Without before, returns the most recent count. With before (id/delivered_time of the oldest message already seen), returns one older page — repeat to page further back.

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>"
    },
    "name": "get_chat_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
countNoMaximum number of messages to return (default 50).
beforeNoCursor to fetch messages older than this point. Use the id and/or delivered_time of the oldest message already seen.
chat_idYesLINE chat/group/room MID, as returned by list_conversations.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv0.7.2
    • changedInput schema / properties / before / description
      Previous value: -"Cursor to fetch messages older than this point. Use the id and/or deliveredTime of the oldest message already seen."New value: +"Cursor to fetch messages older than this point. Use the id and/or delivered_time of the oldest message already seen."
    • removedInput schema / properties / before / properties / deliveredTime
      Removed value: -{
      -  "description": "deliveredTime of the cursor message.",
      -  "type": "number"
      -}
    • addedInput schema / properties / before / properties / delivered_time
      Added value: +{
      +  "description": "delivered_time of the cursor message.",
      +  "type": "number"
      +}
    • removedInput schema / properties / before / properties / messageId
      Removed value: -{
      -  "description": "LINE message id of the cursor message.",
      -  "type": "string"
      -}
    • addedInput schema / properties / before / properties / message_id
      Added value: +{
      +  "description": "LINE message id of the cursor message.",
      +  "type": "string"
      +}
    • removedInput schema / properties / chatId
      Removed value: -{
      -  "description": "LINE chat/group/room MID, as returned by list_conversations.",
      -  "type": "string"
      -}
    • addedInput schema / properties / chat_id
      Added value: +{
      +  "description": "LINE chat/group/room MID, as returned by list_conversations.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "chatId"
      -]New value: +[
      +  "chat_id"
      +]
  2. Addedv0.4.1
  3. Removedv0.3.0
  4. First observedv0.2.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses E2EE decryption contingent on key availability, sender-name resolution via fromName, and the mediaType flag. It does not explain what happens when keys are unavailable (omitted fields? ciphertext?), which is a meaningful gap for a tool whose behavior is conditional.

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?

Information is front-loaded with purpose first, then decryption, then return fields, then pagination. The parenthetical about literal '@name' is valuable but makes the middle clause dense and run-on; overall it is tight with little waste.

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?

There is no output schema, so the description must describe return values, and it does: fromName, mediaType, message_id, mentions, and text are all covered, plus the pagination contract. Remaining gaps are the key-unavailable path and ordering guarantees, which are moderate rather than fatal.

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%, so all three parameters are already documented, and the description largely restates the cursor semantics rather than extending them (e.g. no guidance on which of message_id vs delivered_time to supply, or what happens if the two disagree). The mentions explanation adds meaning but pertains to output, not parameters, so the baseline 3 holds.

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?

States a specific verb and resource ('Fetch messages from one LINE conversation') and names the natural follow-up tool get_message_media for media retrieval. It does not explicitly distinguish itself from collect_messages or search_messages, which are the closest siblings, so an agent must infer the boundary.

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?

Pagination behavior is spelled out clearly: without `before` you get the most recent `count`, with `before` you get exactly one older page and should repeat to page further back. That is concrete how-to-use guidance. It stops short of saying when to prefer this over search_messages or collect_messages.

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