Skip to main content
Glama
adkins-amdg

Microsoft Teams MCP Server

by adkins-amdg

Search Teams messages

teams_search_messages
Read-onlyIdempotent

Search across Microsoft Teams chat and channel messages using full-text search. Returns matching messages with snippets and direct links for access.

Instructions

Search across the user's Teams chat and channel messages using the Microsoft Search API. Returns matching messages with a snippet and a deep link.

Note: relevance-ranked full-text search; exact phrasing and recency affect hits.

Args:

  • query (string): the search text (e.g. 'Plaid key', 'HIPAA BAA')

  • limit (number, 1-50): max hits (default 20)

  • response_format ('markdown' | 'json'): output format (default markdown)

Returns: JSON { total, count, moreResultsAvailable, hits: [{ id, from, createdDateTime, snippet, webUrl }] }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of items to return (1-50)
queryYesSearch text
response_formatNoOutput format: 'markdown' for human-readable or 'json' for machine-readablemarkdown
Behavior4/5

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

Annotations already indicate read-only and idempotent. The description adds useful behavioral context about relevance-ranked full-text search, exact phrasing, and recency affecting hits. It does not contradict annotations.

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 concise with two paragraphs and a bullet list. It front-loads the purpose and then provides details and return format. No redundant or unnecessary content.

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?

Given the tool's moderate complexity (3 params, no output schema, annotations present), the description covers purpose, behavior, parameters, and return fields. It is complete enough for an agent to invoke correctly.

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

Parameters4/5

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

Schema coverage is 100% with descriptions, so baseline is 3. The description adds value by providing concrete examples for the query parameter (e.g., 'Plaid key', 'HIPAA BAA') and clarifying defaults for limit and response_format, going beyond the schema.

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 clearly states the tool searches across Teams chat and channel messages using the Microsoft Search API, returning matching messages with a snippet and deep link. This distinguishes it from siblings like teams_get_chat_messages or teams_list_channel_messages.

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?

The description implies usage for searching messages but does not explicitly state when to use this tool versus alternatives (e.g., teams_list_channel_messages for all messages in a channel). No exclusions or contextual guidance are provided.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/adkins-amdg/teams-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server