list_files
List files and folders in OneDrive or SharePoint drive by specifying a path, SharePoint site, or drive ID. Supports filtering and sorting for precise results.
Instructions
List files and folders in OneDrive or SharePoint drive
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Folder path (e.g., "/Documents" or "" for root) | |
| siteId | No | SharePoint site ID (optional, if not provided uses personal OneDrive) | |
| site | No | Known SharePoint site alias or canonical URL (e.g., "financeiro", "socios2") | |
| siteUrl | No | Canonical SharePoint site URL (optional alternative to siteId) | |
| driveId | No | Drive ID for a specific OneDrive or SharePoint document library | |
| filter | No | OData filter (e.g., "file ne null" for files only) | |
| orderBy | No | Sort order (e.g., "name", "lastModifiedDateTime desc") | name |
| limit | No | Maximum number of items to return | |
| pageToken | No | Opaque pagination token from a previous response (Graph nextLink) |