Skip to main content
Glama

chat_search_messages

Read-onlyIdempotent

Search Microsoft Teams messages by keyword across all accessible teams and chats, returning message text, author, timestamp, and a direct link.

Instructions

Search Microsoft Teams messages the signed-in user can see, across every team and chat, by keyword. Returns message text, author, timestamp and a link to the message in Teams. Use for 'what did someone say about X'. chat_list_channel_messages is the tool for reading one channel in order instead of searching. Requires Chat.Read.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch keywords to find in Teams messages
max_resultsNoMaximum messages to return
Behavior5/5

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

Even with readOnlyHint and other annotations, the description adds valuable behavioral context: it specifies that the search spans all teams and chats, returns message text/author/timestamp/link, and requires Chat.Read permission. This goes beyond what annotations provide.

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?

Three concise sentences: purpose, return value, and usage guidance with alternative. Front-loaded and no unnecessary words.

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 search tool with two well-documented parameters and strong annotations, the description provides return format, permission requirement, and usage context. Nothing critical is missing for an agent to select and invoke it correctly.

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%, with query and max_results both described. The description adds minimal parameter meaning beyond the schema, merely echoing 'keyword' for query and not elaborating on max_results. Baseline 3 is appropriate.

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 Microsoft Teams messages visible to the signed-in user across all teams and chats by keyword. It also explicitly distinguishes this from sibling tool chat_list_channel_messages, which reads a single channel in order.

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?

Provides explicit usage guidance: 'Use for 'what did someone say about X'' and directly names the alternative tool for sequential channel reading. This gives clear when-to-use and when-not-to-use context.

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/nitin27may/ms-graph-mcp'

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