Upload Text File to OneDrive
upload_fileUpload text-based content such as plain text, Markdown, CSV, JSON, HTML, or XML directly to OneDrive, with rename, replace, or fail conflict handling.
Instructions
Upload TEXT content (plain text, markdown, CSV, JSON, HTML, XML) to OneDrive inline via this tool call. For binary files (docx, pdf, images, etc.), use get_upload_config (HTTP/SSE) or upload_file_from_path (stdio/local) — never base64-encode binary into this tool's content param. Max ~4 MB text.
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": "<path>",
"content": "<content>"
},
"name": "upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Destination path in colon-path format (e.g., /me/drive/root:/Documents/file.txt:/content) | |
| content | Yes | Text content to upload (UTF-8) | |
| content_type | No | MIME type of the content, default text/plain. Must be a text type (text/*, application/json, application/xml, application/javascript, *+json, *+xml); binary types are rejected. It only gates this check: OneDrive decides the stored file's MIME type itself and may not keep this value. | |
| conflict_behavior | No | Conflict behavior: "rename" (default), "replace" overwrites, "fail" returns 409 on collision |