Skip to main content
Glama

list_messages

Read-onlyIdempotent

Retrieve the oldest messages from a thread, excluding withdrawn ones, up to a set limit; use thread context or text search for later messages.

Instructions

List the messages in a thread, oldest first, excluding withdrawn (tombstoned) ones. Each message has id, author_id, body, metadata, content, posted_at, edited_at and origin. It returns the first limit messages with no cursor, so a long thread's later messages are not reachable here; use get_thread_context for a prompt-ready pack with message cursors and a token budget, or search_messages to find messages by text. Requires workspace:read and read access to the thread's channel.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "thread_id": "<thread_id>"
    },
    "name": "list_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of messages to return, counted from the oldest. Defaults to 100; values outside 1 to 500 are clamped into that range.
thread_idYesUUID of the thread whose messages to list.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv479.0.2
    • addedInput schema / properties / limit / description
      Added value: +"Maximum number of messages to return, counted from the oldest. Defaults to 100; values outside 1 to 500 are clamped into that range."
    • addedInput schema / properties / thread_id / description
      Added value: +"UUID of the thread whose messages to list."
  2. First observedv479.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and non-destructive, so safety is covered. The description adds behavior the annotations cannot: tombstoned messages are filtered out, only a prefix of the thread is returned, and both workspace:read and read access to the thread's channel are required. It stops short of saying what the truncation response looks like (no indication of a has_more flag or similar), which keeps it at 4.

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?

Three sentences, front-loaded with purpose, then return shape, then routing. Every sentence is load-bearing, though the field enumeration ("id, author_id, body, metadata, content, posted_at, edited_at and origin") runs long and could be compressed without losing meaning.

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?

With no output schema, the return-field list and the prefix-truncation warning are essential and both are present. Auth prerequisites, sibling routing and the tombstone filter round out what an agent needs to call this correctly. Nothing material is missing for a two-parameter read tool.

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 coverage is 100% and the schema already documents limit thoroughly, including default, bounds and clamping. The description contributes one genuinely new semantic — that limit counts from the oldest, making it a prefix rather than a page size — but does not otherwise extend thread_id or limit beyond the schema. Baseline 3 is appropriate.

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 ("List the messages in a thread") plus two discriminating details: oldest-first ordering and exclusion of withdrawn/tombstoned messages. An agent can distinguish this from search_messages and get_thread_context without opening any schema.

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?

Explicitly names the two alternatives and the condition that selects each: get_thread_context for a prompt-ready pack with cursors and a token budget, search_messages for text lookup. It also states the negative case — without a cursor, later messages in a long thread are unreachable here — which is exactly the exclusion guidance an agent needs.

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

Deploy Server

Other Tools