Skip to main content
Glama

list_chat_messages

Retrieve Microsoft Teams chat messages newest first. Provide a chat ID, set limit, and paginate with a token. Optionally include full message bodies and attachment payloads.

Instructions

List messages in a chat, newest first.

Args: chat_id: Graph chat id (from list_chats). limit: 1-100. Default 25. page_token: Continuation token from a previous result. include_body: When True, include each message's full body and any attachment card payloads (e.g. Adaptive Card JSON for bot posts). Default False (snippet only; card text still feeds the snippet). include_raw: Include the raw Graph payload under "raw" on each item.

Returns: {"items": [trimmed_chat_message, ...], "next_page_token": str | None}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
chat_idYes
page_tokenNo
include_rawNo
include_bodyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.2

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does so well: it states newest-first ordering, page_token continuation, snippet vs full body behavior, include_raw semantics, and the exact return shape. It does not mention authorization or error behavior, but for a read-only list operation the disclosed behavior is substantial.

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 description is well-structured with a one-line summary, labeled Args, and a Returns section. Every line adds useful information beyond the schema, and there is no filler or repetition.

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?

For a five-parameter tool with no output schema, the description is unusually complete: it documents all parameters, defaults, optional behaviors, and the return contract. It stops short of explaining error conditions or explicitly routing between chat and channel message tools, but nothing essential is missing for a correct call.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must fully compensate. It does: every parameter is explained with meaningful semantics—limit range/default, page_token as continuation, include_body's snippet vs card payload behavior, include_raw's 'raw' property, and chat_id provenance from list_chats.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with 'List messages in a chat, newest first,' which clearly identifies the verb, resource, and ordering. It also anchors chat_id as 'Graph chat id (from list_chats),' distinguishing this from the channel- and message-list siblings, though it never explicitly names the alternatives.

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

Usage Guidelines2/5

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

There is no explicit guidance on when to choose this tool over list_channel_messages, list_message_replies, list_messages, or search_messages. The only contextual hint is 'chat_id: Graph chat id (from list_chats),' which implies a prerequisite but does not explain selection criteria or exclusions.

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