Skip to main content
Glama

get_chat_messages

Read recent LINE chat messages by chat MID, returning text or [IMAGE]/[FILE] placeholders with message IDs; set limit to control how many messages are returned.

Instructions

อ่านประวัติข้อความล่าสุดในแชท หากข้อความเป็นรูปภาพ/ไฟล์จะแสดง [IMAGE]/[FILE] พร้อม messageId

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoจำนวนข้อความที่ต้องการอ่าน (ค่าเริ่มต้น 20)
chatMidYesMID ของแชท

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden, and it does disclose one genuinely useful behavioral trait: image/file messages are surfaced as [IMAGE]/[FILE] with a messageId. However, it says nothing about permissions, ordering of results, or whether 'recent' is bounded by the limit parameter.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with zero filler; the return-format caveat is attached rather than given its own bloat sentence.

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

Completeness3/5

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

With no output schema and no annotations, the description should carry more of the return contract. It explains the image/file placeholder but not the shape of a normal message (sender, timestamp, text), nor ordering/pagination behavior, which an agent needs to use the result correctly.

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% (both limit and chatMid are documented in the schema), so the baseline is 3. The description adds no syntax or format detail beyond the schema, only the loose notion of 'recent'.

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 clear verb+resource ('read recent chat message history') and even specifies a return-format quirk ([IMAGE]/[FILE]). It does not differentiate itself from close siblings such as get_new_messages or wait_for_message, which is the only thing keeping it from a 5.

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

Usage Guidelines2/5

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

The description only restates the purpose; it never says when to use this tool instead of get_new_messages, wait_for_message, or get_message_image. No prerequisites, no exclusions, no alternative routing.

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