read_messages
Read the message transcript: what users sent the bot and what the bot sent back, newest first. Source is the runtime's own message ledger, written by the bot as it handled each turn — inbound messages are recorded before any routing decision, so messages that matched no trigger are here too. Filter by contactId for one conversation, botId for one channel, direction for one side, and startDate/endDate for a window. Page further into the past by passing the returned nextCursor back as cursor. Text only. A photo or document contributes its caption; the file is not stored. Button taps are NOT messages and never appear here — use get_contact_activity for those. Message wording is redacted after the content retention window (the response says how long), leaving text null on old rows. Read-only. Requires the view_logs permission: this is raw personal message content of your end users.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| botId | No | Limit to messages handled by one bot. Omit to read across every bot of the application. | |
| limit | No | Messages to return, 1-100. Defaults to 20. | |
| cursor | No | Continue a previous read: pass the nextCursor value from the last response to get the next page of older messages. Omit to start from the newest. | |
| endDate | No | Only messages at or before this moment. ISO 8601. | |
| contactId | No | Limit to one conversation — the globally unique FlowCastle contact id. Find it with list_contacts. | |
| direction | No | incoming = messages from the user; outgoing = messages from the bot or a human agent. Omit for both sides interleaved. | |
| startDate | No | Only messages at or after this moment. ISO 8601, e.g. "2026-08-01" or "2026-08-01T00:00:00Z". | |
| applicationId | No | Application (workspace) id. Optional: an application-scoped key (app_...) defaults to its own application, but a personal key (usr_...) has no default and omitting it fails with MCP_APPLICATION_REQUIRED. Call list_applications to get the id. |