Skip to main content
Glama

Connect Microsoft 365 Account

connect_m365_account

Connect a Microsoft 365 account (or add another one, or sign one in again). Call once to get a login code, then call again after you've authenticated at microsoft.com/devicelogin to confirm the connection. Pass include_channel_messages: true to also read Teams channel messages and search them — that permission needs an administrator of your Microsoft 365 organization; without that approval the sign-in is refused and the account keeps its current access.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
include_channel_messagesNoAlso request access to Teams channel messages and message search. Needs an administrator of the Microsoft 365 organization; without that approval this sign-in is refused and the account keeps its current access.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNo
messageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / include_channel_messages
      Added value: +{
      +  "description": "Also request access to Teams channel messages and message search. Needs an administrator of the Microsoft 365 organization; without that approval this sign-in is refused and the account keeps its current access.",
      +  "type": "boolean"
      +}
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing that this is a two-phase, out-of-band flow requiring the user to visit a URL between calls, that the channel-message permission is gated on tenant-admin approval, and that a refused sign-in leaves the account's existing access intact (reinforcing non-destructive behavior). These are the details an agent needs to sequence the call correctly.

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 tightly packed sentences with no filler: purpose first, then the two-call procedure, then the optional flag and its gating condition. The critical operational detail (second call required after external authentication) is front-loaded rather than buried.

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 single-optional-parameter connection tool with an output schema available for return values, the description covers everything the agent needs: the multi-step sequencing, the out-of-band authentication requirement, and the admin-approval gate. Nothing material is left to inference.

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 description coverage is 100%, so the schema already fully documents include_channel_messages. The description's treatment of the flag is essentially a restatement of the schema text, adding no syntax or format detail beyond it. Baseline 3 applies when the schema carries the semantics.

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?

States a specific verb and resource ('Connect a Microsoft 365 account') and immediately covers the related cases of adding an additional account or re-authenticating an existing one. An agent can distinguish this from siblings like disconnect_m365_account or list_m365_accounts without opening any schema.

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

Usage Guidelines4/5

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

Gives an explicit procedure: call once to obtain a login code, then call again after authenticating at microsoft.com/devicelogin. It also states the prerequisite (administrator approval) for the channel-messages permission. It stops short of naming alternative tools for other account operations, but the when/how guidance is clear.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources