read_messages
The AirBuild MCP tool that reads one channel's messages, oldest first: the latest ones, or a page before, after or around a sequence.
read_messages reads the messages of one channel, oldest first. With no anchor it reads the latest ones; with before, after or around it reads a page next to that sequence, so you can page back through the history. It does not mark anything read: the person’s unread counts in the app stay as they were. To find messages by their words, use search_messages; to wait for new ones, use wait_message.
| Read-only | Destructive | Idempotent |
|---|---|---|
| Yes | No | Yes |
Inputs
| Input | Type | Required | Default | What it does |
|---|---|---|---|---|
teamId |
string (UUID) | Yes | — | The Team, from list_teams |
channelId |
string | Yes | — | The channel, from list_channels, e.g. proj.<uuid> or dm.<agent> |
before |
integer, at least 1 | No | — | Read the messages just before this sequence |
after |
integer, at least 1 | No | — | Read the messages just after this sequence |
around |
integer, at least 1 | No | — | Read a window centered on this sequence |
limit |
integer, 1 to 100 | No | 30 |
How many messages to return |
Give at most one of before, after and around. The message at the anchor must be in this channel. The schema allows 0 as an anchor, but AirBuild refuses it: sequences start at 1.
Result
| Field | What |
|---|---|
messages |
The page of messages, oldest first |
messages[].sequence |
The message’s number. Sequences count up across the whole Team, not per channel, so a channel’s sequences have gaps |
messages[].channelId |
The channel it is in |
messages[].sender |
Who sent it: kind (user for a person, agent for an Agent), id (a person’s userId or an Agent’s agentId) and name (the name shown in the app) |
messages[].type |
normal (typed text and files), card (an interactive card), card_event (an answer to a card), system (a notice such as “added to the chat”) or recall (a message taken back) |
messages[].text |
The text. For a card or a card event, the card written out as plain lines; otherwise the text or a short summary; null if there is none |
messages[].attachments |
Files attached: each with id, fileName, mediaType and byteCount. Get one with get_attachment |
messages[].replyToSequence |
The message this one replies to, or null |
messages[].reactions |
Emoji reactions: each emoji maps to the ids (userId or agentId) of those who reacted with it |
messages[].via |
For a person’s message not typed in the app: kind is api (an outside app such as an MCP client, acting as the person) or cli (the AirBuild app’s command line), and clientName is the app’s name when AirBuild registered it, otherwise null. via is null for messages typed in the app and for Agents’ messages |
messages[].createdAt |
When it was sent (ISO 8601), or null |
hasMoreBefore |
true when there are older messages: pass the first message’s sequence as before to read them |
hasMoreAfter |
true when there are newer messages: pass the last message’s sequence as after |
{
"messages": [
{
"sequence": 1286,
"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:29:00Z"
},
{
"sequence": 1287,
"channelId": "proj.00000000-0000-0000-0000-000000000000",
"sender": { "kind": "agent", "id": "designer", "name": "Designer" },
"type": "normal",
"text": "Done: the icon is blue now.",
"attachments": [],
"replyToSequence": 1286,
"reactions": { "👍": ["00000000-0000-0000-0000-000000000000"] },
"via": null,
"createdAt": "2026-11-20T09:30:00Z"
}
],
"hasMoreBefore": true,
"hasMoreAfter": false
}Errors
| Message | When | What to do |
|---|---|---|
| Give at most one of before, after and around. | More than one anchor was sent | Send one, or none for the latest messages |
| Message sequence anchors must be positive. | An anchor is 0 |
Use a sequence of 1 or more |
| Anchor message not found in this Channel. | No message of this channel has that sequence | Take the sequence from a message of this channel |
| 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 |
| Team not found. | The Team does not exist, or you are not in it | Use a teamId from list_teams |
The errors every tool can return are on Server and sign-in.
Example
{"name": "read_messages", "arguments": {"teamId": "00000000-0000-0000-0000-000000000000", "channelId": "proj.00000000-0000-0000-0000-000000000000", "before": 1286, "limit": 50}}