Skip to main content
Glama

seafile_files_and_dirs

DestructiveIdempotent

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

NameRequiredDescriptionDefault
bodyNoFree-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.
queryNoQuery parameters, such as p for a library path or q for search.
actionYesSeafile operation to call.
paramsNoPath parameters, such as repo_id or group_id.
confirmNoSet to the boolean true to execute the write. Omit this field for a dry-run preview. false and the string true are rejected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructive and open-world behavior, yet the description adds substantial context beyond them: the Authorization Token header, the SEAFILE_ALLOW_WRITES environment prerequisite, dry-run previews showing method/path/redacted body, explicit naming of library id and path in destructive previews, secret redaction, and the 256 KiB cap on read_text_file/write_text_file. It also correctly flags that certain GETs are side-effectful (download/upload link minting). One caveat: annotations assert idempotentHint=true while the description enumerates many create/POST actions that are not idempotent, so the hint is a loose fit for a 74-action multiplexer.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The operational constraints are correctly front-loaded, but the body is bloated by mechanical duplication: every action repeats the same method and path twice ("POST /api2/repos/{repo_id}/fileops/copy/. POST /api2/repos/{repo_id}/fileops/copy/ (OpCopyView).") and appends the identical 'Body and query are free-form' and 'Warning: destructive, exposure, or credential change' boilerplate dozens of times. Those repeated lines crowd out the per-action semantics that would actually help, and the description is far longer than the information it carries.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 74-action multiplexer with no output schema, the description covers the essential contract: authentication, host restriction, the confirm/dry-run write gate, per-action path params, and destructive-action warnings. What it lacks is any indication of response shape for the many read actions and any body field guidance beyond 'free-form', which leaves the agent guessing on the majority of routes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema documents body/query/params/confirm at a generic level, so the baseline would be 3. The description earns above that by pinning parameter meaning per action: which path params each route needs (repo_id, file_uuid, comment_id, reply_id), that query p is the library path and defaults to / for list_dir, that replace=1 allows overwrite on get_upload_link, and that post_dir's form operation is mkdir/rename/move while put_file's operation is lock/unlock.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence establishes the scope as the files_and_dirs toolset across 74 route operations, which tells an agent the broad domain (files, directories, comments, links, zip tasks). However, for most actions the 'purpose' degenerates into restating the HTTP method and path (e.g. "post_repos_image_rotate: POST /api/v2.1/repos/{repo_id}/image-rotate/ ... Body and query are free-form"), which conveys almost nothing about what the operation actually does. Only a handful (delete_dir, list_dir, get_upload_link, read_text_file, post_dir, put_file) are given real verb+resource descriptions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is strong procedural guidance for the write gate: writes and side-effect GETs require confirm=true plus SEAFILE_ALLOW_WRITES=true, and omitting confirm yields a dry-run preview. It also bounds applicability (self-hosted Seafile only, seafile.com hosts refused). What is missing is sibling routing: nothing says when to use this versus seafile_libraries or seafile_search, so an agent must infer that list_dir belongs here and library enumeration belongs elsewhere.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.