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

TableJSON 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.7/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses the ledger source, recording-before-routing behavior, inclusion of unmatched messages, text-only/caption behavior, redaction after the retention window, pagination via nextCursor, and the required view_logs permission. This is rich behavioral context that annotations alone do not provide, and it does not contradict 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.

Conciseness5/5

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

The purpose is front-loaded in the first sentence, followed by logically ordered details about source, filtering, pagination, exclusions, retention, and permissions. Every sentence carries distinct information with no filler, and the structure makes the long description easy to scan.

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?

Given no output schema and 9 parameters with none required, the description is exceptionally complete: it covers ordering, filtering dimensions, pagination, data retention redaction, text-only behavior, permission requirements, and the boundary with get_contact_activity. An agent has enough context to decide when to use it and what to expect from the response.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description mostly restates what the input schema already says about filters like contactId, botId, direction, actor_type, startDate/endDate, and cursor. It adds a small amount of conceptual clarity (e.g., actor_type distinguishes human agent replies) but does not materially extend the parameter documentation already present in the schema.

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 opens with a specific verb and resource: 'Read the message transcript' and gives precise scope: 'what users sent the bot and what the bot sent back, newest first.' It also distinguishes itself from a sibling by noting that button taps are not messages and never appear here, making the tool's role unambiguous.

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

Usage Guidelines5/5

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

The description gives explicit usage boundaries: button taps should be handled by get_contact_activity, and actor_type is called out as the way to find conversations automation did not finish. It also includes contextual guidance such as unmatched messages being present and the retention-window redaction behavior, so an agent knows what results to expect.

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.