Skip to main content
Glama
line-desktop-mcp

line-desktop-mcp

by onlygummy

Read LINE messages

get_messages
Idempotent

Reads the newest messages of one LINE chat, a date window, or messages around a known id, returning a JSON result with images. Serves archived messages first for faster, offline-capable reads.

Instructions

Read the newest messages of one LINE chat, oldest first.

Pass after and before to read a time window instead of the newest slice: a bare date means local midnight, and before includes the whole day. The archive answers first, so a window that was read before is cheap and works offline; LINE is only paged back when the archive cannot fill limit.

Pass around to read the messages around one id, which is how a search hit turns into its conversation. That answer comes from the archive only, so the id must have been read before; context sets how many messages appear on each side and limit is ignored. around cannot be combined with after or before.

Returns a JSON result plus the images those messages contain. Messages are decrypted when the saved session holds the Letter Sealing keys; a sealed message that cannot be opened has sealed: true and no text. Every message read is stored in a local SQLite archive, and every image is saved under the media directory before it is attached, so the next call is cheaper and still works when LINE is unreachable.

Pass include_images=false to keep the image message rows but attach no image blocks. max_images defaults to 20 and caps the attachments; max_image_bytes adds an optional byte cap. The ids that were not attached appear in images_skipped. Pass max_images=null to remove the count cap for one call.

Check partial: true means the page budget ran out before limit, so older messages were not reached. Check stale: true means LINE could not be reached and the result came from the local archive.

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

Input Schema

NameRequiredDescriptionDefault
chatYesChat mid, or part of the chat name. Use list_chats to find it.
afterNoOnly messages on or after this date (`YYYY-MM-DD`) or ISO timestamp.
limitNoHow many messages, newest ones.
aroundNoA message id from an earlier result: read the messages around it instead of the newest ones. Answered from the archive.
beforeNoOnly messages on or before this date (`YYYY-MM-DD`). A bare date covers the whole day.
contextNoMessages on each side when `around` is set.
max_imagesNoMaximum image attachments for this call.
include_imagesNoAttach image content blocks. The image message rows are still returned when false.
max_image_bytesNoDo not attach an image larger than this many bytes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed21 schema fields changedv4.0.0
    • addedInput schema / properties / after
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Only messages on or after this date (`YYYY-MM-DD`) or ISO timestamp."
      +}
    • addedInput schema / properties / around
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "A message id from an earlier result: read the messages around it instead of the newest ones. Answered from the archive."
      +}
    • addedInput schema / properties / before
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Only messages on or before this date (`YYYY-MM-DD`). A bare date covers the whole day."
      +}
    • addedInput schema / properties / chat
      Added value: +{
      +  "description": "Chat mid, or part of the chat name. Use list_chats to find it.",
      +  "type": "string"
      +}
    • addedInput schema / properties / context
      Added value: +{
      +  "default": 5,
      +  "description": "Messages on each side when `around` is set.",
      +  "maximum": 50,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • removedInput schema / properties / date
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Single day as YYYY-MM-DD."
      -}
    • removedInput schema / properties / date_from
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Range start as YYYY-MM-DD."
      -}
    • removedInput schema / properties / date_to
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Range end as YYYY-MM-DD."
      -}
    • addedInput schema / properties / include_images
      Added value: +{
      +  "default": true,
      +  "description": "Attach image content blocks. The image message rows are still returned when false.",
      +  "type": "boolean"
      +}
    • removedInput schema / properties / include_media
      Removed value: -{
      -  "default": false,
      -  "description": "True embeds image bubbles as data URIs for AI vision. False (default) keeps reads light: no files, no downloads.",
      -  "type": "boolean"
      -}
    • removedInput schema / properties / keyword
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Substring filter on message text."
      -}
    • changedInput schema / properties / limit / default
      Previous value: -5New value: +30
    • addedInput schema / properties / limit / description
      Added value: +"How many messages, newest ones."
    • changedInput schema / properties / limit / maximum
      Previous value: -100New value: +200
    • addedInput schema / properties / max_image_bytes
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Do not attach an image larger than this many bytes."
      +}
    • addedInput schema / properties / max_images
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 100,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": 20,
      +  "description": "Maximum image attachments for this call."
      +}
    • removedInput schema / properties / room
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "integer"
      -    },
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Room index, data-mid, or name substring. None reads the current view. Prefer data-mid or name: index shifts when rooms reorder."
      -}
    • removedInput schema / properties / scroll
      Removed value: -{
      -  "default": true,
      -  "description": "True scrolls up to fill `limit` (bounded ~8s, complete). False reads on-screen rows only (fast).",
      -  "type": "boolean"
      -}
    • removedInput schema / properties / sender
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Substring filter on sender name."
      -}
    • addedInput schema / required
      Added value: +[
      +  "chat"
      +]
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  2. First observedv1.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the annotations: archive-first reads that work offline, decryption via Letter Sealing with a `sealed: true` fallback, and the statement that every read is written to a local SQLite archive with images saved to the media directory — which explains why `readOnlyHint=false` on an otherwise read-shaped tool. Failure modes are surfaced through `partial` and `stale` flags rather than left to guesswork.

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?

Front-loaded with purpose and then organized by parameter story (window, around, images, result flags), so each paragraph has a job. Six paragraphs is longer than ideal, but the detail is load-bearing for a nine-parameter tool with caching and decryption behavior.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so the description carries return-shape duty and does: JSON result plus image blocks, `sealed`, `images_skipped`, `partial`, `stale`. For a nine-parameter tool with archive caching and session-key decryption, nothing an agent needs to call it correctly appears to be missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Even though schema coverage is 100%, the description adds real semantics the schema does not: a bare date means local midnight, `before` covers the whole day, `limit` is ignored when `around` is set, `context` is per-side, and `max_images=null` removes the cap for one call. It also explains the `images_skipped` output when attachments are dropped.

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?

Opens with a concrete verb and resource plus ordering ("Read the newest messages of one LINE chat, oldest first") and distinguishes itself from search by explaining that `around` turns a search hit into its conversation. An agent can select this over `search_messages` or `list_chats` without opening another schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Explicit routing rules: use `after`/`before` for a time window, `around` for context around a known id, and a stated exclusion ("`around` cannot be combined with `after` or `before`"). It also names the escape hatches (`include_images=false`, `max_images=null`) that change cost per call.

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