> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zerodrive.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Hosted remote MCP endpoint: https://api.zerodrive.dev/mcp (OAuth 2.0 PKCE or Bearer token).
> REST API base URL: https://api.zerodrive.dev with OpenAPI 3.1.0 specification at https://api.zerodrive.dev/openapi.json.
> S3-compatible gateway: https://api.zerodrive.dev/s3 (AWS Signature V4, region auto).
> Local command-line tool: zd (or zerodrive) and local stdio MCP server: zerodrive mcp.
> Token prefixes: zdk_ (Personal API Key), zdt_ (device session token), zda_ (OAuth access token), zdr_ (OAuth refresh token), zdx_ (temporary sandbox key). Never paste real keys into prompts or code.
> Be honest about platform boundaries: cloud files require internet access, files are encrypted at rest and in transit by Cloudflare rather than end-to-end encrypted, ZeroDrive is not a replacement for an independent backup, Windows 11 support is an unsigned x64 beta, and the 7-day Pro free trial requires a card and charges automatically when it ends.

# Files, Folders, Moves & Streaming Tools

> MCP tools for browsing, reading, editing, large uploads, safe moves, Trash, duplicates, and Drive Map.

Core file, move, duplicate, Trash, and Drive Map tools on **`https://api.zerodrive.dev/mcp`**.

## Browsing and sizes

| Tool | Inputs | What it does |
| :- | :- | :- |
| `get_file_tree` | `path`, `depth` (1 to 4) | Visual folder tree. |
| `list_files` | `path`, `recursive`, `limit`, `cursor` | Lists files, sizes, dates, and pages. |
| `list_folders` | `prefix`, `drive_id`, `limit`, `cursor` | Lists subfolders. |
| `get_file_info` | `path`, `drive_id` | Returns size, type, revision, and versions. |
| `get_folder_size` | `path` | Exact file count and folder size. |
| `get_vault_map` | `format` | Compact Drive Map overview. |
| `refresh_vault_map` | `format` | Rebuilds `_SYSTEM/vault-index.md` and `ROUTER.md`. |
| `run_vault_doctor` | `topic` | Checks connection health and help. |

## Reading, writing, and editing

| Tool | Inputs | What it does |
| :- | :- | :- |
| `read_file` | `path`, `lines`, `head`, `tail`, `encoding` | Reads text lines or binary info. |
| `write_file` | `path`, `content`, `append`, `content_base64`, `source_url` | Creates, replaces, or appends a file. |
| `edit_file` | `path`, `old_text`, `new_text` | Swaps exact text safely. |
| `batch_write_files` | `files` (up to 500, `<= 5 MiB`) | Writes many text files and saves backups. |
| `create_folder` | `path`, `drive_id` | Creates one folder. |
| `ensure_folders` | `paths` (up to 500), `drive_id` | Creates folders safely, skipping existing. |
| `rename_folder` | `from_path`, `to_path`, `drive_id` | Renames a folder. |
| `move_folder` | `from_path`, `to_path`, `drive_id` | Moves a folder. |
| `copy_file` | `source`, `destination` | Copies one file. |

## Large files and binary transfers

| Tool | Inputs | What it does |
| :- | :- | :- |
| `upload_binary_file` | `path`, `source_url` or `content_base64` | Uploads media, PDFs, or archives. |
| `create_upload_urls` | `paths` | 1-hour HTTP `PUT` URLs up to 5 GiB. |
| `get_download_url` | `path` | 24-hour range download link. |
| `read_bytes` | `path`, `offset`, `length` | Reads up to 64 KiB bytes. |
| `write_bytes` | `path`, `content_base64`, `offset`, `truncate`, `expected_revision` | Writes up to 64 KiB at an offset. |
| `create_patch_url` | `path`, `offset`, `truncate` | Signed `PATCH` link up to 64 MiB. |
| `prepare_upload` | `path`, `drive_id`, `expected_revision` | Starts a staged upload session. |
| `complete_upload` | `upload_id`, `sha256`, `expected_revision` | Verifies checksum and finishes upload. |
| `get_upload` | `upload_id` | Checks staged upload state. |

Upload big local files straight from shell after calling `create_upload_urls`:

```bash theme={null}
curl -sS -X PUT --upload-file "./demo.mp4" "<upload_url>"
```

## Moves, Trash, duplicates, and skills

| Tool | Inputs | What it does |
| :- | :- | :- |
| `move_file` | `source`, `destination`, `resume`, `after` | Moves files (200/step) and keeps share links. |
| `list_moves` | `path`, `limit` | Shows recent move history. |
| `undo_move` | `move_id` or `path` | Reverts move if old spot is empty (`409`). |
| `find_path_references` | `path` | Read-only check for old paths in text. |
| `delete_file` | `path` | Sends one file to 30-day Trash. |
| `batch_delete_files` | `files` | Trashes up to 400 files all together. |
| `delete_folder` | `path`, `drive_id` | Starts async folder move to Trash. |
| `continue_folder_deletion` | `operation_id` | Advances a big folder delete. |
| `get_operation` | `operation_id` | Checks background operation status. |
| `list_deleted_files` | `prefix`, `drive_id`, `limit` | Lists Trash (`trs_...`) and versions (`ver_...`). |
| `restore_deleted_file` | `item_id`, `destination_path` | Restores a deleted item. |
| `list_recovery_copies` | `prefix`, `drive_id` | Lists conflict and safety copies. |
| `find_duplicates` | `path`, `scan_id`, `offset` | Read-only scan for identical files. |
| `save_skill` | `name`, `description`, `instructions` | Saves a skill in `_SKILLS/<verb-noun>/SKILL.md`. |
| `get_skill` | `reference` | Reads built-in Skill modules. |
| `list_prompts` / `get_prompt` | `name`, `path` | Lists and fetches built-in prompts. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.