Summary
The msteams plugin docs describe Graph API permissions enabling historical message queries, but the plugin doesn't implement a readMessages action. Discord and Slack both support this. Teams should too, especially since Graph permissions (ChannelMessage.Read.All, Chat.Read.All) are already documented as prerequisites.
Use Case
After session compaction, the agent loses raw conversation history. Being able to query recent Teams messages via Graph would let the agent reconstruct context that was lost during compaction, rather than relying solely on the compaction summary and memory files.
This would also help with:
- Catching up on messages received while the gateway was offline
- Providing the agent with accurate message history for reference
Current State
- Graph API permissions are documented in the msteams docs (RSC vs Graph API)
- The plugin uses Graph for media/attachment downloads (
attachments/graph.ts)
historyLimit and dmHistoryLimit only limit locally stored session turns, not Graph queries
- The
message tool for msteams only supports poll and send actions
- Discord and Slack already have
readMessages actions
Proposed
Add a readMessages (or similar) action to the msteams plugin that queries the Graph API /chats/{id}/messages and /teams/{teamId}/channels/{channelId}/messages endpoints, consistent with how Discord and Slack implement it.
Summary
The msteams plugin docs describe Graph API permissions enabling historical message queries, but the plugin doesn't implement a
readMessagesaction. Discord and Slack both support this. Teams should too, especially since Graph permissions (ChannelMessage.Read.All,Chat.Read.All) are already documented as prerequisites.Use Case
After session compaction, the agent loses raw conversation history. Being able to query recent Teams messages via Graph would let the agent reconstruct context that was lost during compaction, rather than relying solely on the compaction summary and memory files.
This would also help with:
Current State
attachments/graph.ts)historyLimitanddmHistoryLimitonly limit locally stored session turns, not Graph queriesmessagetool for msteams only supportspollandsendactionsreadMessagesactionsProposed
Add a
readMessages(or similar) action to the msteams plugin that queries the Graph API/chats/{id}/messagesand/teams/{teamId}/channels/{channelId}/messagesendpoints, consistent with how Discord and Slack implement it.