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 9 MCP tool(s) for AI agent integration:
| Tool Name | Description |
|---|---|
| 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_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_read | Read a file from a configured filesystem root. The 'mode' parameter controls decoding: 'auto' (default) returns UTF-8 text for text files and base64 for binary; 'text' forces UTF-8; 'bytes' returns base64; 'json' parses as JSON and returns the value. The encoding field on the response indicates which path was taken. Path may be either relative ('foo.txt') or rooted ('/foo.txt'); both refer to the same file inside the root. |
| 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_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_append | Append bytes to a file under a configured filesystem root, creating the file if it does not exist. Supply exactly one of 'content' (UTF-8 text), 'value' (JSON-serialised), 'bytes' (base64 inline), or 'asset' (CAS reference, streamed). Read-only roots reject writes. |
| file_write | Write a file under a configured filesystem root. Creates the file if it does not exist; truncates and overwrites otherwise. Parent directories must already exist — call file:mkdir first if needed. Supply exactly one of 'content' (UTF-8 text), 'value' (JSON-serialised), 'bytes' (base64 inline), or 'asset' (CAS reference, streamed). Read-only roots reject writes. |
| 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_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. |