> This page is for Agent Handler.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# OneDrive

**Authentication:** OAuth or access token. See [Magic Link](/merge-agent-handler/features/magic-link) for the runtime auth flow, or [Application credentials](/merge-agent-handler/admin-setup/add-oauth-credentials) to bring your own OAuth app.

## Sample use cases

* Find files in `/Sales/Proposals` modified in the last 7 days.
* Share the `Q2 Onboarding` folder with view-only access to [onboarding@acme.com](mailto:onboarding@acme.com).
* Move files older than 1 year from `/Active` to `/Archive`.

## Available Tools

#### advanced\_search

Perform advanced search with filters and content search

#### search\_by\_content\_type

Search for files by content type and properties

#### get\_file\_activity

Get activity history for files and folders

#### search\_recent\_files

Search for recently created or modified files

#### get\_my\_drive

Get the user's default OneDrive

#### get\_drive

Get information about a specific drive by ID

#### list\_my\_drives

List all drives available to the user

#### get\_root\_folder

Get the root folder of a drive

#### get\_special\_folder

Get a special folder (Documents, Photos, etc.)

#### get\_drive\_usage

Get storage usage information for a drive

#### get\_drive\_owner

Get owner information for a drive

#### get\_item

Get a drive item by ID or path

#### list\_items

List children of a folder

#### create\_folder

Create a new folder

#### upload\_file

Upload a file to OneDrive

#### download\_item

Download file content from OneDrive

#### update\_item

Update item metadata

#### move\_item

Move an item to a different folder

#### copy\_item

Copy an item to a different location

#### delete\_item

Delete an item from OneDrive

#### search\_items

Search for items in OneDrive

#### list\_permissions

List permissions for an item

#### get\_permission

Get a specific permission by ID

#### create\_sharing\_link

Create a sharing link for an item

#### grant\_permission

Grant permissions to recipients for an item

#### update\_permission

Update roles for a user/group permission

#### delete\_permission

Remove a permission from an item

#### access\_shared\_item

Access a shared item using sharing URL

#### get\_sharing\_link

Get sharing link information for an item

#### check\_item\_sharing\_status

Check sharing status of an item

#### get\_thumbnails

Get all available thumbnails for an item

#### get\_thumbnail

Get a specific thumbnail size for an item

#### get\_preview

Generate a preview link for an item

#### check\_thumbnail\_availability

Check if thumbnails are available for an item

#### get\_thumbnail\_urls

Get thumbnail URLs for an item

#### list\_item\_versions

List all versions of a file

#### get\_item\_version

Get details of a specific version

#### restore\_item\_version

Restore a previous version of a file

#### compare\_item\_versions

Compare two versions of a file

#### list\_deleted\_items

List items in the recycle bin

#### restore\_deleted\_item

Restore an item from the recycle bin

#### get\_version\_download\_url

Get download URL for a specific version of a file