Microsoft 365 SharePoint
v0.2.2Microsoft 365 SharePoint via Graph: sites, libraries, pages, lists, search, file/list mutations.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_site_document_libraries
List document libraries (drives) in a SharePoint site.
| Parameter | Type | Description |
|---|---|---|
siteId | string | SharePoint site ID |
top | number | Max libraries to return (default: 50) |
list_library_files
List files and folders in a SharePoint document library. Defaults to root folder.
| Parameter | Type | Description |
|---|---|---|
driveId | string | Document library (drive) ID from list_site_document_libraries |
path | string | Folder path within the library (e.g., "General/Reports"). Omit for root. |
top | number | Max items to return (default: 50) |
get_library_file
Get metadata for a specific file or folder in a SharePoint document library.
| Parameter | Type | Description |
|---|---|---|
driveId | string | Document library (drive) ID |
itemId | string | File or folder item ID |
download_library_file
Get a download URL for a file in a SharePoint document library (valid for a short period).
| Parameter | Type | Description |
|---|---|---|
driveId | string | Document library (drive) ID |
itemId | string | File item ID |
search_library_files
Search for files in a SharePoint document library by name or content.
| Parameter | Type | Description |
|---|---|---|
driveId | string | Document library (drive) ID |
query | string | Search query |
top | number | Max results (default: 25) |
read_library_text_file
Read the contents of a text file in a SharePoint document library. Only works with text files (txt, md, json, csv, etc.).
| Parameter | Type | Description |
|---|---|---|
driveId | string | Document library (drive) ID |
itemId | string | File item ID |
maxSize | number | Max bytes to read (default: 100KB) |
upload_library_file
Upload a text file to a SharePoint document library (max 4MB).
| Parameter | Type | Description |
|---|---|---|
content | string | File content (text) |
driveId | string | Document library (drive) ID |
path | string | Destination path including filename (e.g., "General/notes.txt") |
upload_library_file_binary
Upload a binary or large file (base64-encoded content, up to 100MB decoded) to a SharePoint document library using a resumable upload session. Use upload_library_file instead for small text files.
| Parameter | Type | Description |
|---|---|---|
conflictBehavior | string | What to do when a file with the same name exists (default: "rename") |
contentBase64 | string | File content, base64-encoded |
driveId | string | Document library (drive) ID |
path | string | Destination path including filename (e.g., "General/report.pdf") |
create_library_folder
Create a new folder in a SharePoint document library.
| Parameter | Type | Description |
|---|---|---|
driveId | string | Document library (drive) ID |
path | string | Full path for new folder (e.g., "General/NewFolder") |
delete_library_item
Delete a file or folder from a SharePoint document library.
| Parameter | Type | Description |
|---|---|---|
driveId | string | Document library (drive) ID |
itemId | string | File or folder item ID |
move_library_item
Move a file or folder to a new location in a SharePoint document library.
| Parameter | Type | Description |
|---|---|---|
destinationDriveId | string | Destination drive ID (if moving between libraries) |
destinationFolderId | string | Destination folder item ID |
driveId | string | Source document library (drive) ID |
itemId | string | File or folder item ID to move |
newName | string | Optional new name for the item |
copy_library_item
Copy a file or folder to a new location in a SharePoint document library.
| Parameter | Type | Description |
|---|---|---|
destinationDriveId | string | Destination drive ID (if copying between libraries) |
destinationFolderId | string | Destination folder item ID |
driveId | string | Source document library (drive) ID |
itemId | string | File or folder item ID to copy |
newName | string | Optional new name for the copy |
list_site_pages
List pages in a SharePoint site (Home, About, wiki pages, etc.). Returns page title, URL, and modification info.
| Parameter | Type | Description |
|---|---|---|
siteId | string | SharePoint site ID |
top | number | Max pages to return (default: 25) |
read_site_page
Read the content of a SharePoint site page. Returns the page HTML content from web parts.
| Parameter | Type | Description |
|---|---|---|
pageId | string | Page ID from list_site_pages |
siteId | string | SharePoint site ID |
create_site_page
Create a new SharePoint site page as a draft, optionally with simple HTML body content. Call publish_site_page afterwards to make it visible. Requires Sites.ReadWrite.All — an admin may need to approve this permission.
| Parameter | Type | Description |
|---|---|---|
contentHtml | string | Optional HTML body content, added as a single text web part (e.g., "<p>Summary…</p>") |
description | string | Optional page description |
name | string | Page file name (e.g., "q3-update.aspx"). Derived from the title when omitted. |
pageLayout | string | Page layout (default: "article") |
promotionKind | string | Promote as a normal page or a news post (default: page) |
siteId | string | SharePoint site ID |
title | string | Page title (e.g., "Q3 Update") |
update_site_page
Update a SharePoint site page's metadata (title, description, or promotion kind). Does not edit page body content.
| Parameter | Type | Description |
|---|---|---|
description | string | New page description |
pageId | string | Page ID from list_site_pages or create_site_page |
promotionKind | string | Promote as a normal page or a news post |
siteId | string | SharePoint site ID |
title | string | New page title |
publish_site_page
Publish a draft SharePoint site page so it becomes visible to readers. If a page approval flow is active, the page publishes after approval completes.
| Parameter | Type | Description |
|---|---|---|
pageId | string | Page ID from list_site_pages or create_site_page |
siteId | string | SharePoint site ID |
list_site_lists
List SharePoint lists in a site (task lists, custom lists, tracking sheets, etc.). Does not include document libraries — use list_site_document_libraries for those.
| Parameter | Type | Description |
|---|---|---|
siteId | string | SharePoint site ID |
top | number | Max lists to return (default: 50) |
list_list_items
List items in a SharePoint list with all field values. Supports OData filtering.
| Parameter | Type | Description |
|---|---|---|
filter | string | OData filter expression (e.g., "fields/Status eq 'Active'") |
listId | string | List ID from list_site_lists |
siteId | string | SharePoint site ID |
top | number | Max items to return (default: 50) |
get_list_item
Get a specific item from a SharePoint list with all field values.
| Parameter | Type | Description |
|---|---|---|
itemId | string | Item ID |
listId | string | List ID |
siteId | string | SharePoint site ID |
create_list_item
Create a new item in a SharePoint list.
| Parameter | Type | Description |
|---|---|---|
fields | object | Column values for the new item (e.g., { "Title": "New task", "Status": "Active" }) |
listId | string | List ID |
siteId | string | SharePoint site ID |
update_list_item
Update an existing item in a SharePoint list.
| Parameter | Type | Description |
|---|---|---|
fields | object | Column values to update (e.g., { "Status": "Complete" }) |
itemId | string | Item ID |
listId | string | List ID |
siteId | string | SharePoint site ID |
delete_list_item
Delete an item from a SharePoint list.
| Parameter | Type | Description |
|---|---|---|
itemId | string | Item ID |
listId | string | List ID |
siteId | string | SharePoint site ID |
list_list_columns
List the column schema of a SharePoint list (column names, types, and required flags). Use this to discover which fields exist before creating or updating list items.
| Parameter | Type | Description |
|---|---|---|
listId | string | List ID from list_site_lists |
siteId | string | SharePoint site ID |
create_site_list
Create a new SharePoint list in a site, optionally with a column schema. Requires a write permission (e.g. Sites.ReadWrite.All) — an admin may need to approve it.
| Parameter | Type | Description |
|---|---|---|
columns | array | Optional column definitions for the new list |
description | string | Optional description for the list |
displayName | string | Display name for the new list (e.g., "Project Tracker") |
siteId | string | SharePoint site ID |
template | string | List template (default: "genericList") |
rename_library_item
Rename a file or folder in a SharePoint document library.
| Parameter | Type | Description |
|---|---|---|
driveId | string | Document library (drive) ID |
itemId | string | File or folder item ID |
newName | string | New name for the item (include file extension) |
create_sharing_link
Create a sharing link for a file or folder in a SharePoint document library. Returns a URL that can be shared with others.
| Parameter | Type | Description |
|---|---|---|
driveId | string | Document library (drive) ID |
itemId | string | File or folder item ID |
scope | string | Who can use the link (default: "organization") |
type | string | Link type: "view" for read-only, "edit" for read-write |
list_file_versions
List the version history of a file in a SharePoint document library (version ID, size, modified date, and who modified it).
| Parameter | Type | Description |
|---|---|---|
driveId | string | Document library (drive) ID |
itemId | string | File item ID |
top | number | Max versions to return (default: 50) |
list_item_permissions
List sharing permissions on a file or folder in a SharePoint document library (links and direct grants).
| Parameter | Type | Description |
|---|---|---|
driveId | string | Document library (drive) ID |
itemId | string | File or folder item ID |
invite_item_collaborators
Grant specific people access to a file or folder in a SharePoint document library by email address. Defaults to read-only access and does NOT send a notification email unless sendInvitation is true. Requires a write permission (e.g. Sites.ReadWrite.All) — an admin may need to approve it.
| Parameter | Type | Description |
|---|---|---|
driveId | string | Document library (drive) ID |
itemId | string | File or folder item ID |
message | string | Optional message included in the notification email (only sent when sendInvitation is true) |
recipients | array | Email addresses to grant access to (e.g., ["jane@example.com"]) |
role | string | Access level to grant (default: "read") |
sendInvitation | boolean | Send a sharing notification email to recipients (default: false) |
revoke_item_permission
Revoke a sharing permission from a file or folder in a SharePoint document library. Use list_item_permissions to find permission IDs.
| Parameter | Type | Description |
|---|---|---|
driveId | string | Document library (drive) ID |
itemId | string | File or folder item ID |
permissionId | string | Permission ID from list_item_permissions |
list_subsites
List subsites of a SharePoint site. Use this to discover nested sites within a site collection.
| Parameter | Type | Description |
|---|---|---|
siteId | string | Parent SharePoint site ID |
top | number | Max subsites to return (default: 50) |
get_recent_files
Get recently accessed files from the current user's personal OneDrive (via /me/drive/recent). Note: this does NOT list recent files from SharePoint site document libraries — use search_library_files or get_library_tree to explore SharePoint content.
| Parameter | Type | Description |
|---|---|---|
top | number | Max files to return (default: 25) |
get_library_tree
Get a recursive tree view of a SharePoint document library. Shows the full folder/file hierarchy at a glance. Useful for understanding library structure before navigating into specific folders.
| Parameter | Type | Description |
|---|---|---|
driveId | string | Document library (drive) ID |
folderId | string | Start from this folder ID instead of root |
maxDepth | number | Max folder depth to recurse (default: 10, max: 15) |
maxItemsPerLevel | number | Max items per folder level (default: 100, max: 200) |
get_file_metadata
Get custom metadata (SharePoint column values) for a file or folder. Returns all custom fields added by site administrators, such as Department, Status, Category, etc.
| Parameter | Type | Description |
|---|---|---|
driveId | string | Document library (drive) ID |
itemId | string | File or folder item ID |
update_file_metadata
Update custom metadata (SharePoint column values) for a file or folder. Set values for custom fields like Department, Status, Category, etc.
| Parameter | Type | Description |
|---|---|---|
driveId | string | Document library (drive) ID |
fields | object | Column values to update (e.g., { "Department": "Marketing", "Status": "Approved" }) |
itemId | string | File or folder item ID |
get_site_drive
Get detailed metadata for a specific document library (drive) in a SharePoint site, including quota and owner info.
| Parameter | Type | Description |
|---|---|---|
driveId | string | Document library (drive) ID |
siteId | string | SharePoint site ID |
list_site_items
List base items across all lists and libraries in a SharePoint site. Returns a cross-list view of content.
| Parameter | Type | Description |
|---|---|---|
siteId | string | SharePoint site ID |
top | number | Max items to return (default: 50) |
get_site_item
Get a specific base item from a SharePoint site by ID, including its field values.
| Parameter | Type | Description |
|---|---|---|
itemId | string | Item ID |
siteId | string | SharePoint site ID |
get_site_list
Get detailed metadata for a specific SharePoint list, including template type, visibility, and content type settings.
| Parameter | Type | Description |
|---|---|---|
listId | string | List ID |
siteId | string | SharePoint site ID |
get_site_by_path
Resolve a SharePoint subsite by its relative path from a parent site. Useful for finding sites by URL structure.
| Parameter | Type | Description |
|---|---|---|
path | string | Relative path to subsite (e.g., "/departments/hr") |
siteId | string | Parent SharePoint site ID |
get_sites_delta
Track changes across SharePoint sites. Returns sites that have been added, modified, or deleted since the last delta query. Pass the deltaLink from a previous response to get incremental changes.
| Parameter | Type | Description |
|---|---|---|
deltaLink | string | Delta link from a previous response. Omit for initial sync. |