list_sharepoint_files
List the files and folders in a SharePoint site's document library, as the authorized user sees them. Without driveId it reads the site's default library and also returns the site's other libraries (driveId each). Pass folderId to open a folder, or search to find files by name or content in the library. Each item's driveItemId (with driveId for a non-default library) is what attach_sharepoint_document takes. Read only; requires Sites.Read.All delegated scope, like list_sharepoint_sites.
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": {
"siteId": "<siteId>"
},
"name": "list_sharepoint_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | nextCursor from a previous call, for the next page. | |
| search | No | Find files by name or content in the library instead of listing a folder. | |
| siteId | Yes | Site id from list_sharepoint_sites. | |
| driveId | No | A document library id from this tool's libraries list. Omit for the site's default library. | |
| folderId | No | A folder's driveItemId to list its contents. Omit for the library root. |