search_messages
Search messages in a Mattermost team using keywords, user mentions, channel names, or date ranges. Filters support OR/AND logic for precise results.
Instructions
Search for messages matching specific criteria across channels.
Searches message content within a team. For simply reading recent channel messages, use get_channel_messages instead.
Search syntax examples:
Simple text: "deployment error"
From user: "from:username bug"
In channel: "in:channel-name release"
Date range: "after:2024-01-01 before:2024-02-01"
Combined: "from:alice in:dev-ops deployment failed"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| terms | Yes | Search terms (Mattermost syntax) | |
| team_id | Yes | 26-character team identifier (e.g., 'o5w8h47pdfbzjc4d8w7dhnhren') | |
| is_or_search | No | Use OR instead of AND for multiple terms |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order | Yes | Post IDs in display order | |
| posts | Yes | Map of post ID to Post object | |
| truncated | No | True when the response hit a Mattermost response cap — more posts exist beyond this batch | |
| next_post_id | No | Next post ID for pagination | |
| prev_post_id | No | Previous post ID for pagination |