Skip to main content
Glama

read_messages

Read-only

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, actor_type for who wrote it (contact / bot / agent — a human replying from Live Chat or over mail), 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

NameRequiredDescriptionDefault
botIdNoLimit to messages handled by one bot. Omit to read across every bot of the application.
limitNoMessages to return, 1-100. Defaults to 20.
cursorNoContinue 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.
endDateNoOnly messages at or before this moment. ISO 8601.
contactIdNoLimit to one conversation — the globally unique FlowCastle contact id. Find it with list_contacts.
directionNoincoming = messages from the user; outgoing = messages from the bot or a human agent. Omit for both sides interleaved.
startDateNoOnly messages at or after this moment. ISO 8601, e.g. "2026-08-01" or "2026-08-01T00:00:00Z".
actor_typeNoWho wrote the message. Narrower than direction, which cannot tell a bot reply from a human one: agent = a person replying from Live Chat or over mail, so this is how you find the conversations automation did not finish. Omit for all three.
applicationIdNoApplication (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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / actor_type
      Added value: +{
      +  "description": "Who wrote the message. Narrower than direction, which cannot tell a bot reply from a human one: agent = a person replying from Live Chat or over mail, so this is how you find the conversations automation did not finish. Omit for all three.",
      +  "enum": [
      +    "contact",
      +    "bot",
      +    "agent"
      +  ],
      +  "type": "string"
      +}
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only say read-only; the description adds the provenance of the data (runtime ledger written pre-routing, so untriggered inbound messages are included), the text-only limitation with caption substitution for media, button taps being absent, redaction after the retention window leaving text null, and a view_logs permission requirement with a PII warning. That is substantial context beyond the annotations.

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?

Front-loaded with what the resource is, then filtering, paging, exclusions, retention, and permissions in a logical order. It is a single dense paragraph of roughly 170 words; nothing is filler, though the sentence listing every filter is close to restating the schema.

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 9-parameter read tool with no output schema, the description covers return shape (newest first, nextCursor, text possibly null), retention behavior, permission prerequisites, and the sibling to use for excluded data. An agent has what it needs to call this correctly and interpret the response.

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 the baseline is 3, but the description adds framing value: which parameter selects a conversation vs a channel vs one side, that actor_type is narrower than direction, and that the returned nextCursor is fed back as `cursor`. It also explains the read scope when botId is omitted.

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?

States a specific verb and resource ('Read the message transcript') plus both sides of the conversation and the sort order (newest first). It also draws an explicit boundary with a sibling ('Button taps are NOT messages... use get_contact_activity'), so an agent can separate this from other read tools without opening the schema.

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?

Gives concrete filtering recipes per parameter, explains the cursor paging loop, and names the alternative tool for a nearby-but-different data type. It stops short of contrasting with list_bot_chats or query_flow_logs, so not every sibling choice is resolved.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.