seafile_files_and_dirs
Manage Seafile files and directories: list, read, upload, create, move, copy, delete, lock, and comment, with dry-run previews and confirmation for writes.
Instructions
seafile_files_and_dirs covers the files_and_dirs toolset (74 route operations). Auth header Authorization Token. Self-hosted Seafile only. seafile.com hosts are refused. Writes, including side-effect GETs, need confirm true and SEAFILE_ALLOW_WRITES=true. Omit confirm for a dry-run preview of method, path, and redacted body. Delete, purge, expire, revert, trash clean, move, copy, and overwrite previews name the library id and path. Actions: copy_repos_fileops: POST /api2/repos/{repo_id}/fileops/copy/. POST /api2/repos/{repo_id}/fileops/copy/ (OpCopyView). Path params: repo_id. Body and query are free-form. Warning: destructive, exposure, or credential change. create_related_files: POST /api/v2.1/related-files/. POST /api/v2.1/related-files/ (RelatedFilesView). Body and query are free-form. create_repos_file_comments: POST /api/v2.1/repos/{repo_id}/file/{file_uuid}/comments/. POST /api/v2.1/repos/{repo_id}/file/{file_uuid}/comments/ (FileCommentsView). Path params: repo_id, file_uuid. Body and query are free-form. create_repos_file_comments_replies: POST /api/v2.1/repos/{repo_id}/file/{file_uuid}/comments/{comment_id}/replies/. POST /api/v2.1/repos/{repo_id}/file/{file_uuid}/comments/{comment_id}/replies/ (FileCommentRepliesView). Path params: repo_id, file_uuid, comment_id. Body and query are free-form. create_repos_file_participants: POST /api/v2.1/repos/{repo_id}/file/participants/. POST /api/v2.1/repos/{repo_id}/file/participants/ (FileParticipantsView). Path params: repo_id. Body and query are free-form. delete_copy_move_task: DELETE /api/v2.1/copy-move-task/. DELETE /api/v2.1/copy-move-task/ (CopyMoveTaskView). Body and query are free-form. Warning: destructive, exposure, or credential change. delete_dir: DELETE /api2/repos/{repo_id}/dir/. Delete a directory. Query p is the path. Destructive. Warning: destructive, exposure, or credential change. delete_file: DELETE /api2/repos/{repo_id}/file/. Delete a file into library trash. Query p is the path. Destructive. Warning: destructive, exposure, or credential change. delete_related_files: DELETE /api/v2.1/related-files/{related_id}/. DELETE /api/v2.1/related-files/{related_id}/ (RelatedFileView). Path params: related_id. Body and query are free-form. Warning: destructive, exposure, or credential change. delete_repos_batch_delete_folders_item: DELETE /api/v2.1/repos/batch-delete-folders-item/. DELETE /api/v2.1/repos/batch-delete-folders-item/ (RepoFoldersItemBatchDelete). Body and query are free-form. Warning: destructive, exposure, or credential change. delete_repos_batch_delete_item: DELETE /api/v2.1/repos/batch-delete-item/. DELETE /api/v2.1/repos/batch-delete-item/ (ReposBatchDeleteItemView). Body and query are free-form. Warning: destructive, exposure, or credential change. delete_repos_dir: DELETE /api/v2.1/repos/{repo_id}/dir/. DELETE /api/v2.1/repos/{repo_id}/dir/ (DirView). Path params: repo_id. Body and query are free-form. Warning: destructive, exposure, or credential change. delete_repos_file: DELETE /api/v2.1/repos/{repo_id}/file/. DELETE /api/v2.1/repos/{repo_id}/file/ (FileView). Path params: repo_id. Body and query are free-form. Warning: destructive, exposure, or credential change. delete_repos_file_comments: DELETE /api/v2.1/repos/{repo_id}/file/{file_uuid}/comments/{comment_id}/. DELETE /api/v2.1/repos/{repo_id}/file/{file_uuid}/comments/{comment_id}/ (FileCommentView). Path params: repo_id, file_uuid, comment_id. Body and query are free-form. Warning: destructive, exposure, or credential change. delete_repos_file_comments_replies: DELETE /api/v2.1/repos/{repo_id}/file/{file_uuid}/comments/{comment_id}/replies/{reply_id}/. DELETE /api/v2.1/repos/{repo_id}/file/{file_uuid}/comments/{comment_id}/replies/{reply_id}/ (FileCommentReplyView). Path params: repo_id, file_uuid, comment_id, reply_id. Body and query are free-form. Warning: destructive, exposure, or credential change. delete_repos_file_participant: DELETE /api/v2.1/repos/{repo_id}/file/participant/. DELETE /api/v2.1/repos/{repo_id}/file/participant/ (FileParticipantView). Path params: repo_id. Body and query are free-form. Warning: destructive, exposure, or credential change. get_file_detail: GET /api2/repos/{repo_id}/file/detail/. Read file detail for query p. get_file_download_link: GET /api2/repos/{repo_id}/file/. Mint a file download URL. Query p is the file path. Side-effect GET. The URL token is redacted. Warning: destructive, exposure, or credential change. get_repos_dir: GET /api/v2.1/repos/{repo_id}/dir/. GET /api/v2.1/repos/{repo_id}/dir/ (DirView). Path params: repo_id. Body and query are free-form. get_repos_dir_detail: GET /api/v2.1/repos/{repo_id}/dir/detail/. GET /api/v2.1/repos/{repo_id}/dir/detail/ (DirDetailView). Path params: repo_id. Body and query are free-form. get_repos_dir_metadata: GET /api2/repos/{repo_id}/dir/metadata/. GET /api2/repos/{repo_id}/dir/metadata/ (DirMetaDataView). Path params: repo_id. Body and query are free-form. get_repos_file: GET /api/v2.1/repos/{repo_id}/file/. GET /api/v2.1/repos/{repo_id}/file/ (FileView). Path params: repo_id. Body and query are free-form. Warning: destructive, exposure, or credential change. get_repos_file_comments: GET /api/v2.1/repos/{repo_id}/file/{file_uuid}/comments/{comment_id}/. GET /api/v2.1/repos/{repo_id}/file/{file_uuid}/comments/{comment_id}/ (FileCommentView). Path params: repo_id, file_uuid, comment_id. Body and query are free-form. get_repos_file_comments_replies: GET /api/v2.1/repos/{repo_id}/file/{file_uuid}/comments/{comment_id}/replies/{reply_id}/. GET /api/v2.1/repos/{repo_id}/file/{file_uuid}/comments/{comment_id}/replies/{reply_id}/ (FileCommentReplyView). Path params: repo_id, file_uuid, comment_id, reply_id. Body and query are free-form. get_repos_file_metadata: GET /api2/repos/{repo_id}/file/metadata/. GET /api2/repos/{repo_id}/file/metadata/ (FileMetaDataView). Path params: repo_id. Body and query are free-form. get_repos_files_blks_download_link: GET /api2/repos/{repo_id}/files/{file_id}/blks/{block_id}/download-link/. GET /api2/repos/{repo_id}/files/{file_id}/blks/{block_id}/download-link/ (FileBlockDownloadLinkView). Path params: repo_id, file_id, block_id. Body and query are free-form. Warning: destructive, exposure, or credential change. get_repos_office_suite: GET /api/v2.1/repos/{repo_id}/office-suite/. GET /api/v2.1/repos/{repo_id}/office-suite/ (OfficeSuiteConfig). Path params: repo_id. Body and query are free-form. get_repos_owa_file: GET /api2/repos/{repo_id}/owa-file/. GET /api2/repos/{repo_id}/owa-file/ (OwaFileView). Path params: repo_id. Body and query are free-form. get_repos_thumbnail: GET /api2/repos/{repo_id}/thumbnail/. GET /api2/repos/{repo_id}/thumbnail/ (ThumbnailView). Path params: repo_id. Body and query are free-form. get_repos_update_blks_link: GET /api2/repos/{repo_id}/update-blks-link/. GET /api2/repos/{repo_id}/update-blks-link/ (UpdateBlksLinkView). Path params: repo_id. Body and query are free-form. Warning: destructive, exposure, or credential change. get_repos_upload_blks_link: GET /api2/repos/{repo_id}/upload-blks-link/. GET /api2/repos/{repo_id}/upload-blks-link/ (UploadBlksLinkView). Path params: repo_id. Body and query are free-form. Warning: destructive, exposure, or credential change. get_repos_zip_task: GET /api/v2.1/repos/{repo_id}/zip-task/. GET /api/v2.1/repos/{repo_id}/zip-task/ (ZipTaskView). Path params: repo_id. Body and query are free-form. get_share_link_zip_task: GET /api/v2.1/share-link-zip-task/. GET /api/v2.1/share-link-zip-task/ (ShareLinkZipTaskView). Body and query are free-form. get_update_link: GET /api2/repos/{repo_id}/update-link/. Mint a file-server update URL for an existing file. Side-effect GET. Warning: destructive, exposure, or credential change. get_upload_link: GET /api2/repos/{repo_id}/upload-link/. Mint a file-server upload URL for query p. Side-effect GET. replace=1 allows overwrite. Warning: destructive, exposure, or credential change. list_dir: GET /api2/repos/{repo_id}/dir/. List a directory. Query p is the directory path. p defaults to / on the server. list_query_copy_move_progress: GET /api/v2.1/query-copy-move-progress/. GET /api/v2.1/query-copy-move-progress/ (QueryCopyMoveProgressView). Body and query are free-form. list_query_zip_progress: GET /api/v2.1/query-zip-progress/. GET /api/v2.1/query-zip-progress/ (QueryZipProgressView). Body and query are free-form. list_recent_added_files: GET /api/v2.1/recent-added-files/. GET /api/v2.1/recent-added-files/ (RecentAddedFilesView). Body and query are free-form. list_related_files: GET /api/v2.1/related-files/. GET /api/v2.1/related-files/ (RelatedFilesView). Body and query are free-form. list_repos_file_comments: GET /api/v2.1/repos/{repo_id}/file/{file_uuid}/comments/. GET /api/v2.1/repos/{repo_id}/file/{file_uuid}/comments/ (FileCommentsView). Path params: repo_id, file_uuid. Body and query are free-form. list_repos_file_comments_replies: GET /api/v2.1/repos/{repo_id}/file/{file_uuid}/comments/{comment_id}/replies/. GET /api/v2.1/repos/{repo_id}/file/{file_uuid}/comments/{comment_id}/replies/ (FileCommentRepliesView). Path params: repo_id, file_uuid, comment_id. Body and query are free-form. list_repos_file_participants: GET /api/v2.1/repos/{repo_id}/file/participants/. GET /api/v2.1/repos/{repo_id}/file/participants/ (FileParticipantsView). Path params: repo_id. Body and query are free-form. list_repos_file_uploaded_bytes: GET /api/v2.1/repos/{repo_id}/file-uploaded-bytes/. GET /api/v2.1/repos/{repo_id}/file-uploaded-bytes/ (RepoFileUploadedBytesView). Path params: repo_id. Body and query are free-form. list_repos_related_users: GET /api/v2.1/repos/{repo_id}/related-users/. GET /api/v2.1/repos/{repo_id}/related-users/ (RepoRelatedUsersView). Path params: repo_id. Body and query are free-form. move_repos_fileops: POST /api2/repos/{repo_id}/fileops/move/. POST /api2/repos/{repo_id}/fileops/move/ (OpMoveView). Path params: repo_id. Body and query are free-form. Warning: destructive, exposure, or credential change. post_async_batch_move_item_callback: POST /api/v2.1/async-batch-move-item/callback/. POST /api/v2.1/async-batch-move-item/callback/ (BatchMoveItemsUpdatePath). Body and query are free-form. Warning: destructive, exposure, or credential change. post_cancel_zip_task: POST /api/v2.1/cancel-zip-task/. POST /api/v2.1/cancel-zip-task/ (CancelZipTaskView). Body and query are free-form. post_copy_move_task: POST /api/v2.1/copy-move-task/. POST /api/v2.1/copy-move-task/ (CopyMoveTaskView). Body and query are free-form. Warning: destructive, exposure, or credential change. post_dir: POST /api2/repos/{repo_id}/dir/. Create, rename, or move a directory. Query p is the path. Form operation is mkdir, rename, or move. post_file: POST /api2/repos/{repo_id}/file/. Create, rename, move, or copy a file. Query p is the path. Form operation is create, rename, move, or copy. Warning: destructive, exposure, or credential change. post_move_folder_merge: POST /api/v2.1/move-folder-merge/. POST /api/v2.1/move-folder-merge/ (MoveFolderMergeView). Body and query are free-form. Warning: destructive, exposure, or credential change. post_repos_async_batch_copy_item: POST /api/v2.1/repos/async-batch-copy-item/. POST /api/v2.1/repos/async-batch-copy-item/ (ReposAsyncBatchCopyItemView). Body and query are free-form. Warning: destructive, exposure, or credential change. post_repos_async_batch_move_item: POST /api/v2.1/repos/async-batch-move-item/. POST /api/v2.1/repos/async-batch-move-item/ (ReposAsyncBatchMoveItemView). Body and query are free-form. Warning: destructive, exposure, or credential change. post_repos_batch_copy_dir: POST /api/v2.1/repos/batch-copy-dir/. POST /api/v2.1/repos/batch-copy-dir/ (ReposBatchCopyDirView). Body and query are free-form. Warning: destructive, exposure, or credential change. post_repos_batch_copy_item: POST /api/v2.1/repos/batch-copy-item/. POST /api/v2.1/repos/batch-copy-item/ (ReposBatchCopyItemView). Body and query are free-form. Warning: destructive, exposure, or credential change. post_repos_batch_create_dir: POST /api/v2.1/repos/batch-create-dir/. POST /api/v2.1/repos/batch-create-dir/ (ReposBatchCreateDirView). Body and query are free-form. post_repos_batch_move_item: POST /api/v2.1/repos/batch-move-item/. POST /api/v2.1/repos/batch-move-item/ (ReposBatchMoveItemView). Body and query are free-form. Warning: destructive, exposure, or credential change. post_repos_dir: POST /api/v2.1/repos/{repo_id}/dir/. POST /api/v2.1/repos/{repo_id}/dir/ (DirView). Path params: repo_id. Body and query are free-form. post_repos_file: POST /api/v2.1/repos/{repo_id}/file/. POST /api/v2.1/repos/{repo_id}/file/ (FileView). Path params: repo_id. Body and query are free-form. Warning: destructive, exposure, or credential change. post_repos_fileops_delete: POST /api2/repos/{repo_id}/fileops/delete/. POST /api2/repos/{repo_id}/fileops/delete/ (OpDeleteView). Path params: repo_id. Body and query are free-form. post_repos_image_rotate: POST /api/v2.1/repos/{repo_id}/image-rotate/. POST /api/v2.1/repos/{repo_id}/image-rotate/ (RepoImageRotateView). Path params: repo_id. Body and query are free-form. post_repos_sync_batch_copy_item: POST /api/v2.1/repos/sync-batch-copy-item/. POST /api/v2.1/repos/sync-batch-copy-item/ (ReposSyncBatchCopyItemView). Body and query are free-form. Warning: destructive, exposure, or credential change. post_repos_sync_batch_move_item: POST /api/v2.1/repos/sync-batch-move-item/. POST /api/v2.1/repos/sync-batch-move-item/ (ReposSyncBatchMoveItemView). Body and query are free-form. Warning: destructive, exposure, or credential change. post_repos_upload_blks_link: POST /api2/repos/{repo_id}/upload-blks-link/. POST /api2/repos/{repo_id}/upload-blks-link/ (UploadBlksLinkView). Path params: repo_id. Body and query are free-form. Warning: destructive, exposure, or credential change. post_repos_zip_task: POST /api/v2.1/repos/{repo_id}/zip-task/. POST /api/v2.1/repos/{repo_id}/zip-task/ (ZipTaskView). Path params: repo_id. Body and query are free-form. post_share_link_zip_task: POST /api/v2.1/share-link-zip-task/. POST /api/v2.1/share-link-zip-task/ (ShareLinkZipTaskView). Body and query are free-form. Warning: destructive, exposure, or credential change. put_file: PUT /api2/repos/{repo_id}/file/. Lock or unlock a file. Body operation is lock or unlock. Body p is the path. Warning: destructive, exposure, or credential change. update_repos_batch_lock_file: PUT /api/v2.1/repos/{repo_id}/batch-lock-file/. PUT /api/v2.1/repos/{repo_id}/batch-lock-file/ (FileBatchLockView). Path params: repo_id. Body and query are free-form. update_repos_batch_unlock_file: PUT /api/v2.1/repos/{repo_id}/batch-unlock-file/. PUT /api/v2.1/repos/{repo_id}/batch-unlock-file/ (FileBatchUnlockView). Path params: repo_id. Body and query are free-form. update_repos_file: PUT /api/v2.1/repos/{repo_id}/file/. PUT /api/v2.1/repos/{repo_id}/file/ (FileView). Path params: repo_id. Body and query are free-form. Warning: destructive, exposure, or credential change. update_repos_file_comments: PUT /api/v2.1/repos/{repo_id}/file/{file_uuid}/comments/{comment_id}/. PUT /api/v2.1/repos/{repo_id}/file/{file_uuid}/comments/{comment_id}/ (FileCommentView). Path params: repo_id, file_uuid, comment_id. Body and query are free-form. update_repos_file_comments_replies: PUT /api/v2.1/repos/{repo_id}/file/{file_uuid}/comments/{comment_id}/replies/{reply_id}/. PUT /api/v2.1/repos/{repo_id}/file/{file_uuid}/comments/{comment_id}/replies/{reply_id}/ (FileCommentReplyView). Path params: repo_id, file_uuid, comment_id, reply_id. Body and query are free-form. update_repos_office_suite: PUT /api/v2.1/repos/{repo_id}/office-suite/. PUT /api/v2.1/repos/{repo_id}/office-suite/ (OfficeSuiteConfig). Path params: repo_id. Body and query are free-form. read_text_file: GET download link then fetch text. Query p is the library path. Params repo_id. Size cap 256 KiB. Text only. Gated. Warning: mints a download token. write_text_file: GET upload link then multipart POST. Query p is the library path. Body text string. Body replace defaults to false. Size cap 256 KiB. Gated. Warning: names the library id and path. replace true overwrites.
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": {
"action": "<action>"
},
"name": "seafile_files_and_dirs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Free-form JSON or form body. /api2 routes are sent as form fields. /api/v2.1 routes are sent as JSON. Secrets are redacted in previews. | |
| query | No | Query parameters, such as p for a library path or q for search. | |
| action | Yes | Seafile operation to call. | |
| params | No | Path parameters, such as repo_id or group_id. | |
| confirm | No | Set to the boolean true to execute the write. Omit this field for a dry-run preview. false and the string true are rejected. |