Skip to main content
Glama

Get channel history

get_channel_history
Read-only

Read recent messages from a Mattermost channel or DM in chronological order. Use the optional substring filter and date range to locate a topic.

Instructions

Read recent messages from one channel in chronological order. channel accepts a channel name (#general), a channel id, or '@username' for a DM. The optional filter does client-side substring matching, which works reliably for Korean text even when server-side search does not — use it to scan a channel for a topic.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
teamNoTeam name, if the channel name is ambiguous across teams
afterNoOnly messages on/after this date, YYYY-MM-DD (inclusive)
limitNoMax messages to return (default 50)
beforeNoOnly messages on/before this date, YYYY-MM-DD (inclusive)
filterNoCase-insensitive substring to match in message text or author name
channelYesChannel name, channel id, or @username for a DM
Behavior4/5

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

With readOnlyHint=true, the safety profile is already known. The description adds meaningful behavioral details: chronological ordering, client-side substring filtering, support for channel names/IDs/@username DMs, and a specific note about Korean text reliability. These go beyond the annotation and schema.

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?

The description is three sentences and every sentence contributes: purpose, accepted channel forms, and filter behavior/use case. It is front-loaded with the core action and avoids redundancy with the schema.

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 read-only tool with a fully documented schema, the description is largely complete. It covers what the tool reads, channel targeting, time-bounded retrieval via before/after in schema, and filtering behavior. It does not describe the output shape, but no output schema exists and the tool name implies message history, so this is a minor gap.

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 description coverage is 100%, so the baseline is 3. The description adds extra semantic value by explaining the accepted forms for 'channel' and clarifying that 'filter' performs client-side substring matching, including the Korean-text use case. This helps an agent choose correct parameter values beyond the schema text.

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?

The description states a specific verb and resource: 'Read recent messages from one channel in chronological order.' It clearly distinguishes this tool from siblings like get_dm_history, get_thread, and search tools by scoping it to a single channel's history.

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?

The description provides clear guidance on when to use the filter option, especially for Korean text where server-side search fails, and frames the tool as the way to 'scan a channel for a topic.' It does not explicitly name alternatives or state when not to use the tool, but the context is generally clear.

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/shin6949/mattermost-mcp'

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