Skip to main content
Glama
yomi

yomi

Official
by RikaiDev

collect_messages

Bulk-fetch recent LINE messages into a local cross-conversation search index, enabling keyword and semantic search across chats. Use it to force a reconcile or backfill specific conversations.

Instructions

Bulk-fetch recent messages from LINE conversations into Yomi's local cross-conversation search index (LINE has no native cross-chat search). Fetches up to per_chat per chat (default 100) for chat_ids, or all conversations when omitted, and indexes them for keyword search. Semantic vectors are produced by a background worker in idle batches, so a collect does not wait for the whole embedding backlog. A background capture loop keeps the index current on its own, so call this only to force a reconcile or backfill specific chats. Undecryptable messages are skipped, not fabricated.

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": "collect_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
chat_idsNoLINE chat/group/room MIDs to collect from, as returned by list_conversations. Omit to collect from all conversations.
per_chatNoMaximum recent messages to fetch per chat (default 100).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.7.2
    • removedInput schema / properties / chatIds
      Removed value: -{
      -  "description": "LINE chat/group/room MIDs to collect from, as returned by list_conversations. Omit to collect from all conversations.",
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • addedInput schema / properties / chat_ids
      Added value: +{
      +  "description": "LINE chat/group/room MIDs to collect from, as returned by list_conversations. Omit to collect from all conversations.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • removedInput schema / properties / perChat
      Removed value: -{
      -  "description": "Maximum recent messages to fetch per chat (default 100).",
      -  "type": "number"
      -}
    • addedInput schema / properties / per_chat
      Added value: +{
      +  "description": "Maximum recent messages to fetch per chat (default 100).",
      +  "type": "number"
      +}
  2. Addedv0.4.1
  3. Removedv0.3.0
  4. First observedv0.2.0

TDQS

A4.1/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 well: it discloses the default of 100 per chat, the all-conversations fallback when chat_ids is omitted, that embedding runs asynchronously in a background worker so the call does not block on the backlog, and that undecryptable messages are skipped rather than fabricated. It stops short of stating return shape, auth/prerequisite requirements, or whether repeated calls are idempotent.

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 the purpose, then behavior, then the usage rule, with no filler. The first sentence is long and packs several clauses, but every sentence contributes information an agent needs.

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 two-parameter tool with no output schema and no annotations, the description covers purpose, defaults, async indexing behavior, failure handling, and when to invoke. The main remaining gap is what the call returns (e.g. per-chat counts or job status), which matters given there is no output schema.

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 both parameters are already documented with types and defaults. The description restates the default 100 and the omit-to-collect-all behavior, adding no syntax or semantic detail beyond the schema — baseline 3 applies.

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?

States a specific verb and resource — bulk-fetch recent messages and index them into a local cross-conversation search index — and explains the motivating gap (LINE has no native cross-chat search). This lets an agent distinguish it from a plain message reader like get_chat_messages without opening the schema.

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 an explicit when-to-call rule: the background capture loop keeps the index current, so use this only to force a reconcile or backfill specific chats. It does not name a sibling for the read case (e.g. get_chat_messages), so the negative case is implied rather than spelled out.

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