Outlook upload attachment

outlook__upload_attachment

An active upload at the same path is reused; otherwise the attachment is downloaded server-side using the selected Outlook identity or the project-scoped mock integration service.

Attachment bytes and OAuth credentials never pass through model context.

Access

Requires a project integration connection for outlook.

Call type: Can change resources.

Arguments

FieldTypeRequiredDescription and constraints
project_referencestringNoProject ID or slug
message_idstringYesOutlook message ID containing the attachment. Minimum length: 1.
attachment_idstringYesOutlook attachment ID returned by list_attachments. Minimum length: 1.
file_pathstringYesDestination upload path (for example, inbox/attachments/submission-id/job.pdf).
content_typestringNoMIME type override for a fresh download; defaults to the Microsoft Graph response content type. An authorized existing upload is reused with its stored MIME type. Minimum length: 1.
max_bytesintegerNoOptional fresh attachment download limit in bytes. Defaults to and cannot exceed 26214400 (25 MiB). Does not limit an authorized existing upload reused without downloading. Maximum: 26214400.

Example request

Send this JSON-RPC request through an initialized MCP client. Replace sample identifiers and values before calling the tool. See MCP client setup.

request.json
{  "jsonrpc": "2.0",  "id": 1,  "method": "tools/call",  "params": {    "name": "outlook__upload_attachment",    "arguments": {      "message_id": "example",      "attachment_id": "example",      "file_path": "example"    }  }}

Result

The published output shape is summarized below. Inspect both the MCP response content and isError when handling a call.

FieldTypeRequiredDescription and constraints
upload_idstringYesPersisted upload UUID. Format: uuid.
file_pathstringYesStorage path including the project id prefix. Prefer path when chaining upload tools. get_upload_download_url also accepts this legacy value within the same project.
pathstringYesPath relative to the project root, without the project id. Pass this path value as the upload_reference of get_upload_download_url and as the path of the other upload tools.
file_namestringYesFilename from the stored project-relative path.
content_typestringYesEffective stored MIME type; application/octet-stream when unavailable. Minimum length: 1.
sizeintegerYesActual stored byte size, including zero. Reused uploads retain their stored size; fresh downloads obey the tool byte limit. Minimum: 0. Maximum: 9007199254740991.
statusstringYesPersisted upload status returned by the storage record, normally active.

Full schemas

input-schema.json
{  "type": "object",  "properties": {    "project_reference": {      "type": "string",      "description": "Project ID or slug"    },    "message_id": {      "type": "string",      "minLength": 1,      "description": "Outlook message ID containing the attachment."    },    "attachment_id": {      "type": "string",      "minLength": 1,      "description": "Outlook attachment ID returned by list_attachments."    },    "file_path": {      "type": "string",      "description": "Destination upload path (for example, inbox/attachments/submission-id/job.pdf)."    },    "content_type": {      "type": "string",      "minLength": 1,      "description": "MIME type override for a fresh download; defaults to the Microsoft Graph response content type. An authorized existing upload is reused with its stored MIME type."    },    "max_bytes": {      "type": "integer",      "exclusiveMinimum": 0,      "maximum": 26214400,      "description": "Optional fresh attachment download limit in bytes. Defaults to and cannot exceed 26214400 (25 MiB). Does not limit an authorized existing upload reused without downloading."    }  },  "required": [    "message_id",    "attachment_id",    "file_path"  ],  "additionalProperties": false,  "description": "Arguments for the outlook__upload_attachment tool.",  "$schema": "http://json-schema.org/draft-07/schema#"}
output-schema.json
{  "type": "object",  "properties": {    "upload_id": {      "type": "string",      "format": "uuid",      "description": "Persisted upload UUID."    },    "file_path": {      "type": "string",      "description": "Storage path including the project id prefix. Prefer `path` when chaining upload tools. `get_upload_download_url` also accepts this legacy value within the same project."    },    "path": {      "type": "string",      "description": "Path relative to the project root, without the project id. Pass this `path` value as the `upload_reference` of `get_upload_download_url` and as the path of the other upload tools."    },    "file_name": {      "type": "string",      "description": "Filename from the stored project-relative path."    },    "content_type": {      "type": "string",      "minLength": 1,      "description": "Effective stored MIME type; application/octet-stream when unavailable."    },    "size": {      "type": "integer",      "minimum": 0,      "maximum": 9007199254740991,      "description": "Actual stored byte size, including zero. Reused uploads retain their stored size; fresh downloads obey the tool byte limit."    },    "status": {      "type": "string",      "description": "Persisted upload status returned by the storage record, normally active."    }  },  "required": [    "upload_id",    "file_path",    "path",    "file_name",    "content_type",    "size",    "status"  ],  "additionalProperties": false,  "description": "Structured download url to project upload output schema for MCP tools.",  "$schema": "http://json-schema.org/draft-07/schema#"}