Skip to content

feat: reference attachments (OneDrive/SharePoint file links) #129

Description

Summary

Add support for attaching OneDrive/SharePoint files as reference attachments in send-email and draft. Cloud attachments avoid size limits and enable real-time collaboration on shared files.

Motivation

ryaker/outlook-mcp and XenoXilus/outlook-mcp both support OneDrive operations. Cloud-first attachment workflows are increasingly common in enterprise — sharing a link to a file rather than a copy avoids version conflicts and bypasses the 3MB direct attachment limit.

Implementation

Graph API: referenceAttachment resource type

  • @odata.type: #microsoft.graph.referenceAttachment
  • sourceUrl: OneDrive/SharePoint file URL
  • providerType: oneDriveConsumer, oneDriveBusiness, dropbox, other
  • permission: view, edit, anonymousView, anonymousEdit, organizationView, organizationEdit

Changes to existing tools:

  • send-email: Add cloudAttachments parameter (array of OneDrive/SharePoint URLs)
  • draft: Add cloudAttachments parameter

Optional companion: list-drive-files action or tool to browse OneDrive root/recent files for URL discovery. Keep minimal — we're not a file manager.

Permissions: Requires Files.Read or Files.ReadWrite scope for OneDrive access.

Effort

Medium — reference attachment creation + optional OneDrive file listing.

Acceptance Criteria

  • send-email and draft accept cloudAttachments parameter
  • Creates proper referenceAttachment objects with OneDrive URLs
  • Supports permission levels (view, edit)
  • Works with both personal OneDrive and OneDrive for Business
  • Dry-run shows attachment details
  • Unit tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions