get_last_messages
Fetch the most recent messages from a specified Teams chat by name and count. Get conversation history directly without needing to list all chats first.
Instructions
Reads the last N messages from a specific Teams chat. Use this ONLY when the user asks for multiple recent messages or recent conversation history. NEVER call list_teams_chats first.
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_name": "<chat_name>"
},
"name": "get_last_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Number of recent messages to return (default: 3, max: 20). | |
| chat_name | Yes | Name or partial name of the contact or group in Teams. |