Skip to main content
Glama
cybrlou

Office 365 Email MCP

by cybrlou

office365_send_email

Send email from a Microsoft 365 mailbox using the Graph API, supporting HTML content, attachments, and CC/BCC recipients.

Instructions

Send an email through Microsoft 365 via the Microsoft Graph API.

Uses the app-only (client-credentials) OAuth2 flow, so no user is signed in; mail is sent from the mailbox given by sender or the O365_SENDER env var. Supports plain-text or HTML bodies, CC/BCC, and local file attachments.

Args: params (SendEmailInput): Validated parameters containing: - to (list[str]): Primary recipient addresses (required). - subject (str): Subject line (required). - body (str): Body content, plain text or HTML (required). - is_html (bool): Treat body as HTML when true (default False). - cc (Optional[list[str]]): CC recipients. - bcc (Optional[list[str]]): BCC recipients. - sender (Optional[str]): From mailbox; overrides O365_SENDER. - attachments (Optional[list[str]]): Local file paths (<~3 MB total). - save_to_sent_items (bool): Keep a Sent Items copy (default True).

Returns: str: A human-readable confirmation, e.g. "Email sent from finance@contoso.com to 2 recipient(s): 'Subject'." On failure, a string beginning with "Error: " describing the problem and how to fix it (auth, permissions, mailbox, rate limits, etc.).

Examples: - "Email the Q3 report to alice@contoso.com" -> to=['alice@contoso.com'], subject='Q3 report', body='...', attachments=['/path/q3.pdf']. - Don't use to read or search mail; this tool only sends.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

The description discloses behavioral traits beyond annotations: it confirms email sending (write operation), notes default save to sent items, attachment size limit (~3 MB), and error response format ('Error:'). Annotations show readOnlyHint=false, destructiveHint=false, idempotentHint=false, with no contradictions.

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 well-structured with sections (summary, details, Args, Returns, Examples) and front-loads the core purpose. Every sentence is informative, concise, and earns its place.

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 complexity and the presence of an output schema, the description covers all necessary aspects: inputs, outputs, error handling, authentication, constraints, and examples. The sibling tool is minimal, so no additional differentiation needed.

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

Parameters5/5

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

Despite 0% schema description coverage, the description provides detailed parameter semantics in the Args section, explaining purpose, constraints, defaults, and examples for each parameter (to, subject, body, is_html, cc, bcc, sender, attachments, save_to_sent_items). This fully compensates for the lack of schema descriptions.

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 'Send an email through Microsoft 365 via the Microsoft Graph API,' specifying the action, resource, and distinguishing from the sibling tool (office365_test_connection). It explicitly warns 'Don't use to read or search mail; this tool only sends.'

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?

The description provides explicit when-to-use guidance (sending email) and when-not-to-use (reading or searching mail). It includes examples, constraints like attachment size limits, authentication details, and mentions the O365_SENDER env var. It also clarifies that it uses app-only OAuth2 flow.

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/cybrlou/office365-email-mcp'

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