Search LINE messages
search_messagesSearch 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
| Name | Required | Description | Default |
|---|---|---|---|
| sync | No | Read the newest page of `chats` and page older messages from LINE first (slower; requires chats). | |
| after | No | Only messages on or after this date (`YYYY-MM-DD`) or ISO timestamp. | |
| chats | No | Chat mids or names to search. Omit to search everything archived. | |
| kinds | No | Message kinds to keep, such as `image`, `file`, or `sticker`. | |
| limit | No | Maximum hits to return. | |
| match | No | How `query` matches text. `substring` (default) needs the whole query in order; `words` needs every space-separated term, in any order. | substring |
| order | No | Newest hit first (default), or oldest first to find where a topic started. | newest |
| query | No | Text to look for; case-insensitive substring. Omit it to search by `kinds` alone, for example every image. | |
| before | No | Only messages on or before this date (`YYYY-MM-DD`), or an ISO timestamp treated as an exclusive cut-off. | |
| offset | No | Hits to skip, for paging through results. | |
| since_days | No | Only messages from the last N days. | |
| from_sender | No | Sender mid, or part of their display name, as archived. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||