Skip to main content
Glama

graph_get_chat_messages

Retrieve messages from a specific Microsoft Teams chat, including full HTML bodies, attachments, and mentions. Use compact mode or next-link paging to browse large message collections.

Instructions

Get messages from a specific chat.

Messages carry full HTML bodies plus their attachments and mentions, so compact narrows them to the identifying fields. Without it no $select is sent and the response is unchanged.

Args: chat_id: The chat ID. top: Maximum number of messages to return (default 50, maximum 50). compact: Whether to return only the identifying fields instead of the full record (default false). Use it to page through large collections cheaply. next_link: Opaque nextLink URL from a previous call, used to fetch the next page. Overrides the other paging arguments when supplied. include_next_link: Whether to wrap the result as {items, next_link} so paging can continue (default false, which returns a bare list).

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": {
      "chat_id": "<chat_id>"
    },
    "name": "graph_get_chat_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNo
chat_idYes
compactNo
next_linkNo
include_next_linkNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does real work: it discloses that without compact no $select is sent and the response is unchanged, that include_next_link changes the return shape between a bare list and {items, next_link}, and that next_link overrides paging args. It omits auth requirements and any rate-limit/cost notes.

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?

It is front-loaded with purpose and then a well-formed Args block, so it scans easily. There is mild redundancy between the narrative about compact and the repeated compact entry, but nothing is padding.

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 read tool with no annotations and no output schema, it covers parameter defaults, paging mechanics, and the two possible response shapes. Missing pieces are permission/auth context and any detail on message fields beyond 'HTML bodies plus attachments and mentions'.

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

Parameters4/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 compensate, and it documents all five parameters with defaults, meanings, and interaction rules. The main weakness is chat_id ('The chat ID') and a stated top maximum of 50 that conflicts with the schema's much larger maximum.

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 first sentence gives a specific verb and resource scoped to a chat ('Get messages from a specific chat'), which distinguishes it from channel-oriented siblings like graph_get_channel_messages. It does not explicitly name an alternative, so it stops short of 5.

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

Usage Guidelines3/5

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

Guidance exists at the parameter level ('Use it to page through large collections cheaply', next_link 'overrides the other paging arguments') but there is no tool-level when-to-use statement versus graph_search_messages or graph_get_channel_messages. Usage is implied by the chat scoping rather than stated.

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