post_message
Send messages to Mattermost channels with Markdown support, attach files, reply in threads, and include rich formatted attachments.
Instructions
Post a message to a Mattermost channel.
Send text messages with Markdown support. Use root_id to reply in a thread. Use file_ids to attach uploaded files. Use attachments for rich formatted content. To read all messages in a thread, use get_thread.
Attachment examples:
Status alert: {"color": "danger", "title": "Build Failed", "text": "Tests failed on main"}
Success notification: {"color": "good", "title": "Deployed", "text": "v1.2.3 is live"}
With fields: {"title": "Ticket", "fields": [{"title": "Status", "value": "Open", "short": true}]}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | Message content (supports Markdown) | |
| root_id | No | Root post ID for threading | |
| file_ids | No | File IDs to attach (from upload_file) | |
| channel_id | Yes | 26-character channel identifier (e.g., 'o5w8h47pdfbzjc4d8w7dhnhren') | |
| attachments | No | Rich message attachments with colors, fields, images |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Unique post identifier | |
| type | Yes | Post type (empty for regular posts) | |
| edit_at | Yes | Last edit timestamp | |
| message | Yes | Post content (supports Markdown) | |
| root_id | Yes | Root post ID if in thread | |
| user_id | Yes | Author user identifier | |
| file_ids | Yes | Attached file IDs | |
| hashtags | Yes | Space-separated hashtags | |
| create_at | Yes | Creation timestamp in milliseconds | |
| delete_at | Yes | Deletion timestamp (0 if not deleted) | |
| is_pinned | Yes | Whether post is pinned | |
| update_at | Yes | Last update timestamp in milliseconds | |
| channel_id | Yes | Channel where posted | |
| original_id | Yes | Original post ID if edited | |
| pending_post_id | Yes | Client-side pending ID |