Download OneDrive File
download_fileRetrieves a file's metadata and download URL, returns inline text content under 100KB, and provides raw bytes when extraction fails or file types are unsupported.
Instructions
Get a file's metadata and download URL. Returns content inline for text files under 100KB. For a SharePoint file, pass drive_id as well — without it the item is looked up in your own OneDrive and will not be found. For readable text from PDF/DOCX/XLSX, use read_document instead; come here when extraction fails (scanned PDFs, unsupported types, files over the extraction cap) or you need raw bytes.
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": {
"item_id": "<item_id>"
},
"name": "download_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item_id | Yes | Drive item ID | |
| drive_id | No | Drive ID holding the item. Required for SharePoint; omit for your own OneDrive. |