Skip to main content
Glama

Send Chat Message

ethora-chats-message-v2

Post a message into an app's chat room as the broadcast sender. Optionally wait for an AI agent's reply, returned in replies.

Instructions

Post a message into a chat room of an app (POST /v2/apps/:appId/chats/broadcast targeting one room). The message is attributed to the app's broadcast sender (override the shown name with senderName). Use it to seed or test a conversation, e.g. right after ethora-agent-invite-to-chat, and set waitForReplySec (up to 60) to wait for an AI agent's answer; replies are returned in replies. Identify the room by roomJid (${appId}_${chatId}, exactly what ethora-app-create-chat returns as jid) or by the bare chatId plus the selected app. Requires: a room in the selected app (ethora-app-create-chat); for replies, an agent invited into it (ethora-agent-invite-to-chat). Auth: user auth (the default on the hosted server) or B2B; app-token mode is not accepted by this route. Errors: 401 not logged in; 403 not the app owner; 404 unknown app/room; 422 empty text. Reply detection needs the message archive (MAM) on the deployment; when it is unavailable replies is null and historyUnavailable is true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesMessage body to post (1-4000 chars).
appIdNo24-char hex appId. Optional when `roomJid` carries it or an app is selected.
chatIdNoChat id: either the Mongo chat `_id` (as listed by the app's chat list) or the suffix after `${appId}_` in the room JID. Needs an app: pass `appId` or select one with `ethora-app-select`.
roomJidNoRoom JID `${appId}_${chatId}` (optionally with `@conference.<host>`), as returned by `ethora-app-create-chat`. Either this or `chatId` is required.
senderNameNoDisplay name shown as the message sender (defaults to the app's broadcast sender / app name).
waitForReplySecNoSeconds to wait for a reply from someone else in the room (an AI agent, typically). 0 (default) returns right after posting.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv26.9.3

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description is exceptionally transparent about behavior beyond the annotations. It details the attribution to the broadcast sender, the `waitForReplySec` blocking behavior, the shape of replies (in `replies`), the auth modes that are and aren't accepted, specific error codes, and the MAM dependency that yields `historyUnavailable`. This far exceeds what annotations (which only say non-readOnly, openWorld, non-idempotent, non-destructive) provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is fairly long but every sentence contributes value: action, use case, identification, prerequisites, auth, errors, and a dependency caveat. It is front-loaded with the core action and the one-room distinction. It is not verbose; it is dense but structured, making it easy to scan. A 4 reflects that it could be tightened, but it's efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 6 parameters, no output schema, and complex auth, the description covers all critical context: prerequisites, authentication modes, error responses, reply retrieval, and the MAM requirement. It even hints at the response fields (`replies`, `historyUnavailable`). Nothing an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds extra meaning beyond the schema: it explains the composition of `roomJid` (`${appId}_${chatId}`), the relationship between `chatId` and the JID, the default for `senderName`, and the purpose of `waitForReplySec` with its maximum. This enriches the schema and helps an agent construct parameters correctly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Post'), a specific resource ('a chat room of an app'), and the exact endpoint. It also clarifies the tool is for a single room ('targeting one room'), which distinguishes it from broadcast tools. The purpose is further refined by the use case ('seed or test a conversation'), so an agent can immediately understand what it does and how it differs from siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives concrete context for when to use the tool: right after `ethora-agent-invite-to-chat`, and when waiting for an AI reply. It also lists prerequisites (`ethora-app-create-chat` for a room, `ethora-agent-invite-to-chat` for replies). It does not explicitly name an alternative for broadcasting to multiple rooms, but the phrase 'targeting one room' implies that broadcast tools are for multi-room. The guidance is clear enough for an agent to make the right choice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools