graph_get_file_bytes
Download a file's binary content as base64-encoded bytes (4MB limit) when its download URL cannot be fetched. Use it for OneDrive files needing direct byte access.
Instructions
Download a file as base64-encoded bytes (max 4MB).
Use this for a binary file when you cannot fetch the downloadUrl that graph_get_file_content hands back. The bytes are returned in the 'contentBytes' field. Larger files are rejected, so use the downloadUrl for those.
Args: file_id: The file ID (from graph_list_files or graph_search_files). drive_id: Drive ID to act on. Empty targets your own OneDrive.
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": {
"file_id": "<file_id>"
},
"name": "graph_get_file_bytes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | ||
| drive_id | No |