create_agent_chat_message
Send text messages in chat rooms with @mentions to route messages to specific recipients, supporting both name-based and ID-based recipient specification.
Instructions
Send a text message in a chat room.
Creates a new text message in a chat room. Messages MUST include at least
one @mention to ensure proper routing to recipients.
TWO WAYS TO SPECIFY RECIPIENTS:
Option 1 - Use `recipients` (recommended for LLMs):
Provide comma-separated names. The tool resolves names to IDs automatically.
Example: recipients="weather agent,sarah"
Option 2 - Use `mentions` (for libraries with caching):
Provide a JSON array with pre-resolved IDs.
Example: mentions='[{"id": "uuid-123", "name": "weather agent"}]'
If both are provided, `mentions` takes precedence (no API call needed).
For event-type messages (tool_call, tool_result, thought, error, etc.),
use create_agent_chat_event instead.
Args:
chat_id: The unique identifier of the chat room (required).
content: The message content/text (required).
recipients: Comma-separated participant names to tag (LLM-friendly).
Example: "weather agent,sarah,mike"
Names are resolved to IDs via list_agent_chat_participants.
mentions: JSON array of mentions with pre-resolved IDs (for libraries).
Format: [{"id": "uuid", "name": "display_name"}, ...]
When provided, skips name resolution (more efficient).
Returns:
JSON string containing the created message details.
Examples:
# LLM usage (names):
create_agent_chat_message(chat_id="123", content="Hello!", recipients="weather agent")
# Library usage (pre-resolved IDs):
create_agent_chat_message(
chat_id="123",
content="Hello!",
mentions='[{"id": "uuid-456", "name": "weather agent"}]'
)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat_id | Yes | ||
| content | Yes | ||
| recipients | No | ||
| mentions | No |