Skip to main content
Glama

Teams Read Chat Messages

teams_read_chat_messages
Read-only

Reads the most recent messages of a Microsoft Teams chat (chat_id from teams_list_chats), oldest first, from Microsoft 365. Deleted messages are skipped; a system event (a member added, a call) shows as [kind]. Times are in this computer's time zone. Reads at most 20 pages of 50 messages, deleted ones included. When the read is cut (by that bound, or because the call ran out of time) the answer has truncated: true. Needs a work or school Microsoft 365 account connected with connect_m365_account (personal Microsoft accounts have no Teams reads).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax items to return (default 50)
accountNoWhich connected Microsoft 365 account to use: its email (UPN), its id from list_m365_accounts, or its display name when unique. Leave it out to use the default account.
chat_idYesChat ID from teams_list_chats

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
countNo
errorNo
accountNoThe email (UPN) of the Microsoft 365 account this call used.
messagesNo
truncatedNoPresent and true only when the read was cut before it had everything it was asked for.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / account
      Added value: +{
      +  "description": "Which connected Microsoft 365 account to use: its email (UPN), its id from list_m365_accounts, or its display name when unique. Leave it out to use the default account.",
      +  "type": "string"
      +}
    • changedInput schema / properties / limit / description
      Previous value: -"Max messages (default 50)"New value: +"Max items to return (default 50)"
    • addedOutput schema / properties / account
      Added value: +{
      +  "description": "The email (UPN) of the Microsoft 365 account this call used.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / note
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "description": "Present and true only when the read was cut before it had everything it was asked for.",
      +  "type": "boolean"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / chat_id / description
      Previous value: -"Chat ID from list_teams_chats"New value: +"Chat ID from teams_list_chats"
  3. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the readOnly/openWorld annotations: deleted messages are skipped, system events appear as [kind], timestamps use the local time zone, a 20-page x 50-message fetch bound applies, and a truncated:true flag signals an incomplete read. The auth requirement is also disclosed. This is exactly the extra behavioral context annotations cannot carry.

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?

A single tight paragraph, front-loaded with what the tool does before the caveats (deleted messages, timezone, bounds, truncation, auth). Every sentence carries distinct information; nothing is redundant padding.

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?

An output schema exists, so return structure need not be explained, and the description still covers ordering, filtering, timezone, pagination bounds, truncation signaling, and account prerequisites. For a read tool of this complexity, an agent has everything needed to call it correctly.

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%, so the schema already documents limit, account, and chat_id, putting the baseline at 3. The description adds a little (chat_id provenance, and the 20-page/50-message bound that interacts with limit), but does not add per-parameter syntax or default detail beyond what the schema states.

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?

States a specific verb and resource ('Reads the most recent messages of a Microsoft Teams chat'), specifies ordering ('oldest first'), and even points to the source of the required chat_id (teams_list_chats). It implicitly separates chat reads from channel reads, but never explicitly names teams_read_channel_messages or teams_search_messages as alternatives, so sibling differentiation is left to inference.

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 clear context for use (read recent chat messages, chat_id from teams_list_chats) and a genuine precondition/exclusion: a work or school M365 account must be connected via connect_m365_account, since personal accounts have no Teams reads. It stops short of an explicit 'use X instead when you need Y' routing statement among the read/search siblings.

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.

Resources