graph_get_file_content
Retrieves file content from OneDrive or SharePoint: returns text files directly and provides a temporary download URL for binary files, enabling access by file ID.
Instructions
Get the content of a file from OneDrive or a SharePoint document library.
For text-based files (txt, csv, json, etc.), returns the file content directly. For binary files (images, docx, pdf, etc.), returns a temporary download URL instead. Use graph_get_file_bytes when you have no way to fetch that URL yourself.
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_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | ||
| drive_id | No |