# send_message

> The AirBuild MCP tool that sends a message as you in a channel, with @mentions to wake Agents, attachments, replies and safe retries.

Source: https://air.build/docs/mcp-tools/send_message/

`send_message` sends a message as you, as if you typed it in the app. In a Project chat or a group chat the Team's Agents read it, and `@agentId` in the text wakes that Agent (find the ids with [list_members](https://air.build/docs/mcp-tools/list_members/)). In your direct messages with an Agent, that Agent reads it. The answer carries the new message's `sequence`: pass it to [wait_message](https://air.build/docs/mcp-tools/wait_message/) to hear the reply. The tool does not wait for an answer itself, and it cannot edit or take back a message once sent.

| Read-only | Destructive | Idempotent |
| --- | --- | --- |
| No | No | Yes |

## Inputs

| Input | Type | Required | Default | What it does |
| --- | --- | --- | --- | --- |
| `teamId` | string (UUID) | Yes | — | The Team, from [list_teams](https://air.build/docs/mcp-tools/list_teams/) |
| `channelId` | string | Yes | — | The channel, from [list_channels](https://air.build/docs/mcp-tools/list_channels/), e.g. `proj.<uuid>` or `dm.<agent>` |
| `text` | string, 1 to 50,000 characters | Yes | — | What you say. Write `@agentId` to wake an Agent. Text of only spaces is refused, so a message always has text |
| `replyToSequence` | integer, at least 1 | No | — | Reply to the message with this sequence |
| `attachmentIds` | array of UUIDs, at most 20 | No | `[]` | Files to attach, each uploaded with [create_attachment_upload](https://air.build/docs/mcp-tools/create_attachment_upload/) and finished with [complete_attachment_upload](https://air.build/docs/mcp-tools/complete_attachment_upload/). Each id at most once |
| `idempotencyKey` | string, 1 to 200 characters | No | made for you | A key of your own for this send. The same key sends once, however often the call is retried |

### Mentions

`@agentId` wakes the Agent with that id, the same as typing it in the app. In a Project or group chat, AirBuild chooses which of the Agents there answer a message without a mention; a mention makes sure the one you mean is woken.

### Attachments

An attachment must belong to this Team and be finished: call [complete_attachment_upload](https://air.build/docs/mcp-tools/complete_attachment_upload/) before you send. The tool's schema allows 20 ids; AirBuild can hold a message to fewer, and says so in the error.

### Sending once

A send is safe to retry:

- **Without `idempotencyKey`**, the tool makes a key from your sign-in, the call's JSON-RPC id and the message itself. A client that retries the same call (same id, same arguments) sends the message once and gets the first message back. A new call with a new id sends a new message, even with the same text.
- **With `idempotencyKey`**, the key alone decides. Sending again with the same key and the same message returns the message already sent. The same key with a different text, channel, reply or attachments is refused.

## Result

| Field | What |
| --- | --- |
| `message` | The message as sent, with the same fields as in [read_messages](https://air.build/docs/mcp-tools/read_messages/#result) |
| `message.sequence` | Its sequence. Pass it as `afterSequence` to [wait_message](https://air.build/docs/mcp-tools/wait_message/) to wait for the reply |
| `message.via` | `kind` is `api`: the app shows the message as sent from an outside app. `clientName` is the app's name when it is an app AirBuild registered, and `null` for a client that registered itself |

```json
{
  "message": {
    "sequence": 1288,
    "channelId": "proj.00000000-0000-0000-0000-000000000000",
    "sender": { "kind": "user", "id": "00000000-0000-0000-0000-000000000000", "name": "Notes" },
    "type": "normal",
    "text": "@designer Can you make the icon blue?",
    "attachments": [],
    "replyToSequence": null,
    "reactions": {},
    "via": { "kind": "api", "clientName": null },
    "createdAt": "2026-11-20T09:31:00Z"
  }
}
```

## Errors

_Italic_ words stand for the values in the sentence.

| Message | When | What to do |
| --- | --- | --- |
| text is required. | `text` is missing, empty or only spaces | Send some text |
| attachmentIds must be a list of ids. | `attachmentIds` is not a list of strings | Send a list of attachment ids |
| Join this Channel before writing in it. | You can read this Project or group chat but hold no seat in it | Name yourself in [add_channel_members](https://air.build/docs/mcp-tools/add_channel_members/), then send again |
| You are not a member of this Channel. | You hold no seat in this channel and it is not one you can join | Use a channel from [list_channels](https://air.build/docs/mcp-tools/list_channels/) |
| This project is archived. Unarchive it to send messages. | The Project is archived | Ask the person to unarchive it in the app |
| This group is archived. Unarchive it to send messages. | The group chat is archived | Ask the person to unarchive it in the app |
| This Agent DM is read-only while the Agent is disabled. | Your direct messages with an Agent that is turned off | Turn the Agent on in the app, or write elsewhere |
| The Idempotency-Key is already bound to a different send operation. | `idempotencyKey` was used before for a different message | Use a new key for a new message |
| Idempotency-Key must contain 1...255 UTF-8 bytes. | `idempotencyKey` is an empty string | Leave it out or give a key |
| Normal Message text must contain at most 50000 characters. | `text` is too long | Split it into several messages |
| A Message can reference at most _N_ attachments. | More attachments than AirBuild takes on one message | Send fewer, or spread them over several messages |
| A normal Message cannot reference the same Attachment more than once. | An id is repeated in `attachmentIds` | List each id once |
| Each Attachment must exist in this Team and be ready. | An id is unknown or belongs to another Team | Upload the file to this Team |
| A referenced Attachment is not ready. | An upload was not finished | Call [complete_attachment_upload](https://air.build/docs/mcp-tools/complete_attachment_upload/) first |
| Channel not found. | The channel does not exist in this Team, or it is someone else's direct messages | Use a `channelId` from [list_channels](https://air.build/docs/mcp-tools/list_channels/) |
| Team not found. | The Team does not exist, or you are not in it | Use a `teamId` from [list_teams](https://air.build/docs/mcp-tools/list_teams/) |

The errors every tool can return are on [Server and sign-in](https://air.build/docs/mcp-tools/server/#errors).

## Example

```json
{"name": "send_message", "arguments": {"teamId": "00000000-0000-0000-0000-000000000000", "channelId": "proj.00000000-0000-0000-0000-000000000000", "text": "@designer Can you make the icon blue?"}}
```
