Filesystem access for agents over a uniform tool surface. Reads, writes, lists, and manages files within operator-configured named roots. Each root can be backed by a host directory, an ephemeral temp dir (auto-cleaned on JVM exit), or a DLFS drive (lattice-backed, per-user). Agents address files by root name + relative path regardless of backend. With no roots configured the venue defaults to a single ephemeral 'tmp' root.
| Name: | file |
| Class: | covia.adapter.FileAdapter |
This adapter provides 12 MCP tool(s) for AI agent integration:
| Tool Name | Description |
|---|---|
| file_roots | List the named filesystem roots configured for this venue. Returns each root's name, display path, kind (host/temp/dlfs), and read-only flag. Agents must use one of these names as the 'root' parameter for other file operations. Roots can be backed by host directories, ephemeral temp dirs, or DLFS drives — the file: surface is uniform regardless. If the operator has not configured any roots, the venue defaults to a single ephemeral 'tmp' root that is created at startup and deleted on JVM exit. |
| file_write | Write a file under a configured filesystem root or to an authorised DLFS path. Creates the file if absent and overwrites it otherwise. Parent directories must exist. Supply exactly one of content, value, bytes, or contentRef. |
| file_delete | Delete a file or empty directory under a configured filesystem root. Set 'recursive' to true to remove a non-empty directory and all its contents. The root itself cannot be deleted. Read-only roots reject deletes. |
| file_list | List entries in a directory under a configured filesystem root. Returns each entry's name, type (file/directory/symlink/other), size in bytes, and last-modified time (epoch millis). Omit 'path' to list the root itself. |
| file_move | Rename or relocate a file or directory. Endpoints may be relative paths plus root/toRoot, file://<root>/<path>, or canonical DLFS references. The destination must not exist and its parent must exist. Same-drive DLFS moves remain provider-native. Both endpoints must be writable. |
| file_copy | Copy a file or directory. Endpoints may be relative paths plus root/toRoot, file://<root>/<path>, or canonical DLFS references. Bytes stay inside the filesystem providers; directory copies use shallow-copy semantics. The destination must be writable; the source may be read-only. |
| file_read | Read a file from a configured filesystem root or an authorised DLFS path. The mode controls decoding: auto (default), text, bytes, or json. Binary auto reads return a WebDAV URL when one is available, otherwise inline base64. |
| file_append | Append to a file under a configured filesystem root or at an authorised DLFS path, creating it if absent. Supply exactly one of content, value, bytes, or contentRef. |
| file_create | Create a new file under a configured filesystem root or at an authorised DLFS path. Fails if the target already exists. Omit content to create an empty file. When supplied, content is the standard asset content descriptor: inline UTF-8 text, any resolvable ref, or a sha256 blob from content storage; sha256 alongside inline/ref verifies integrity. Parent directories must exist. |
| file_tree | Render a tab-indented text tree of a directory under a configured filesystem root. Designed for LLM consumption — directories end with '/' and files are listed by name only. Set 'info': 'size' to append file sizes (e.g. '(1.2 KB)'). 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 root. |
| file_mkdir | Create a directory under a configured filesystem root. Set 'parents' to true to create missing intermediate directories (mkdir -p). Existing directories are accepted and reported with created=false. Read-only roots reject mkdir. |
| file_stat | Return metadata for a path under a configured filesystem root. Reports whether the path exists, its type (file/directory/symlink/other), size in bytes, last-modified time (epoch millis), and the root's read-only flag. |