Decentralised Lattice File System — self-sovereign file storage with CRDT merge semantics. Manage per-user drives, read and write files, list directories. DLFS drives exist as an independent lattice region signed by the user's own key, enabling private, portable health vaults and document storage.
| Name: | dlfs |
| Class: | covia.adapter.DLFSAdapter |
This adapter provides 11 MCP tool(s) for AI agent integration:
| Tool Name | Description |
|---|---|
| dlfs_create_drive | Create a new named DLFS drive for the caller. Each drive is an independent file system with CRDT merge semantics. |
| dlfs_delete | Delete a file or directory from a DLFS drive. Set 'recursive' to true to remove a non-empty directory and all its contents. |
| dlfs_list | List directory contents in a DLFS drive. Returns entries with name, type (file/directory), size in bytes, and last-modified time (epoch millis). Omit path to list the drive root. |
| dlfs_append | Append content to a file in a DLFS drive, creating the file if it does not exist. Parent directories must already exist — use dlfs:mkdir first if needed. Supply exactly one of 'content' (UTF-8 text), 'value' (JSON-serialised), 'bytes' (base64 inline), or 'asset' (CAS reference, streamed). |
| dlfs_read | Read a file from a DLFS drive. The 'mode' parameter controls how the file is returned: 'auto' (default) returns UTF-8 text for text files, or a reference with a WebDAV URL for binaries; 'text' forces UTF-8 decoding; 'bytes' returns base64-encoded bytes; 'json' parses the file as JSON and returns the value. For binary files, prefer fetching via the WebDAV GET transport at /dlfs/{drive}/{path} rather than using 'bytes' mode. |
| dlfs_stat | Return metadata for a path in a DLFS drive. Reports whether the path exists, its type (file/directory/other), size in bytes, last-modified time (epoch millis), and the best-guess MIME type for files. |
| dlfs_tree | Render a tab-indented text tree of a directory in a DLFS drive. Designed for LLM consumption — directories end with '/' and files are listed by name only. Set 'info': 'size' to append file sizes. Walk is capped by 'maxDepth' (default 3, max 10) and 'maxEntries' (default 500, max 5000); when the entries cap is hit the response sets truncated=true. Path may be omitted to walk from the drive root. |
| dlfs_write | Write content to a file in a DLFS drive. Creates the file if it does not exist; overwrites if it does. Parent directories must already exist — use dlfs:mkdir first if needed. Supply exactly one of 'content' (UTF-8 text), 'value' (JSON-serialisable), 'bytes' (base64 inline), or 'asset' (content-addressed reference, streamed). Large binary uploads from clients should use the WebDAV PUT transport at /dlfs/{drive}/{path} directly. |
| dlfs_list_drives | List all DLFS drives owned by the caller. Returns an array of drive names. |
| dlfs_delete_drive | Delete a DLFS drive owned by the caller. All files in the drive are removed. |
| dlfs_mkdir | Create a directory in a DLFS drive. Set 'parents' to true to create missing intermediate directories (mkdir -p). Existing directories are accepted and reported with created=false. |