Skip to main content
Glama
gamesme

chatlab-mcp

by gamesme

get_messages

Retrieve chat messages with filters for keyword, time range, and sender. Supports pagination and compact text or JSON output.

Instructions

The primary tool for reading message content. Retrieves up to 500 messages per call with filters for keyword, time range, and sender. Use page to paginate. Returns plain text by default (set format=json for JSON, format=text for compact format). Always prefer this over execute_sql when reading messages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYesSession ID
keywordNoSubstring search
start_timeNoStart time as Unix timestamp (seconds)
end_timeNoEnd time as Unix timestamp (seconds)
sender_idNoFilter by member platformId
typeNoFilter by message type number
pageNoPage number (default: 1)
limitNoMessages per page, max 500 (default: 20). Use pagination to retrieve more.
formatNoOutput format: text (default, compact to save tokens) or json
merge_consecutiveNoMerge consecutive messages from same sender (text format only, default: true)
filter_invalidNoFilter meaningless messages like stickers, system messages (text format only, default: true)
timezoneNoTimezone for time display, e.g., "Asia/Shanghai", "America/New_York", "UTC" (default: Asia/Shanghai)
Behavior4/5

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

No annotations provided, so description carries full burden. Discloses default format, pagination limits (max 500), merge/filter defaults, and timezone handling. Does not explicitly state read-only but implies it.

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?

Two efficient sentences plus a final imperative—concise, front-loaded, no redundancy. Every sentence adds value.

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?

With 12 parameters and no output schema, description covers filtering, pagination, formatting, merging, and timezone. Lacks ordering details but adequate for selection.

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

Parameters4/5

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

Schema coverage is 100%, baseline 3. Description adds value by explaining defaults (limit=20, format='text', merge_consecutive=true) and pagination behavior, exceeding schema detail.

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?

Clearly states 'primary tool for reading message content' with specific actions: filtering, pagination, format options. Distinguished from sibling 'execute_sql'.

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?

Explicitly advises to prefer this tool over 'execute_sql' for reading messages, but does not address all siblings (e.g., 'get_full_conversation'). Clear context but not exhaustive.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gamesme/chatlab-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server