delete_file
Remove specified files or folders by providing the file ID and account ID using a Microsoft MCP server integration. Ensures efficient file management within connected Microsoft services.
Instructions
Delete a file or folder
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account_id | Yes | ||
| file_id | Yes |
Implementation Reference
- src/microsoft_mcp/tools.py:804-808 (handler)The delete_file tool handler that deletes a file or folder from OneDrive by sending a DELETE request to the Microsoft Graph API endpoint /me/drive/items/{file_id}.@mcp.tool def delete_file(file_id: str, account_id: str) -> dict[str, str]: """Delete a file or folder""" graph.request("DELETE", f"/me/drive/items/{file_id}", account_id) return {"status": "deleted"}