Skip to main content
Glama
Microsoft 365 MCP Server

Microsoft 365 MCP Server

by Softeria

get-mail-message-mime

get-mail-message-mime
Read-only

Download an Outlook email as raw RFC 5322 MIME (.eml) content by message ID, preserving original headers, body, and encoded attachments for archiving or analysis.

Instructions

Download the raw MIME source (RFC 5322 .eml content) of an Outlook email message by its message ID. Returns the complete original message including headers and encoded attachments.

đź’ˇ TIP: Download an email message as raw RFC 5322 MIME content (.eml format). Use this when archiving an email to disk preserving all original headers, body, and inline-encoded attachments. Returns the MIME stream as text. Find the message id with list-mail-messages first.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "messageId": "<messageId>"
    },
    "name": "get-mail-message-mime"
  }
}

Input Schema

NameRequiredDescriptionDefault
AcceptNoAccept header for the response representation. Defaults to "text/plain". Leave unset unless you need a different format.
fileNameNoName of the file, used as the last segment of the returned resource URI when the server runs with blob output. Optional.
messageIdYesValue for the 'messageId' path segment. Pass it under the name 'messageId', not as 'id'. Use the 'id' field of the message object as returned by Microsoft Graph.
fetchAllPagesNoFollow @odata.nextLink and merge up to 100 pages into one response. Can return enormous payloads—only when the user explicitly needs a full export. Prefer a small $top first, then paginate or narrow with $filter/$search.
includeHeadersNoInclude response headers (including ETag) in the response metadata
excludeResponseNoExclude the full response body and only return success or failure indication
includeHiddenMessagesNoInclude Hidden Messages

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.181.0
    • changedInput schema / properties / Accept / description
      Previous value: -"Accept header for the response representation. Defaults to \"text/plain\". Only set this when Graph asks for a different format — e.g. a 403 SpeakerAttributionNotAllowed on transcript content names the media type to retry with."New value: +"Accept header for the response representation. Defaults to \"text/plain\". Leave unset unless you need a different format."
    • addedInput schema / properties / Accept / maxLength
      Added value: +256
    • addedInput schema / properties / Accept / pattern
      Added value: +"^(?:[\\x21-\\x7E](?:[\\x20-\\x7E]*[\\x21-\\x7E])?)?$"
  2. Changed1 schema field changedv0.166.0
    • addedInput schema / properties / fileName
      Added value: +{
      +  "description": "Name of the file, used as the last segment of the returned resource URI when the server runs with blob output. Optional.",
      +  "type": "string"
      +}
  3. Changed1 schema field changedv0.149.1
    • addedInput schema / properties / Accept
      Added value: +{
      +  "description": "Accept header for the response representation. Defaults to \"text/plain\". Only set this when Graph asks for a different format — e.g. a 403 SpeakerAttributionNotAllowed on transcript content names the media type to retry with.",
      +  "type": "string"
      +}
  4. Changed1 schema field changedv0.134.4
    • changedInput schema / properties / messageId / description
      Previous value: -"Path parameter: messageId"New value: +"Value for the 'messageId' path segment. Pass it under the name 'messageId', not as 'id'. Use the 'id' field of the message object as returned by Microsoft Graph."
  5. Changed1 schema field changedv0.131.2
    • changedInput schema / additionalProperties
      Previous value: -falseNew value: +true
  6. Addedv0.114.0
  7. Removedv0.112.2
  8. Addedv0.110.0
  9. Removedv0.108.0
  10. Addedv0.96.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover safety (readOnlyHint, destructiveHint false, openWorldHint), so the description's added value is the return shape: complete original message with headers and encoded attachments delivered as a text MIME stream. It omits practical caveats such as large-message sizes or timeouts.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded and readable, but the TIP block restates the opening sentence almost verbatim ('Download an email message as raw RFC 5322 MIME content (.eml format)'), and the return-format note is repeated three times, so not every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only single-message fetch, the description covers purpose and output, but the schema carries seven parameters, several of which (fetchAllPages, includeHiddenMessages) look unrelated to a MIME download and are left unaddressed. An agent has no guidance on whether to set them.

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%, so the schema already documents messageId, Accept, fileName and the rest. The only added meaning is the hint to look up the id via list-mail-messages, which the schema largely states already. Baseline 3 applies.

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 ('Download the raw MIME source (RFC 5322 .eml content) of an Outlook email message by its message ID') and describes the payload returned, which cleanly separates it from get-mail-message and read-mail-text.

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 a concrete when-to-use condition ('archiving an email to disk preserving all original headers, body, and inline-encoded attachments') and points to list-mail-messages for obtaining the id. It never names the nearest alternative (get-mail-message, read-mail-text) as an explicit exclusion.

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

Deploy Server

Other Tools