message tool call works for Discord, Telegram, Slack, WhatsApp, Signal, iMessage, IRC, LINE, and Email.
message — Cross-Channel Messaging
Themessage tool supports 7 actions — send, reply, react, edit, delete, fetch, and attach. Comis dispatches each call to the right channel adapter based on channel_type. Not every action is supported on every platform (see the capability matrix below); the tool returns a structured error if you ask for something the channel cannot do.
All actions require the channel_type parameter to specify which platform adapter handles the request. This is a required string identifying the channel type (e.g., telegram, discord, slack, whatsapp, signal, imessage, line, irc, email).
Quick Reference
| Action | What It Does |
|---|---|
send | Send a new message to a channel |
reply | Reply to a specific message |
react | Add an emoji reaction |
edit | Edit a previously sent message |
delete | Delete a message |
fetch | Retrieve recent messages from a channel |
attach | Send a message with a file attachment |
Actions
send -- Send a new message
send -- Send a new message
Sends a new message to a channel. From a trusted context (a scheduled/heartbeat task, or an operator using an admin-scoped gateway token) the agent can send to any channel it has access to. When handling an inbound user message, sends are confined to that conversation’s channel (see the channel-confinement note above).Parameters:
Example — Send a notification:
| Parameter | Type | Required | Description |
|---|---|---|---|
action | string | Yes | Must be send |
channel_type | string | Yes | Channel type (e.g., telegram, discord, slack, whatsapp) |
channel_id | string | Yes | The target channel identifier |
text | string | Yes | The message content |
buttons | array | No | Button rows for interactive messages. Each inner array is one row of buttons with text, optional callback_data, url, and style (primary, secondary, danger, link). |
cards | array | No | Rich card embeds. Renders as embeds on Discord, blocks on Slack, HTML on Telegram. Each card has optional title, description, image_url, color, and fields. |
effects | array | No | Message delivery effects: spoiler (wraps text in spoiler) or silent (suppresses notification) |
thread_reply | boolean | No | Create or continue a thread from this message. Discord creates thread, Slack uses thread_ts. |
reply -- Reply to a specific message
reply -- Reply to a specific message
react -- Add an emoji reaction
react -- Add an emoji reaction
Adds an emoji reaction to an existing message. This is a lightweight way for agents to acknowledge messages without sending a full reply.Parameters:
Example — Acknowledge a request:
| Parameter | Type | Required | Description |
|---|---|---|---|
action | string | Yes | Must be react |
channel_type | string | Yes | Channel type (e.g., telegram, discord, slack, whatsapp) |
channel_id | string | Yes | The channel containing the message |
message_id | string | Yes | The ID of the message to react to |
emoji | string | Yes | The emoji to add. Provide the literal Unicode emoji character (e.g., the thumbs-up character) or a platform-recognized shortcode; per-platform translation is handled by the channel adapter. |
Emoji names vary by platform. Discord uses custom emoji names, Telegram uses Unicode emoji, and Slack uses shortcodes like
:thumbsup:. The agent handles the translation automatically.edit -- Edit a sent message
edit -- Edit a sent message
Edits a message that the agent previously sent. Useful for updating status messages or correcting errors.Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
action | string | Yes | Must be edit |
channel_type | string | Yes | Channel type (e.g., telegram, discord, slack, whatsapp) |
channel_id | string | Yes | The channel containing the message |
message_id | string | Yes | The ID of the message to edit |
text | string | Yes | The new message content |
delete -- Delete a message
delete -- Delete a message
Deletes a message from a channel. The agent can only delete messages it has permission to delete — typically its own messages or, on platforms with moderation rights, other users’ messages.Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
action | string | Yes | Must be delete |
channel_type | string | Yes | Channel type (e.g., telegram, discord, slack, whatsapp) |
channel_id | string | Yes | The channel containing the message |
message_id | string | Yes | The ID of the message to delete |
Platform permissions apply. On Discord, the bot needs “Manage Messages” permission to delete other users’ messages. On Telegram, the bot needs admin rights. Check your platform’s documentation for permission requirements. This is a destructive action that requires user confirmation via the
_confirmed parameter.fetch -- Retrieve recent messages
fetch -- Retrieve recent messages
Fetches recent messages from a channel. Useful when the agent needs to review recent conversation history or catch up on messages it may have missed.Parameters:
Returns a list of messages including their IDs, authors, timestamps, and content.Example — Get the last 5 messages:
| Parameter | Type | Required | Description |
|---|---|---|---|
action | string | Yes | Must be fetch |
channel_type | string | Yes | Channel type (e.g., telegram, discord, slack, whatsapp) |
channel_id | string | Yes | The channel to fetch messages from |
limit | integer | No | Maximum number of messages to return (default: 20) |
before | string | No | Fetch messages before this message ID (for pagination) |
attach -- Send a message with a file
attach -- Send a message with a file
Sends a message with a file attachment. The agent can attach images, documents, audio files, or any other file type supported by the target platform.Parameters:
Example — Send a generated report:
| Parameter | Type | Required | Description |
|---|---|---|---|
action | string | Yes | Must be attach |
channel_type | string | Yes | Channel type (e.g., telegram, discord, slack, whatsapp) |
channel_id | string | Yes | The target channel |
attachment_url | string | Yes | URL or workspace path of file to send: http://, https://, file://, or absolute path |
attachment_type | string | No | Attachment media type: image, file, audio, or video (default: file) |
mime_type | string | No | MIME type of attachment |
file_name | string | No | Display filename for the attachment |
caption | string | No | Caption text for the attachment |
File size limits vary by platform. Discord allows up to 25 MB (or 100 MB with Nitro). Telegram allows up to 50 MB for most files. Check your platform’s limits if sending large files.
Per-channel capability matrix
Channel adapters declare what they can do via aChannelCapability schema, and the message tool checks support before dispatching. Asking for an unsupported action returns a structured error with errorKind: "platform" — it does not silently no-op.
| Channel | Send | Reply | React | Edit | Delete | Fetch History | Attachments | Streaming method | Max chars |
|---|---|---|---|---|---|---|---|---|---|
| Discord | Yes | Yes | Yes | Yes | Yes | Yes | Yes | edit (500ms) | 2000 |
| Telegram | Yes | Yes | Yes (limited emoji) | Yes | Yes | No | Yes | edit (300ms) | 4096 |
| Slack | Yes | Yes (thread_ts) | Yes (shortnames) | Yes | Yes | Yes | Yes | edit (400ms) | 4000 |
| Yes | Yes (quoted) | Yes (Unicode) | Yes (overwrite) | Own only | No | Yes | block (600ms) | 65536 | |
| Signal | Yes | Yes (quoted) | Yes (Unicode) | No | Yes | No | Yes | block (500ms) | 65536 |
| iMessage | Yes | No | No | No | No | Yes | Yes | none | 20000 |
| LINE | Yes | Yes (push) | No | No | No | No | Yes | none | 5000 |
| IRC | Yes | Mention prefix | No | No | No | No | No | none | 512 |
| Yes | Yes (RFC 5322 headers) | No | No | No | No | Yes | none | 100000 |
edit— the agent posts a placeholder, then edits it in place as content streams in. Supported on Discord, Telegram, Slack.block— the agent buffers chunks and emits complete blocks (no edit). Used by WhatsApp and Signal where edits are unreliable or unsupported.none— no streaming; the agent waits for the full reply before sending.
Cross-Channel Messaging
Themessage tool works across all connected channels. The channel_type and channel_id parameters together identify which channel to target. Agents can send messages to channels they are not currently conversing in — this is a key capability for building notification systems, alert pipelines, and cross-channel coordination workflows.
Example — mirror an alert to Discord and Email:
A finance agent watching a market trigger needs to fan out the same alert to two channels at once. The agent makes two consecutive message calls with the same body but different targets:
- Detect an issue through its heartbeat check.
- Send an alert to the
#ops-alertsDiscord channel usingchannel_type: discord. - Send a summary to the Telegram admin group using
channel_type: telegram. - React with a warning emoji on the original message that triggered the check.
message tool with different channel_type and channel_id values.
notify_user — Proactive Notifications
Thenotify_user tool delivers proactive notifications outside the normal request-response flow. The daemon applies rate limiting, dedup, quiet-hours suppression, and channel-resolution guards before enqueueing the notification.
| Parameter | Type | Required | Description |
|---|---|---|---|
message | string | Yes | Notification text to send to the user |
priority | string | No | One of low, normal (default), high, critical. critical bypasses quiet hours. |
channel_type | string | No | Target channel type (e.g., telegram, discord). Omit for auto-resolution. |
channel_id | string | No | Target channel/chat ID. Required when channel_type is specified. |
notify_user for agent-initiated communication (alerts, reminders, task-completion notices) when you want platform-level guards. Use message (action: send) for direct messaging to a specific channel without the notification guard pipeline.
Related
Channels Overview
Connect Discord, Telegram, Slack, and 5 more platforms
Sessions
Sub-agents, pipelines, and session management
Agent Tools Overview
Master reference table of all tools
Platform Actions
Moderation actions for Discord, Telegram, Slack, and WhatsApp
