drive-file
Feishu Drive management: browse files, create folders, copy and delete files.
Invocation
Invoke via the channel tool's action parameter:
| Action |
Description |
list_drive_files |
List files in a folder |
create_drive_folder |
Create a new folder |
copy_drive_file |
Copy a file to a specified folder |
delete_drive_file |
Delete a file |
Parameters
list_drive_files
| Parameter |
Type |
Required |
Description |
| folder_token |
string |
No |
Folder token (defaults to root directory) |
| page_size |
integer |
No |
Number per page |
| page_token |
string |
No |
Pagination token |
create_drive_folder
| Parameter |
Type |
Required |
Description |
| folder_token |
string |
No |
Parent folder token (defaults to root directory) |
| name |
string |
Yes |
Folder name |
copy_drive_file
| Parameter |
Type |
Required |
Description |
| file_token |
string |
Yes |
Source file token |
| folder_token |
string |
Yes |
Target folder token |
| name |
string |
Yes |
New file name |
| file_type |
string |
No |
File type (defaults to file) |
delete_drive_file
| Parameter |
Type |
Required |
Description |
| file_token |
string |
Yes |
File token |
| file_type |
string |
No |
File type (defaults to file) |
Example
浏览根目录文件
→ channel(action="list_drive_files")
创建新文件夹
→ channel(action="create_drive_folder", name="项目资料")
复制文件到另一个文件夹
→ channel(action="copy_drive_file", file_token="fileXXX", folder_token="folderYYY", name="副本.pdf")
Automatic Execution Principles
- Root directory by default: When the user says "look at my files", directly invoke
channel(action="list_drive_files"), listing the root directory by default; do not ask for folder_token.
- No interactive menus: Do not present options for the user to choose from; directly perform the most reasonable operation.
- Chained browsing: After listing files, if the user wants to enter a folder, automatically query again using that folder's token.
- Intelligent name inference: When creating a folder, if the user does not provide a name, automatically name it based on the context.
Security Level
list_drive_files: L1 Read-only
create_drive_folder / copy_drive_file: L3 High impact
delete_drive_file: L4 Irreversible