Tool Name
message
Description
Send a message to the user. Use this when you want to communicate something.Parameters
The message content to send (text, markdown supported)
Target channel (telegram, discord, cli, etc.). If not provided, uses the current context channel.
Target chat or user ID. If not provided, uses the current context chat_id.
List of file paths to attach (images, audio, documents). Each item is a string file path.
Return Value
Returns a success message indicating where the message was sent, or an error message if:- No target channel/chat is specified
- Message sending is not configured
- An exception occurs during sending
Configuration
Context Management
The tool maintains context about the current conversation:Examples
Basic Message
Message with Formatting
Message with Media
Message to Different Channel
Error: No Target
Error: Not Configured
Returns (when send_callback is None):Message Flow
- Agent calls message tool with content and optional parameters
- Tool resolves target (channel, chat_id) from parameters or context
- Creates OutboundMessage with content and media
- Calls send_callback to deliver message
- Returns confirmation or error
OutboundMessage Schema
Platform Support
The message tool is platform-agnostic and works with any channel that implements the send callback interface:- Telegram: Full markdown support, media attachments
- Discord: Embeds and markdown
- CLI: Terminal output
- Custom: Any platform implementing the callback
Best Practices
Use for User Communication
The message tool should be used when the agent needs to:- Report progress or results
- Ask clarifying questions
- Send alerts or notifications
- Share generated content or media
Don’t Use for Tool Output
Avoid using the message tool to:- Log internal operations
- Return tool execution results (return those directly)
- Debug information (use logging instead)
Media Guidelines
- Provide absolute file paths for media
- Ensure files exist before attaching
- Check file size limits for the target platform
- Supported formats vary by channel (images, audio, documents, video)
Turn Tracking
The tool tracks whether a message has been sent in the current turn:Implementation
Seenanobot/agent/tools/message.py:9 for the full implementation.
Related
- Spawn Tool - Create background agents
- Cron Tool - Schedule messages
- Web Tools - Fetch content to share