Skip to main content
Glama
BiteFoundry Teams MCP Server

BiteFoundry Teams MCP Server

get_messages

Read-onlyIdempotent

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

NameRequiredDescriptionDefault
limitNoMaximum number of messages to return (1..1000, default 50).
beforeNoOptional ISO-8601 timestamp, YYYY-MM-DD date, or cached msg_id to paginate older messages before that point.
targetYesConversation conv_key (chat:... or chan:team:channel), "Team/Channel", or unique conversation title substring.
compactNoCompact output (default true) omitting verbose metadata; set false for full conversation and message objects.
offlineNoWhen true, read only from the local SQLite cache without calling Microsoft Graph.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.1.1
    • changedInput schema / properties / before / description
      Previous value: -"Optional ISO-8601 timestamp, YYYY-MM-DD date, or cached msg_id to read older messages preceding it."New value: +"Optional ISO-8601 timestamp, YYYY-MM-DD date, or cached msg_id to paginate older messages before that point."
    • changedInput schema / properties / compact / description
      Previous value: -"Compact output (default). Set false for full conversation and message objects."New value: +"Compact output (default true) omitting verbose metadata; set false for full conversation and message objects."
    • addedInput schema / properties / limit / description
      Added value: +"Maximum number of messages to return (1..1000, default 50)."
    • changedInput schema / properties / offline / description
      Previous value: -"Read from the local SQLite cache only (no Graph request)."New value: +"When true, read only from the local SQLite cache without calling Microsoft Graph."
    • changedInput schema / properties / target / description
      Previous value: -"conv_key, \"Team/Channel\", or unique conversation title."New value: +"Conversation conv_key (chat:... or chan:team:channel), \"Team/Channel\", or unique conversation title substring."
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

The annotations already establish read-only, idempotent, non-destructive, and open-world behavior. The description adds valuable context beyond that: it defaults to live Microsoft Graph fetches, gives an approximate request ratio of 1 per 50 messages, and explains the offline SQLite cache mode. It does not cover failure modes or permissions, but the added behavioral detail is strong.

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?

The description is three tight sentences with zero waste. It is front-loaded with the core operation and sibling routing, then adds data-source behavior and the return shape. Every sentence contributes useful information.

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?

For a five-parameter read tool with annotations but no output schema, the description is complete enough: it covers alternatives, default live-fetch behavior, offline cache mode, request cost, and the returned object shape including pagination fields. Nothing essential for correct invocation is missing.

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 all five parameters. The description adds some meaning by stating oldest-first ordering and clarifying offline=true, but it does not substantially expand on target formats, limit, compact, or before semantics beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: read messages from a chat or team channel. It also specifies the ordering (oldest first) and explicitly distinguishes the tool from get_thread and search_messages, so an agent can identify its purpose without opening the schema.

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

Usage Guidelines5/5

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

It gives explicit routing guidance: use get_thread for replies under a channel root post, and search_messages for full-text search across cached history. It also explains when to use offline=true versus the default live fetch, leaving little to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.