download_file
Downloads a OneDrive file to local disk for local access while keeping the source unchanged; saves as a plain filename and refuses to overwrite existing files.
Instructions
Download a OneDrive file's content to local disk (read-only — the source file in OneDrive is never modified).
Args: path_or_id: Human path (e.g. '/Documents/foo.pdf') or Graph item id of the FILE to download. dest_filename: Optional bare local filename to save as (defaults to the OneDrive file's own name). Saved under DOWNLOAD_DIR. Must be a plain file name (no path separators) and must not already exist — an existing destination raises an error instead of being silently overwritten.
Returns {local_path, size_bytes, mime_type, source_name}. The file is always saved to disk (owner-only permissions); base64 content is not returned to keep responses small and to safely handle large files.
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": {
"path_or_id": "<path_or_id>"
},
"name": "download_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path_or_id | Yes | ||
| dest_filename | No |