storage
Microsoft OneDrive CLI for Coding Agents
Use the Microsoft OneDrive CLI for coding agents with headless JSON commands, schema discovery, credentials, and permission controls.
6 functions 5 read 1 write Bearer token auth
Microsoft OneDrive CLI for Coding Agents
Let coding agents discover schemas and execute integration functions through CLI commands or MCP.
Use this pattern when another coding agent needs exact commands and schema discovery. The Microsoft OneDrive CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Microsoft OneDrive CLI for Coding Agents
kosmokrator integrations:configure one_drive --set access_token="$ONE_DRIVE_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call one_drive.onedrive_list_files '{"top":1,"skip_token":"example_skip_token"}' --json Discovery Before Execution
Agents and scripts can inspect Microsoft OneDrive docs and schemas before choosing a function.
kosmo integrations:docs one_drive --json
kosmo integrations:docs one_drive.onedrive_list_files --json
kosmo integrations:schema one_drive.onedrive_list_files --json
kosmo integrations:search "Microsoft OneDrive" --json
kosmo integrations:list --json Useful Microsoft OneDrive CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
one_drive.onedrive_list_files | Read | top, skip_token | List files and folders in the root of the user's OneDrive. Returns item names, IDs, sizes, and metadata. Use the item ID with onedrive_get_file or onedrive_download_file for details or content. |
one_drive.onedrive_get_file | Read | id | Get detailed metadata for a specific file or folder in OneDrive by its item ID. Returns name, size, dates, MIME type, and download URL. |
one_drive.onedrive_upload_file | Write | path, content, content_type | Upload a file to OneDrive. Specify the destination path and file content. Creates the file if it does not exist, or replaces it if it does. Supports files up to 4 MB via the simple upload API. |
one_drive.onedrive_download_file | Read | id | Download a file's content from OneDrive by its drive item ID. Returns the raw file content. Use onedrive_list_files or onedrive_get_file to find the item ID. |
one_drive.onedrive_list_shared | Read | top, skip_token | List files and folders that have been shared with the current user. Returns item names, IDs, sizes, and metadata for shared content. |
one_drive.onedrive_get_current_user | Read | none | Get the profile of the currently authenticated Microsoft user. Returns display name, email, job title, and other profile details. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.