Get File
file_getDownload a OneDrive file to a local path using a Microsoft Graph identifier, with configurable size limits and retry protection.
Instructions
✏️ Download a OneDrive file to a local path (requires user confirmation recommended)
The download URL is supplied by Microsoft Graph (never user input) and is
validated against an allow-list of Microsoft domains before use. The file
is streamed to disk in configurable chunks with retry behaviour to protect
against transient failures. Download size and timeouts respect the
environment variables MCP_FILE_DOWNLOAD_MAX_MB and
MCP_FILE_DOWNLOAD_TIMEOUT.
Args: file_id: The Microsoft Graph file identifier to download. account_id: Microsoft account identifier associated with the file. download_path: Absolute path where the file will be stored locally. Must reside within an allowed root directory.
Returns: Dictionary containing download metadata (name, size_mb, mime_type).
Raises: ValidationError: If input parameters are invalid. RuntimeError: If all download attempts fail.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | ||
| account_id | Yes | ||
| download_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||