Skip to main content
Glama
line-desktop-mcp

line-desktop-mcp

by onlygummy

Search LINE messages

search_messages
Idempotent

Search archived LINE messages by text, sender, chat, date, or message kind, and page through results to locate photos, files, or past conversations.

Instructions

Search archived messages for text, or for a message kind.

Pass query to match text, kinds to match what a message is, or both. kinds=["image"] with no query is how you find photos and files, which have no text to match.

Searches the local archive, which holds only the messages this server has read. Read coverage before concluding that something does not exist: a small messages_scanned means most history was never read.

Narrow the search with chats, after/before, from_sender, and since_days. A bare date means local midnight, and before includes the whole day. When both after and since_days are given, after wins. order="oldest" answers "where did this start", and offset pages through more hits; truncated: true means more hits exist after this page.

from_sender accepts a mid or part of a name, matched only against senders already archived. Pass chats to narrow the search, and sync=true to read the newest page of those chats and page older messages from LINE first (at most three older pages per chat).

Text search only sees messages that have text: images, stickers, and sealed messages that could not be decrypted never match a query. Each hit carries a snippet around the match when query was given.

match="words" needs every space-separated term of the query, in any order, so "invoice today" also finds "today's invoice". It helps Latin scripts only: Thai has no word separators, which makes the query one term either way.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "search_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
syncNoRead the newest page of `chats` and page older messages from LINE first (slower; requires chats).
afterNoOnly messages on or after this date (`YYYY-MM-DD`) or ISO timestamp.
chatsNoChat mids or names to search. Omit to search everything archived.
kindsNoMessage kinds to keep, such as `image`, `file`, or `sticker`.
limitNoMaximum hits to return.
matchNoHow `query` matches text. `substring` (default) needs the whole query in order; `words` needs every space-separated term, in any order.substring
orderNoNewest hit first (default), or oldest first to find where a topic started.newest
queryNoText to look for; case-insensitive substring. Omit it to search by `kinds` alone, for example every image.
beforeNoOnly messages on or before this date (`YYYY-MM-DD`), or an ISO timestamp treated as an exclusive cut-off.
offsetNoHits to skip, for paging through results.
since_daysNoOnly messages from the last N days.
from_senderNoSender mid, or part of their display name, as archived.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed19 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 / before
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Only messages on or before this date (`YYYY-MM-DD`), or an ISO timestamp treated as an exclusive cut-off."
      +}
    • addedInput schema / properties / chats
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Chat mids or names to search. Omit to search everything archived."
      +}
    • 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 / from_sender
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Sender mid, or part of their display name, as archived."
      +}
    • removedInput schema / properties / keyword
      Removed value: -{
      -  "description": "Substring to search in message text.",
      -  "type": "string"
      -}
    • addedInput schema / properties / kinds
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Message kinds to keep, such as `image`, `file`, or `sticker`."
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 20,
      +  "description": "Maximum hits to return.",
      +  "maximum": 100,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • removedInput schema / properties / limit_per_room
      Removed value: -{
      -  "default": 20,
      -  "maximum": 100,
      -  "minimum": 1,
      -  "type": "integer"
      -}
    • addedInput schema / properties / match
      Added value: +{
      +  "default": "substring",
      +  "description": "How `query` matches text. `substring` (default) needs the whole query in order; `words` needs every space-separated term, in any order.",
      +  "enum": [
      +    "substring",
      +    "words"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "Hits to skip, for paging through results.",
      +  "maximum": 1000,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / order
      Added value: +{
      +  "default": "newest",
      +  "description": "Newest hit first (default), or oldest first to find where a topic started.",
      +  "enum": [
      +    "newest",
      +    "oldest"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / query
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Text to look for; case-insensitive substring. Omit it to search by `kinds` alone, for example every image."
      +}
    • removedInput schema / properties / rooms
      Removed value: -{
      -  "description": "REQUIRED scope: room index, data-mid, or name substring, at least one. Get candidates from list_rooms first. Unscoped search across all rooms is not offered: it costs seconds per room.",
      -  "items": {
      -    "anyOf": [
      -      {
      -        "type": "integer"
      -      },
      -      {
      -        "type": "string"
      -      }
      -    ]
      -  },
      -  "type": "array"
      -}
    • removedInput schema / properties / scroll
      Removed value: -{
      -  "default": true,
      -  "description": "True scrolls up to fill `limit_per_room` (bounded ~8s per room). False reads on-screen rows only (fast).",
      -  "type": "boolean"
      -}
    • addedInput schema / properties / since_days
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 3650,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Only messages from the last N days."
      +}
    • addedInput schema / properties / sync
      Added value: +{
      +  "default": false,
      +  "description": "Read the newest page of `chats` and page older messages from LINE first (slower; requires chats).",
      +  "type": "boolean"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "keyword",
      -  "rooms"
      -]
  2. First observedv1.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Well past what the annotations declare: it explains that the archive only holds messages this server has read, that `messages_scanned` should be checked before concluding absence, and that `sync=true` pulls the newest page plus up to three older pages per chat from LINE (a network operation). It also documents `truncated: true` as the paging signal and the `snippet` field returned with text hits. Nothing here contradicts the supplied hints.

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 and organized into short paragraphs by concern (query vs kinds, archive coverage, narrowing, paging, matching). Slight redundancy: `chats` is introduced as a narrowing filter and then reintroduced as a prerequisite for `sync`, and the text-search limitation is stated twice in different words.

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?

An output schema exists, yet the description still supplies the interpretive keys an agent needs (`coverage`, `messages_scanned`, `truncated`, `snippet`) to decide whether a zero-hit result is trustworthy. For a 12-parameter search tool with open-world network behavior, no material guidance is 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?

Schema coverage is already 100%, so this had to earn its score above baseline, and it does: `after` overrides `since_days`, a bare date means local midnight with `before` covering the whole day, `from_sender` matches a mid or partial name but only against already-archived senders, and `match="words"` requires all terms in any order with a stated Thai-script limitation. This is meaning an agent cannot derive from the schema alone.

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?

Opens with a specific verb+resource and an explicit scope: "Search archived messages for text, or for a message kind." It further clarifies the archive is local and partial, which meaningfully shapes what results mean. It never names the sibling tools (get_messages, list_chats, unread), so the boundary against them is left implicit.

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?

Gives concrete selection rules among its own modes: use `query` for text, `kinds` for non-text such as images/files, both together for intersection, and `order="oldest"` for "where did this start". It also warns that text search cannot find images, stickers, or undecryptable messages. It stops short of saying when to prefer a sibling like get_messages over this tool.

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