Skip to main content
Glama
Softeria

Microsoft 365 MCP Server

by Softeria

list-mail-attachments

list-mail-attachments
Read-only

Lists attachments on an email message, returning metadata like name, content type, size, and inline status to help decide which files to download.

Instructions

Retrieve a list of attachment objects.

đź’ˇ TIP: Lists attachments on a message: id, name, contentType, size, isInline. To download the bytes, call download-bytes with target=/me/messages/{message-id}/attachments/{attachment-id}/$value (the /$value suffix returns raw bytes; the bare attachment URL embeds contentBytes in JSON which can truncate large files).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNoPage size (Graph $top). Start small (e.g. 5–15) so responses fit the model context; raise only if needed. Use $select to return fewer fields per item. For more rows, use @odata.nextLink from the response instead of a very large $top.
skipNoItems to skip for pagination. Not supported with $search.
countNoSet true to enable advanced query mode (ConsistencyLevel: eventual). Required for complex $filter on flag/flagStatus or contains().
expandNoNavigation properties to inline, e.g. attachments on a message or event. Only navigation properties can be expanded: expanding a non-navigation property such as a message body fails with "Parsing OData Select and Expand failed", and an unsupported value may be ignored rather than reported. Request ordinary fields with $select instead.
filterNoOData filter expression. Add $count=true for advanced filters (flag/flagStatus, contains()). Cannot combine with $search.
searchNoKQL search query — wrap value in double quotes. Cannot combine with $filter.
selectNoComma-separated fields to return, e.g. id,subject,from,receivedDateTime
orderbyNoSort expression, e.g. receivedDateTime desc
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

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed2 schema fields changedv0.134.4
    • changedInput schema / properties / expand / description
      Previous value: -"Expand related entities"New value: +"Navigation properties to inline, e.g. attachments on a message or event. Only navigation properties can be expanded: expanding a non-navigation property such as a message body fails with \"Parsing OData Select and Expand failed\", and an unsupported value may be ignored rather than reported. Request ordinary fields with $select instead."
    • 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."
  2. Changed1 schema field changedv0.131.2
    • changedInput schema / additionalProperties
      Previous value: -falseNew value: +true
  3. Addedv0.114.0
  4. Removedv0.112.2
  5. Addedv0.110.0
  6. Removedv0.108.0
  7. Changed16 schema fields changedv0.96.0
    • changedInput schema / properties / count / description
      Previous value: -"Include count of items"New value: +"Set true to enable advanced query mode (ConsistencyLevel: eventual). Required for complex $filter on flag/flagStatus or contains()."
    • changedInput schema / properties / fetchAllPages / description
      Previous value: -"Automatically fetch all pages of results"New value: +"Follow @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."
    • changedInput schema / properties / filter / description
      Previous value: -"Filter items by property values"New value: +"OData filter expression. Add $count=true for advanced filters (flag/flagStatus, contains()). Cannot combine with $search."
    • changedInput schema / properties / orderby / description
      Previous value: -"Order items by property values"New value: +"Sort expression, e.g. receivedDateTime desc"
    • removedInput schema / properties / orderby / items
      Removed value: -{
      -  "type": "string"
      -}
    • changedInput schema / properties / orderby / type
      Previous value: -"array"New value: +"string"
    • changedInput schema / properties / search / description
      Previous value: -"Search items by search phrases"New value: +"KQL search query — wrap value in double quotes. Cannot combine with $filter."
    • changedInput schema / properties / select / description
      Previous value: -"Select properties to be returned"New value: +"Comma-separated fields to return, e.g. id,subject,from,receivedDateTime"
    • removedInput schema / properties / select / items
      Removed value: -{
      -  "type": "string"
      -}
    • changedInput schema / properties / select / type
      Previous value: -"array"New value: +"string"
    • changedInput schema / properties / skip / description
      Previous value: -"Skip the first n items"New value: +"Items to skip for pagination. Not supported with $search."
    • removedInput schema / properties / skip / minimum
      Removed value: -0
    • changedInput schema / properties / skip / type
      Previous value: -"integer"New value: +"number"
    • changedInput schema / properties / top / description
      Previous value: -"Show only the first n items"New value: +"Page size (Graph $top). Start small (e.g. 5–15) so responses fit the model context; raise only if needed. Use $select to return fewer fields per item. For more rows, use @odata.nextLink from the response instead of a very large $top."
    • removedInput schema / properties / top / minimum
      Removed value: -0
    • changedInput schema / properties / top / type
      Previous value: -"integer"New value: +"number"
  8. First observedv0.31.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false. Description adds value by explaining that listing returns metadata while downloading requires a different endpoint. No mention of rate limits or auth beyond 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?

Description is extremely concise: one sentence for purpose plus a short tip. No fluff, front-loaded, every sentence adds value.

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

Completeness4/5

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

For a list tool with good annotations and full parameter documentation, the description is mostly complete. It lists return fields and covers pagination hints in the schema. Minor gap: does not explicitly state that response includes nextLink for pagination.

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 baseline is 3. The description does not add additional meaning beyond the schema's parameter descriptions; it only includes a tip about downloading.

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?

Title and description clearly state 'Retrieve a list of attachment objects' and list specific fields returned (id, name, contentType, size, isInline). Distinguishes from sibling 'download-bytes' by noting how to download raw bytes.

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?

Description includes a tip directing to 'download-bytes' for downloading content, providing usage context. However, it does not explicitly state when to use this tool vs other attachment operations like add or delete.

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/Softeria/ms-365-mcp-server'

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