gopan
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Schema inspection only. This is the tool catalog of the remote MCP endpoint (/mcp) built into gopan, a self-hosted cloud drive. No database or storage is connected and every tool call is refused. To use these tools, deploy gopan and connect to https:///mcp with OAuth 2.1 or an API key.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| abort_uploadA | Cancel an upload created by prepare_upload: stop accepting parts and delete any staged data, so nothing is added to the drive. Use it when the user cancels or the local file changed; to continue an interrupted upload instead, use get_upload_parts. Returns success. Requires files:upload. |
| batch_nodesA | Move, copy, trash, or restore up to 100 nodes with individual success/error results. Unlike move_nodes, copy_nodes, trash_nodes and restore_nodes, which are all-or-nothing, each item here succeeds or fails on its own. dry_run simulates then rolls back; preview IDs are not usable. idempotency_key replays the original entire result; use a new key to retry failed items. |
| chat_listA | List recent messages in the '我的设备' conversation, oldest first, with optional before_id cursor. |
| chat_sendA | Send a text message or a saved file node to the account's file-transfer conversation ('我的设备'). node_id must be a node already saved by this account. |
| clip_urlA | Save a web page's main article as a Markdown file (images downloaded next to it) into the user's clippings folder, in the background. Returns a job (poll get_job until done; result_node_id is the .md, readable with read_text_file), or the existing clipping if this address was clipped before. Not available to credentials limited to a folder. Requires files:upload; supports idempotency. |
| complete_uploadA | Declare a direct upload complete and start server-side hashing, verification, deduplication, and commit. |
| copy_nodesA | Copy one or more files or folders (folders recursively) into a destination folder (target_folder_id or target_path; omit both for the root). Content is deduplicated, so no bytes are re-uploaded, but copies count toward the user's quota and fail with QUOTA_EXCEEDED when it would be exceeded. All-or-nothing; returns the new nodes. For per-item results or a dry-run preview, use batch_nodes. Requires files:write; pass idempotency_key to make retries safe. |
| create_directoriesA | Atomically create missing parent directories; reuse existing directories. Supports persistent idempotency. |
| create_file_requestA | Create a file request link for a folder: anyone with the link can upload files into it without signing in, but cannot see its contents. Optional password, deadline, uploader name, per-uploader subfolders and size/count limits. Uploads count against this account's quota. Requires shares:write; supports idempotency. |
| create_folderA | Create one new folder inside parent_id or parent_path (omit both for the root). If a sibling with the same name already exists, the new folder gets a numbered name instead of failing; the returned node shows the name actually used. To create a whole nested path in one call, reusing folders that already exist, use create_directories. Requires files:write; pass idempotency_key to make retries safe. |
| create_linkB | Create (or return the existing) permanent public direct URL for one file, usable in web pages and Markdown; images can be embedded directly. Access is logged and capped per day. Requires shares:write; supports idempotency. |
| create_shareA | Create a public share URL with optional password and future expiry. Requires shares:write; supports idempotency. |
| extract_archiveA | Extract an archive (all of it, or selected paths) into a new folder named after it, in the background. Existing files are never overwritten; name clashes get a numeric suffix. Returns a job; poll get_job (wait=true) until done, then result_node_id is the new folder. Encrypted, link and unsafe-path entries are skipped. Requires files:upload. |
| fetch_urlA | Offline download: the Gopan server fetches an http(s) link into a folder in the background, so the bytes never pass through the agent. Returns a job; poll get_job (wait=true) until status is done, then result_node_id is the file. Private/internal addresses are refused. Not idempotent: check list_jobs before retrying. Requires files:upload. |
| get_file_infoA | Get metadata for one file or folder, identified by node_id or absolute path: id, parent_id, name, kind, size, MIME type, SHA-256, path and updated_at. Folders also report subtree_bytes and subtree_count (stats_stale is true while they are being recalculated). Read-only and cheap. To read contents use read_text_file or read_document_text; to download use prepare_download. Requires files:read. |
| get_jobA | Get the status and progress of a background job (offline download or archive extraction). wait=true blocks up to 25 seconds for it to finish. |
| get_upload_partsA | For an upload created by prepare_upload: report which parts the storage has already received (uploaded_parts) and issue fresh presigned PUT URLs for a range of parts (first_part, up to 100 per call). Use it to resume an interrupted upload, to get URLs beyond the first batch, or to replace expired URLs. File bytes are sent by your own HTTP client to those URLs, never through MCP. Requires files:upload. |
| get_upload_statusA | Return the current status of an upload once, without waiting: uploading, completing, finalizing, processing or verifying while in progress; ready (with the new node), failed (with failure) or aborted when finished. To wait for completion after complete_upload, use wait_upload instead of calling this repeatedly. Requires files:upload. |
| list_activityA | List recent changes to the drive from every source (web, Android app, WebDAV, agents, file requests, background jobs), newest first: who did what to which file and where. Filter by source kind, action, time or one node's history. Paginate with before_id. Undo is only available to the user in the app. For the log of MCP tool calls themselves, use list_audit. Requires audit:read. |
| list_archiveA | List what is inside an archive file (.zip, .7z, .rar, .tar, .tar.gz, .tar.bz2, .tar.xz) without downloading it, one directory at a time. status PENDING means the server is still reading it; retry shortly. |
| list_auditA | Read the log of MCP tool calls made with this account's credentials: which tool was called, by which credential, on which targets, and the outcome; passwords and tokens are never included. Directory-restricted credentials see only their own events. For the history of file changes from every source (web, apps, WebDAV, agents), use list_activity. |
| list_file_requestsA | List active file request links (anonymous upload links into a folder) with received file counts. Requires shares:read. |
| list_filesA | List the direct children (files and folders) of one folder, up to 200 per page, sorted by name (default), size or updated_at. Identify the folder by parent_id or absolute path; omit both for the root. Each item has id, kind, size, mime and updated_at; the result also has total and next_cursor, which you pass back as cursor for the next page. Does not recurse: to find items anywhere in the drive use search_files (by name) or search_file_contents (by text inside files). Requires files:read. |
| list_jobsA | List this account's background jobs (offline downloads, archive extractions), newest first. |
| list_linksA | List active direct URLs with access counts, newest first, with cursor pagination. Requires shares:read. |
| list_sharesA | List active shares owned by this account and within the credential directory. |
| list_trashA | List recoverable trash with deletion times and cursor pagination. Use returned IDs with restore_nodes or batch_nodes. |
| move_nodesA | Move one or more files or folders into a destination folder (target_folder_id or target_path; omit both for the root). All-or-nothing: if any item fails (NAME_CONFLICT when the destination already has that name, CYCLIC_MOVE when a folder would move into itself), nothing is moved. Returns the moved nodes. For per-item results or a dry-run preview, use batch_nodes. Requires files:write; pass idempotency_key to make retries safe. |
| prepare_downloadA | Create a short-lived direct GET URL for one file, or a restricted ZIP ticket for folders and multiple nodes. |
| prepare_uploadA | Create a direct upload target. Optional SHA-256 enables instant upload; bytes must be sent by the agent using another HTTP-capable tool. |
| read_document_textA | Read the extracted text of a PDF, Office or text file in chunks of up to 50000 characters, without downloading the file. Use next_offset to continue. For plain-text and code files where the exact bytes matter, prefer read_text_file. |
| read_text_fileA | Read raw UTF-8 text from a plain-text or code file (Markdown, CSV, JSON, source code), up to 64 KiB per call starting at a byte offset; call again with a larger offset to read further. Does not load binary content into context. For PDF and Office documents use read_document_text, which reads their extracted text; for images use view_image. Requires files:download. |
| rename_nodeA | Rename one file or folder in place (it stays in the same folder), identified by node_id or absolute path. Fails with NAME_CONFLICT if a sibling already has the new name, and with NOT_FOUND for items in the trash. Returns the updated node. To put it in another folder use move_nodes; to rename many items, call this once per item. Requires files:write; pass idempotency_key to make retries safe. |
| resolve_pathA | Resolve an absolute, case-sensitive Gopan path to a node ID. / is the virtual root. |
| restore_nodesA | Restore one or more items from the trash to their original folders, using IDs from list_trash. If an item with the same name now exists there, the restored item is renamed rather than overwriting it. Returns the restored nodes. All-or-nothing; for per-item results use batch_nodes. Requires files:delete; pass idempotency_key to make retries safe. |
| revoke_file_requestA | Close a file request link immediately; uploads in progress are rejected. Requires shares:write; supports idempotency. |
| revoke_linkA | Revoke a direct URL immediately; it starts returning 404. Requires shares:write; supports idempotency. |
| revoke_shareA | Revoke a share URL immediately. Requires shares:write; supports idempotency. |
| search_file_contentsA | Search files by the text inside them (PDF, Word/Excel/PowerPoint, OpenDocument, plain text and code). Matches a literal substring, case-insensitive; returns a snippet around the first match and its PDF page. Scanned images are not searchable. |
| search_filesA | Find files and folders anywhere in the drive (or inside the credential's folder scope) whose name contains the query, case-insensitive. Returns up to 200 matches per page with id, kind, size and path, plus next_cursor to continue. Matches names only: to search the text inside PDFs, Office files and text files use search_file_contents; to list one folder use list_files. Requires files:read. |
| storage_statusA | Get account quota, used/reserved/available bytes, active uploads and transfer limits. Available space is advisory; final commit enforces quota. |
| trash_nodesA | Move one or more files or folders, with everything inside them, to the trash. Nothing is permanently deleted: items stay listed in list_trash and recoverable with restore_nodes until the retention period ends (30 days by default), and the user can also undo the change from the app's activity log. All-or-nothing; returns success. For per-item results or a dry-run preview, use batch_nodes. Requires files:delete; pass idempotency_key to make retries safe. |
| view_imageA | Look at a file as an image: any image format (JPEG, PNG, WebP, HEIC, RAW…), a video's cover frame, or the first page of a PDF or converted Office document. Returns a JPEG of at most 1568 px on the long edge. |
| wait_uploadA | Wait up to 25 seconds for an upload to become ready, failed, or aborted. On timeout returns latest status; repeat if nonterminal. Use this after complete_upload instead of calling get_upload_status in a loop. |
| write_text_fileA | Create a UTF-8 text file, or replace the whole content of one (at most 2 MiB). Overwriting a non-empty file needs base_sha256 from read_text_file; the old content stays in version history. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 45 tools
Descriptions go out of their way to cross-reference alternatives (read_text_file vs read_document_text vs view_image; list_files vs search_files vs search_file_contents; list_activity vs list_audit), so most boundaries are clear. However, batch_nodes deliberately subsumes move_nodes/copy_nodes/trash_nodes/restore_nodes, and the six-tool upload lifecycle (prepare/get_parts/status/wait/complete/abort) plus get_job vs list_jobs create some genuine selection ambiguity.
Almost everything is snake_case verb_noun (list_files, create_share, revoke_link, restore_nodes, search_file_contents), which is highly predictable. Exceptions are chat_list and chat_send (noun_verb reversed) and storage_status (no verb), which are minor deviations in an otherwise uniform scheme.
45 tools is well past the 25+ threshold and is heavy even for a full-featured cloud drive: six tools are devoted to the upload lifecycle alone and four node operations are duplicated inside batch_nodes. The surface is broad but an agent must carry a large decision space for a single storage domain.
Coverage is genuinely broad: file/folder CRUD, upload/download, search by name and content, trash with restore, shares/links/file requests, archives, background jobs, chat, activity/audit and quota. Minor gaps remain: no permanent-delete/empty-trash purge, no version-history listing despite versioning being referenced, and no get-detail tools for individual shares, links or file requests.