Skip to main content
Glama

teams_wait_for_messages

Waits for new incoming Microsoft Teams messages after a given sequence number, optionally in one chat, up to 60 seconds, and returns events plus the next sequence to resume polling.

Instructions

New incoming messages in watched chats after event number after_seq, waiting up to wait_seconds (max 60) for one. Without after_seq, only messages from now on. Returns events and seq: pass seq as after_seq next time. With chat, other chats' messages are skipped and the answer may be empty before wait_seconds.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "teams_wait_for_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
chatNoonly this chat (title or id)
after_seqNo
wait_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/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 well: it discloses that the call blocks up to wait_seconds, that 60 is the cap, that a scoped chat filter can yield an empty answer, and that seq is a resumable cursor. Missing are permission requirements and whether exceeding 60 errors or clamps.

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?

Three dense sentences that front-load the core behavior and never pad. The final sentence is grammatically tangled ('other chats' messages are skipped and the answer may be empty before wait_seconds'), costing a point on clarity but not on length.

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 3-param, no-annotation, no-output-schema tool, this covers the essentials: what it returns (events and seq), how to resume, and the empty-result edge case. It falls short on default wait_seconds, cursor invalidation, and error behavior at the 60s cap.

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

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 33% — after_seq and wait_seconds have no schema descriptions at all. The description compensates partially by defining after_seq as a resume cursor (pass back the returned seq) and wait_seconds as a bounded wait, but it never explains the 'only this chat (title or id)' matching semantics and leaves wait_seconds' default unstated.

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?

Names a specific resource and behavior: new incoming messages, with a long-poll wait bound by wait_seconds (max 60). It's clearly a blocking/polling tool, distinct from teams_read_messages, though it never names the sibling to make the distinction explicit.

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?

Gives useful operational context — 'Without after_seq, only messages from now on' and 'With chat, other chats' messages are skipped and the answer may be empty' — which implies how to use it. But it never states when to prefer this over teams_read_messages or teams_list_chats, so the routing decision is left to inference.

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