> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pinkfish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# onedrive

> File storage and sharing

**Server path:** `/onedrive` | **Type:** Application | **PCID required:** Yes

## Tools

| Tool                                                                        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`onedrive_list_items`](#onedrive_list_items)                               | List files and folders in OneDrive                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| [`onedrive_get_item`](#onedrive_get_item)                                   | Get details about a specific file or folder by ID in OneDrive                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| [`onedrive_get_item_by_path`](#onedrive_get_item_by_path)                   | Get details about a specific file or folder by path in OneDrive                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| [`onedrive_create_folder`](#onedrive_create_folder)                         | Create a new folder in OneDrive                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| [`onedrive_rename_item`](#onedrive_rename_item)                             | Rename a file or folder in OneDrive                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [`onedrive_delete_item`](#onedrive_delete_item)                             | Delete a file or folder in OneDrive                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [`onedrive_copy_item`](#onedrive_copy_item)                                 | Copy a file or folder to a new location in OneDrive                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [`onedrive_move_item`](#onedrive_move_item)                                 | Move a file or folder to a new location in OneDrive                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [`onedrive_upload_file`](#onedrive_upload_file)                             | Upload a file to OneDrive. Provide either fileUrl (to upload from a URL) or fileContent (base64 encoded content), but not both. NOTE: Newly uploaded files may not appear in search results for several minutes due to OneDrive indexing delays. Use onedrive\_list\_children or onedrive\_get\_item\_by\_path for immediate access.                                                                                                                                                                                                                                                                                   |
| [`onedrive_download_file`](#onedrive_download_file)                         | Download a file from OneDrive and store it as an artifact. Returns a link to the stored file, metadata, and a text preview for supported types (PDF, DOCX, XLSX, PPTX). NEVER use this tool for files that are supported by the microsoft excel, powerpoint, and word tools.                                                                                                                                                                                                                                                                                                                                           |
| [`onedrive_search_items`](#onedrive_search_items)                           | Search for files and folders in OneDrive. Two search modes: (1) FUZZY SEARCH (default): Full-text search across filenames and content. Without folderId, searches recursively through entire OneDrive. With folderId, only returns direct children of that folder (not recursive into subfolders). (2) EXACT MATCH: Find files with an exact filename, only searches direct children of the folder (not recursive). NOTE: Fuzzy search may not find recently uploaded files for several minutes due to OneDrive indexing delays. Use exact match with folderId for immediate results, or use onedrive\_list\_children. |
| [`onedrive_get_shared_items`](#onedrive_get_shared_items)                   | Get items shared with you in OneDrive                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| [`onedrive_create_sharing_link`](#onedrive_create_sharing_link)             | Create a sharing link for a file or folder in OneDrive                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [`onedrive_create_file`](#onedrive_create_file)                             | Create a new file in OneDrive                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| [`onedrive_list_folder_contents`](#onedrive_list_folder_contents)           | List folder contents recursively or get file details                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [`onedrive_filter_files_by_extension`](#onedrive_filter_files_by_extension) | Filter files by extension in a folder and its subfolders                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [`onedrive_extract_msg_files`](#onedrive_extract_msg_files)                 | Extract and parse .msg files from a OneDrive folder                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |

***

## onedrive\_list\_items

List files and folders in OneDrive

**Parameters:**

| Parameter  | Type   | Required | Default | Description                                 |
| ---------- | ------ | -------- | ------- | ------------------------------------------- |
| `path`     | string | No       | `""`    | Path to the folder to list, default is root |
| `pageSize` | number | No       | `25`    | Number of items to list, default is 25      |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "path": {
        "type": "string",
        "default": "",
        "description": "Path to the folder to list, default is root"
      },
      "pageSize": {
        "type": "number",
        "default": 25,
        "description": "Number of items to list, default is 25"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## onedrive\_get\_item

Get details about a specific file or folder by ID in OneDrive

**Parameters:**

| Parameter | Type   | Required | Default | Description                     |
| --------- | ------ | -------- | ------- | ------------------------------- |
| `itemId`  | string | Yes      | —       | ID of the file or folder to get |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "itemId": {
        "type": "string",
        "description": "ID of the file or folder to get"
      }
    },
    "required": [
      "PCID",
      "itemId"
    ]
  }
  ```
</Expandable>

***

## onedrive\_get\_item\_by\_path

Get details about a specific file or folder by path in OneDrive

**Parameters:**

| Parameter | Type   | Required | Default | Description                       |
| --------- | ------ | -------- | ------- | --------------------------------- |
| `path`    | string | Yes      | —       | Path to the file or folder to get |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "path": {
        "type": "string",
        "description": "Path to the file or folder to get"
      }
    },
    "required": [
      "PCID",
      "path"
    ]
  }
  ```
</Expandable>

***

## onedrive\_create\_folder

Create a new folder in OneDrive

**Parameters:**

| Parameter    | Type   | Required | Default | Description                                                        |
| ------------ | ------ | -------- | ------- | ------------------------------------------------------------------ |
| `parentPath` | string | No       | —       | Path to the parent folder to create the folder in, default is root |
| `folderName` | string | Yes      | —       | Name of the folder to create                                       |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "parentPath": {
        "type": "string",
        "description": "Path to the parent folder to create the folder in, default is root"
      },
      "folderName": {
        "type": "string",
        "description": "Name of the folder to create"
      }
    },
    "required": [
      "PCID",
      "folderName"
    ]
  }
  ```
</Expandable>

***

## onedrive\_rename\_item

Rename a file or folder in OneDrive

**Parameters:**

| Parameter | Type   | Required | Default | Description                        |
| --------- | ------ | -------- | ------- | ---------------------------------- |
| `itemId`  | string | Yes      | —       | ID of the file or folder to rename |
| `newName` | string | Yes      | —       | New name of the file or folder     |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "itemId": {
        "type": "string",
        "description": "ID of the file or folder to rename"
      },
      "newName": {
        "type": "string",
        "description": "New name of the file or folder"
      }
    },
    "required": [
      "PCID",
      "itemId",
      "newName"
    ]
  }
  ```
</Expandable>

***

## onedrive\_delete\_item

Delete a file or folder in OneDrive

**Parameters:**

| Parameter | Type   | Required | Default | Description                        |
| --------- | ------ | -------- | ------- | ---------------------------------- |
| `itemId`  | string | Yes      | —       | ID of the file or folder to delete |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "itemId": {
        "type": "string",
        "description": "ID of the file or folder to delete"
      }
    },
    "required": [
      "PCID",
      "itemId"
    ]
  }
  ```
</Expandable>

***

## onedrive\_copy\_item

Copy a file or folder to a new location in OneDrive

**Parameters:**

| Parameter         | Type   | Required | Default | Description                           |
| ----------------- | ------ | -------- | ------- | ------------------------------------- |
| `itemId`          | string | Yes      | —       | ID of the file or folder to copy      |
| `destinationPath` | string | Yes      | —       | Path to the destination folder        |
| `newName`         | string | No       | —       | New name of the copied file or folder |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "itemId": {
        "type": "string",
        "description": "ID of the file or folder to copy"
      },
      "destinationPath": {
        "type": "string",
        "description": "Path to the destination folder"
      },
      "newName": {
        "type": "string",
        "description": "New name of the copied file or folder"
      }
    },
    "required": [
      "PCID",
      "itemId",
      "destinationPath"
    ]
  }
  ```
</Expandable>

***

## onedrive\_move\_item

Move a file or folder to a new location in OneDrive

**Parameters:**

| Parameter         | Type   | Required | Default | Description                          |
| ----------------- | ------ | -------- | ------- | ------------------------------------ |
| `itemId`          | string | Yes      | —       | ID of the file or folder to move     |
| `destinationPath` | string | Yes      | —       | Path to the destination folder       |
| `newName`         | string | No       | —       | New name of the moved file or folder |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "itemId": {
        "type": "string",
        "description": "ID of the file or folder to move"
      },
      "destinationPath": {
        "type": "string",
        "description": "Path to the destination folder"
      },
      "newName": {
        "type": "string",
        "description": "New name of the moved file or folder"
      }
    },
    "required": [
      "PCID",
      "itemId",
      "destinationPath"
    ]
  }
  ```
</Expandable>

***

## onedrive\_upload\_file

Upload a file to OneDrive. Provide either fileUrl (to upload from a URL) or fileContent (base64 encoded content), but not both. NOTE: Newly uploaded files may not appear in search results for several minutes due to OneDrive indexing delays. Use onedrive\_list\_children or onedrive\_get\_item\_by\_path for immediate access.

**Parameters:**

| Parameter     | Type   | Required | Default | Description                                                                        |
| ------------- | ------ | -------- | ------- | ---------------------------------------------------------------------------------- |
| `parentPath`  | string | Yes      | —       | Path to the parent folder to upload the file to                                    |
| `fileName`    | string | Yes      | —       | Name of the file to upload                                                         |
| `fileContent` | string | No       | —       | Base64 encoded content of the file to upload. Required if fileUrl is not provided. |
| `fileUrl`     | string | No       | —       | URL of the file to upload. Required if fileContent is not provided.                |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "parentPath": {
        "type": "string",
        "description": "Path to the parent folder to upload the file to"
      },
      "fileName": {
        "type": "string",
        "description": "Name of the file to upload"
      },
      "fileContent": {
        "type": "string",
        "description": "Base64 encoded content of the file to upload. Required if fileUrl is not provided."
      },
      "fileUrl": {
        "type": "string",
        "description": "URL of the file to upload. Required if fileContent is not provided."
      }
    },
    "required": [
      "PCID",
      "parentPath",
      "fileName"
    ]
  }
  ```
</Expandable>

***

## onedrive\_download\_file

Download a file from OneDrive and store it as an artifact. Returns a link to the stored file, metadata, and a text preview for supported types (PDF, DOCX, XLSX, PPTX). NEVER use this tool for files that are supported by the microsoft excel, powerpoint, and word tools.

**Parameters:**

| Parameter     | Type    | Required | Default | Description                                                                                                                                                                                                                                 |
| ------------- | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `itemId`      | string  | Yes      | —       | ID of the file to download                                                                                                                                                                                                                  |
| `stream`      | boolean | No       | `true`  | RECOMMENDED: true (default). Returns a downloadUrl + auth headers for efficient streaming. Set to false ONLY for small files (\<2MB) requiring immediate base64 content. Setting to false for large files will blow out the context window. |
| `extractText` | boolean | No       | `true`  | Automatically extracts text from supported formats (PDF, DOCX, PPTX, XLSX) and includes it in the response. Text files do not need extraction. Set to false to skip extraction.                                                             |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "itemId": {
        "type": "string",
        "description": "ID of the file to download"
      },
      "stream": {
        "type": "boolean",
        "default": true,
        "description": "RECOMMENDED: true (default). Returns a downloadUrl + auth headers for efficient streaming. Set to false ONLY for small files (<2MB) requiring immediate base64 content. Setting to false for large files will blow out the context window."
      },
      "extractText": {
        "type": "boolean",
        "default": true,
        "description": "Automatically extracts text from supported formats (PDF, DOCX, PPTX, XLSX) and includes it in the response. Text files do not need extraction. Set to false to skip extraction."
      }
    },
    "required": [
      "PCID",
      "itemId"
    ]
  }
  ```
</Expandable>

***

## onedrive\_search\_items

Search for files and folders in OneDrive. Two search modes: (1) FUZZY SEARCH (default): Full-text search across filenames and content. Without folderId, searches recursively through entire OneDrive. With folderId, only returns direct children of that folder (not recursive into subfolders). (2) EXACT MATCH: Find files with an exact filename, only searches direct children of the folder (not recursive). NOTE: Fuzzy search may not find recently uploaded files for several minutes due to OneDrive indexing delays. Use exact match with folderId for immediate results, or use onedrive\_list\_children.

**Parameters:**

| Parameter    | Type    | Required | Default | Description                                                                                                                                                                                                                                                      |
| ------------ | ------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `query`      | string  | Yes      | —       | Search query - for fuzzy search this matches filenames and content; for exact match this must be the exact filename                                                                                                                                              |
| `folderId`   | string  | No       | —       | Folder ID to limit search to. IMPORTANT: Only returns direct children of this folder (not recursive into subfolders). If not provided, fuzzy search is recursive through entire OneDrive. Get folder IDs from onedrive\_list\_items or onedrive\_list\_children. |
| `exactMatch` | boolean | No       | `false` | If true, find files with exact filename match (direct children only, not recursive). If false (default), performs fuzzy full-text search.                                                                                                                        |
| `pageSize`   | number  | No       | `25`    | Number of items to return, default is 25                                                                                                                                                                                                                         |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "query": {
        "type": "string",
        "description": "Search query - for fuzzy search this matches filenames and content; for exact match this must be the exact filename"
      },
      "folderId": {
        "type": "string",
        "description": "Folder ID to limit search to. IMPORTANT: Only returns direct children of this folder (not recursive into subfolders). If not provided, fuzzy search is recursive through entire OneDrive. Get folder IDs from onedrive_list_items or onedrive_list_children."
      },
      "exactMatch": {
        "type": "boolean",
        "default": false,
        "description": "If true, find files with exact filename match (direct children only, not recursive). If false (default), performs fuzzy full-text search."
      },
      "pageSize": {
        "type": "number",
        "default": 25,
        "description": "Number of items to return, default is 25"
      }
    },
    "required": [
      "PCID",
      "query"
    ]
  }
  ```
</Expandable>

***

## onedrive\_get\_shared\_items

Get items shared with you in OneDrive

**Parameters:**

| Parameter  | Type   | Required | Default | Description             |
| ---------- | ------ | -------- | ------- | ----------------------- |
| `pageSize` | number | No       | `25`    | Number of items to list |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "pageSize": {
        "type": "number",
        "default": 25,
        "description": "Number of items to list"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## onedrive\_create\_sharing\_link

Create a sharing link for a file or folder in OneDrive

**Parameters:**

| Parameter | Type   | Required | Default  | Description                                           |
| --------- | ------ | -------- | -------- | ----------------------------------------------------- |
| `itemId`  | string | Yes      | —        | ID of the file or folder to create a sharing link for |
| `type`    | string | No       | `"view"` | Type of sharing link to create                        |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "itemId": {
        "type": "string",
        "description": "ID of the file or folder to create a sharing link for"
      },
      "type": {
        "type": "string",
        "default": "view",
        "description": "Type of sharing link to create"
      }
    },
    "required": [
      "PCID",
      "itemId"
    ]
  }
  ```
</Expandable>

***

## onedrive\_create\_file

Create a new file in OneDrive

**Parameters:**

| Parameter    | Type   | Required | Default | Description                                     |
| ------------ | ------ | -------- | ------- | ----------------------------------------------- |
| `parentPath` | string | Yes      | —       | Path to the parent folder to create the file in |
| `fileName`   | string | Yes      | —       | Name of the file to create                      |
| `content`    | string | No       | `""`    | Content of the file to create, default is empty |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "parentPath": {
        "type": "string",
        "description": "Path to the parent folder to create the file in"
      },
      "fileName": {
        "type": "string",
        "description": "Name of the file to create"
      },
      "content": {
        "type": "string",
        "default": "",
        "description": "Content of the file to create, default is empty"
      }
    },
    "required": [
      "PCID",
      "parentPath",
      "fileName"
    ]
  }
  ```
</Expandable>

***

## onedrive\_list\_folder\_contents

List folder contents recursively or get file details

**Parameters:**

| Parameter  | Type   | Required | Default | Description                                                          |
| ---------- | ------ | -------- | ------- | -------------------------------------------------------------------- |
| `path`     | string | No       | —       | Path to the folder or file to list, defaults to root if not provided |
| `maxDepth` | number | No       | `3`     | Maximum depth for recursive folder listing, defaults to 3            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "path": {
        "type": "string",
        "description": "Path to the folder or file to list, defaults to root if not provided"
      },
      "maxDepth": {
        "type": "number",
        "default": 3,
        "description": "Maximum depth for recursive folder listing, defaults to 3"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## onedrive\_filter\_files\_by\_extension

Filter files by extension in a folder and its subfolders

**Parameters:**

| Parameter    | Type   | Required | Default  | Description                                              |
| ------------ | ------ | -------- | -------- | -------------------------------------------------------- |
| `folderPath` | string | Yes      | —        | Path to the folder to search in. Empty string means root |
| `extension`  | string | No       | `".msg"` | File extension to filter by (e.g., ".pdf", ".docx")      |
| `maxDepth`   | number | No       | `3`      | Maximum depth for recursive folder search, defaults to 3 |
| `maxResults` | number | No       | `100`    | Maximum number of results to return, defaults to 100     |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "folderPath": {
        "type": "string",
        "description": "Path to the folder to search in. Empty string means root"
      },
      "extension": {
        "type": "string",
        "default": ".msg",
        "description": "File extension to filter by (e.g., \".pdf\", \".docx\")"
      },
      "maxDepth": {
        "type": "number",
        "default": 3,
        "description": "Maximum depth for recursive folder search, defaults to 3"
      },
      "maxResults": {
        "type": "number",
        "default": 100,
        "description": "Maximum number of results to return, defaults to 100"
      }
    },
    "required": [
      "PCID",
      "folderPath"
    ]
  }
  ```
</Expandable>

***

## onedrive\_extract\_msg\_files

Extract and parse .msg files from a OneDrive folder

**Parameters:**

| Parameter            | Type    | Required | Default | Description                                                                                               |
| -------------------- | ------- | -------- | ------- | --------------------------------------------------------------------------------------------------------- |
| `folderPath`         | string  | Yes      | —       | Path to the folder containing .msg files                                                                  |
| `includeAttachments` | boolean | No       | `false` | Include attachments in the response, default is false, if true, the response will include the attachments |
| `maxResults`         | number  | No       | `100`   | Maximum number of .msg files to process                                                                   |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "folderPath": {
        "type": "string",
        "description": "Path to the folder containing .msg files"
      },
      "includeAttachments": {
        "type": "boolean",
        "default": false,
        "description": "Include attachments in the response, default is false, if true, the response will include the attachments"
      },
      "maxResults": {
        "type": "number",
        "default": 100,
        "description": "Maximum number of .msg files to process"
      }
    },
    "required": [
      "PCID",
      "folderPath"
    ]
  }
  ```
</Expandable>
