Microsoft 365 SharePoint

v0.2.2
io.github.mindstone/mcp-server-microsoft-sharepoint Checked 3 days ago Published 1 day ago

Microsoft 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.

authenticate_sharepoint

Grant SharePoint permissions for your Microsoft 365 account. Call this tool when: 1. Other SharePoint tools return "SharePoint permissions not granted" errors 2. The user asks to connect or enable SharePoint access This tool returns a structured auth_required response. The host will recognise it and dispatch the incremental SharePoint consent flow.

list_sharepoint_sites

Search for and list SharePoint sites accessible to the user. Returns site name, URL, and description.

ParameterTypeDescription
querystringSearch query to filter sites (e.g., "Marketing"). If omitted, lists all accessible sites.
topnumberMax sites to return (default: 25)

get_sharepoint_site

Get details about a specific SharePoint site by ID or hostname path.

ParameterTypeDescription
siteIdstringSharePoint site ID (e.g., "contoso.sharepoint.com,abc123,def456") or hostname path (e.g., "contoso.sharepoint.com:/sites/Marketing")

list_site_document_libraries

List document libraries (drives) in a SharePoint site.

ParameterTypeDescription
siteIdstringSharePoint site ID
topnumberMax libraries to return (default: 50)

list_library_files

List files and folders in a SharePoint document library. Defaults to root folder.

ParameterTypeDescription
driveIdstringDocument library (drive) ID from list_site_document_libraries
pathstringFolder path within the library (e.g., "General/Reports"). Omit for root.
topnumberMax items to return (default: 50)

get_library_file

Get metadata for a specific file or folder in a SharePoint document library.

ParameterTypeDescription
driveIdstringDocument library (drive) ID
itemIdstringFile or folder item ID

download_library_file

Get a download URL for a file in a SharePoint document library (valid for a short period).

ParameterTypeDescription
driveIdstringDocument library (drive) ID
itemIdstringFile item ID

search_library_files

Search for files in a SharePoint document library by name or content.

ParameterTypeDescription
driveIdstringDocument library (drive) ID
querystringSearch query
topnumberMax 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.).

ParameterTypeDescription
driveIdstringDocument library (drive) ID
itemIdstringFile item ID
maxSizenumberMax bytes to read (default: 100KB)

upload_library_file

Upload a text file to a SharePoint document library (max 4MB).

ParameterTypeDescription
contentstringFile content (text)
driveIdstringDocument library (drive) ID
pathstringDestination 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.

ParameterTypeDescription
conflictBehaviorstringWhat to do when a file with the same name exists (default: "rename")
contentBase64stringFile content, base64-encoded
driveIdstringDocument library (drive) ID
pathstringDestination path including filename (e.g., "General/report.pdf")

create_library_folder

Create a new folder in a SharePoint document library.

ParameterTypeDescription
driveIdstringDocument library (drive) ID
pathstringFull path for new folder (e.g., "General/NewFolder")

delete_library_item

Delete a file or folder from a SharePoint document library.

ParameterTypeDescription
driveIdstringDocument library (drive) ID
itemIdstringFile or folder item ID

move_library_item

Move a file or folder to a new location in a SharePoint document library.

ParameterTypeDescription
destinationDriveIdstringDestination drive ID (if moving between libraries)
destinationFolderIdstringDestination folder item ID
driveIdstringSource document library (drive) ID
itemIdstringFile or folder item ID to move
newNamestringOptional new name for the item

copy_library_item

Copy a file or folder to a new location in a SharePoint document library.

ParameterTypeDescription
destinationDriveIdstringDestination drive ID (if copying between libraries)
destinationFolderIdstringDestination folder item ID
driveIdstringSource document library (drive) ID
itemIdstringFile or folder item ID to copy
newNamestringOptional 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.

ParameterTypeDescription
siteIdstringSharePoint site ID
topnumberMax pages to return (default: 25)

read_site_page

Read the content of a SharePoint site page. Returns the page HTML content from web parts.

ParameterTypeDescription
pageIdstringPage ID from list_site_pages
siteIdstringSharePoint 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.

ParameterTypeDescription
contentHtmlstringOptional HTML body content, added as a single text web part (e.g., "<p>Summary…</p>")
descriptionstringOptional page description
namestringPage file name (e.g., "q3-update.aspx"). Derived from the title when omitted.
pageLayoutstringPage layout (default: "article")
promotionKindstringPromote as a normal page or a news post (default: page)
siteIdstringSharePoint site ID
titlestringPage 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.

ParameterTypeDescription
descriptionstringNew page description
pageIdstringPage ID from list_site_pages or create_site_page
promotionKindstringPromote as a normal page or a news post
siteIdstringSharePoint site ID
titlestringNew 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.

ParameterTypeDescription
pageIdstringPage ID from list_site_pages or create_site_page
siteIdstringSharePoint 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.

ParameterTypeDescription
siteIdstringSharePoint site ID
topnumberMax lists to return (default: 50)

list_list_items

List items in a SharePoint list with all field values. Supports OData filtering.

ParameterTypeDescription
filterstringOData filter expression (e.g., "fields/Status eq 'Active'")
listIdstringList ID from list_site_lists
siteIdstringSharePoint site ID
topnumberMax items to return (default: 50)

get_list_item

Get a specific item from a SharePoint list with all field values.

ParameterTypeDescription
itemIdstringItem ID
listIdstringList ID
siteIdstringSharePoint site ID

create_list_item

Create a new item in a SharePoint list.

ParameterTypeDescription
fieldsobjectColumn values for the new item (e.g., { "Title": "New task", "Status": "Active" })
listIdstringList ID
siteIdstringSharePoint site ID

update_list_item

Update an existing item in a SharePoint list.

ParameterTypeDescription
fieldsobjectColumn values to update (e.g., { "Status": "Complete" })
itemIdstringItem ID
listIdstringList ID
siteIdstringSharePoint site ID

delete_list_item

Delete an item from a SharePoint list.

ParameterTypeDescription
itemIdstringItem ID
listIdstringList ID
siteIdstringSharePoint 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.

ParameterTypeDescription
listIdstringList ID from list_site_lists
siteIdstringSharePoint 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.

ParameterTypeDescription
columnsarrayOptional column definitions for the new list
descriptionstringOptional description for the list
displayNamestringDisplay name for the new list (e.g., "Project Tracker")
siteIdstringSharePoint site ID
templatestringList template (default: "genericList")

search_sharepoint

Search across all SharePoint sites, document libraries, lists, and list items. More powerful than search_library_files which only searches within a single library.

ParameterTypeDescription
entityTypesarrayTypes of content to search (default: all types)
querystringSearch query text
topnumberMax results (default: 25)

rename_library_item

Rename a file or folder in a SharePoint document library.

ParameterTypeDescription
driveIdstringDocument library (drive) ID
itemIdstringFile or folder item ID
newNamestringNew name for the item (include file extension)

list_file_versions

List the version history of a file in a SharePoint document library (version ID, size, modified date, and who modified it).

ParameterTypeDescription
driveIdstringDocument library (drive) ID
itemIdstringFile item ID
topnumberMax 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).

ParameterTypeDescription
driveIdstringDocument library (drive) ID
itemIdstringFile 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.

ParameterTypeDescription
driveIdstringDocument library (drive) ID
itemIdstringFile or folder item ID
messagestringOptional message included in the notification email (only sent when sendInvitation is true)
recipientsarrayEmail addresses to grant access to (e.g., ["jane@example.com"])
rolestringAccess level to grant (default: "read")
sendInvitationbooleanSend 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.

ParameterTypeDescription
driveIdstringDocument library (drive) ID
itemIdstringFile or folder item ID
permissionIdstringPermission ID from list_item_permissions

list_subsites

List subsites of a SharePoint site. Use this to discover nested sites within a site collection.

ParameterTypeDescription
siteIdstringParent SharePoint site ID
topnumberMax 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.

ParameterTypeDescription
topnumberMax 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.

ParameterTypeDescription
driveIdstringDocument library (drive) ID
folderIdstringStart from this folder ID instead of root
maxDepthnumberMax folder depth to recurse (default: 10, max: 15)
maxItemsPerLevelnumberMax 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.

ParameterTypeDescription
driveIdstringDocument library (drive) ID
itemIdstringFile 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.

ParameterTypeDescription
driveIdstringDocument library (drive) ID
fieldsobjectColumn values to update (e.g., { "Department": "Marketing", "Status": "Approved" })
itemIdstringFile 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.

ParameterTypeDescription
driveIdstringDocument library (drive) ID
siteIdstringSharePoint site ID

list_site_items

List base items across all lists and libraries in a SharePoint site. Returns a cross-list view of content.

ParameterTypeDescription
siteIdstringSharePoint site ID
topnumberMax items to return (default: 50)

get_site_item

Get a specific base item from a SharePoint site by ID, including its field values.

ParameterTypeDescription
itemIdstringItem ID
siteIdstringSharePoint site ID

get_site_list

Get detailed metadata for a specific SharePoint list, including template type, visibility, and content type settings.

ParameterTypeDescription
listIdstringList ID
siteIdstringSharePoint 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.

ParameterTypeDescription
pathstringRelative path to subsite (e.g., "/departments/hr")
siteIdstringParent 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.

ParameterTypeDescription
deltaLinkstringDelta link from a previous response. Omit for initial sync.