Skip to content

Filesystem server

Start the server:

bash
tuls filesystem <DIR>... [--allow SELECTOR]... [--deny SELECTOR]...

Tools

ToolCapabilityPurpose
read_text_filefilesystem.readRead bounded UTF-8 text; supports head or tail
read_media_filefilesystem.readRead a bounded media file into typed MCP content
read_multiple_filesfilesystem.readRead a bounded batch of files
list_directoryfilesystem.readList directory entries
list_directory_with_sizesfilesystem.readList entries with sizes and sort by name/size
directory_treefilesystem.readBuild a bounded tree representation
search_filesfilesystem.readSearch by glob-style pattern
get_file_infofilesystem.readReturn filesystem metadata
list_allowed_directoriesfilesystem.readShow configured roots
write_filefilesystem.writeAtomically replace file contents
edit_filefilesystem.writeApply structured edits or preview a diff
create_directoryfilesystem.writeCreate directories
move_filefilesystem.writeMove a file or directory inside allowed scope

MCP JSON naming

Public tool JSON uses camelCase:

json
{
  "path": "src/main.rs",
  "head": 120
}
json
{
  "path": ".",
  "sortBy": "size"
}
json
{
  "path": ".",
  "pattern": "**/*.rs",
  "excludePatterns": ["target/**"]
}

Fail closed

Unknown fields are rejected rather than ignored.

Path behavior

  • All paths must remain under at least one allowed root.
  • Relative paths resolve against the first configured root.
  • Existing paths are canonicalized before authorization.
  • Symlink entries are listed as symlinks; size listing does not follow a symlink just to obtain target metadata.
  • Writes use a same-directory temporary file and rename for atomic replacement.
  • edit_file matches oldText exactly, with no whitespace or line-ending normalization (\n never matches \r\n), and each oldText must occur exactly once in the file; a missing or ambiguous match fails the call without writing.

Example scopes

Review-only scope:

bash
tuls filesystem /work/project \
  --allow filesystem.read

Implementation scope without moves:

bash
tuls filesystem /work/project \
  --allow filesystem.read \
  --allow filesystem.write \
  --deny filesystem/move_file

Related

MIT licensed · built for MCP 2026-07-28