Skip to main content
Glama

List chat messages

list_chat_messages
Read-onlyIdempotent

List messages from a specified Teams chat, showing the most recent first with compact summaries for quick review.

Instructions

List the messages in a 1:1 or group chat, most recent first. Returns compact summaries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNoMaximum messages (capped by TEAMS_MAX_RESULTS)
chat_idYesChat id (from list_chats)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare this a read-only, idempotent, non-destructive operation, so the description only needs to add non-obvious behavior. It does: newest-first ordering and compact summaries rather than full message content. This is useful beyond what annotations provide.

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?

One clean sentence that front-loads the operation, scope, ordering, and return format. Every element earns its place; there is no filler or repetition of the title/schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Complexity is low: two parameters, a complete schema, and safety-oriented annotations. The description supplies the missing response shape ('compact summaries') and ordering. It stops short of detailing what the summaries contain, but that is not required for correct selection and invocation.

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%, with both parameters documented: chat_id's source and top's cap. The description adds no meaningful parameter-level detail, so the baseline of 3 applies.

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 ('List'), a precise resource ('messages in a 1:1 or group chat'), and gives ordering ('most recent first') plus output nature ('compact summaries'). The '1:1 or group chat' wording clearly separates it from sibling tools like list_channel_messages.

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?

Conveys the chat context and implies the prerequisite of a chat id (reinforced by the schema's 'from list_chats'). It does not explicitly name alternatives like list_channel_messages or list_message_replies, but the chat-vs-channel distinction is enough for a competent agent to select it.

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