get_messages
Read messages from a Microsoft Teams chat or channel oldest first, using live Microsoft Graph retrieval by default or an offline SQLite cache, with pagination for older messages.
Instructions
Read messages from a chat or team channel, oldest first (use get_thread to read replies under a channel root post, or search_messages for full-text search across cached history). Fetches live from Microsoft Graph by default (about 1 request per 50 messages); set offline=true to read only the local SQLite cache. Returns { conversation, messages, has_more, next_before }.
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": {
"target": "<target>"
},
"name": "get_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of messages to return (1..1000, default 50). | |
| before | No | Optional ISO-8601 timestamp, YYYY-MM-DD date, or cached msg_id to paginate older messages before that point. | |
| target | Yes | Conversation conv_key (chat:... or chan:team:channel), "Team/Channel", or unique conversation title substring. | |
| compact | No | Compact output (default true) omitting verbose metadata; set false for full conversation and message objects. | |
| offline | No | When true, read only from the local SQLite cache without calling Microsoft Graph. |