files/list
Inspect one directory's immediate entries in ls -l style: type, permissions, owner, group, size, modification time and symlink targets. Read-only, non-recursive.
Instructions
Lists the entries of ONE directory like ls -l (dotfiles, . and .. are hidden unless all: true): type and permissions, link count, owner, group, size, modification time and symlink targets (symlinks are shown, never followed). Read-only, not recursive, no entry cap; path must be absolute. For a recursive or filtered search use files/find, for a directory's total size disks/usage, for a file's MIME type files/filetype. On permission denied retry with privileged: true if granted (root calls also need a paths: entry covering the path). Text output is ls -l lines (Directory is empty. when empty; long: false gives names only, directories suffixed /). output_format: json returns an array of objects (name, type, mode, mode_octal, links, owner, group, uid, gid, size, modified, is_dir, target), [] when empty.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | Include dotfiles, . and .. (ls -a) | |
| long | No | Long listing like ls -l: type+permissions, links, owner, group, size, date, symlink target. Default true; false lists names only | |
| path | Yes | Absolute path of the directory to list | |
| sort | No | Sort by name (default), size (largest first) or time (newest first) | |
| reverse | No | Reverse the sort order (ls -r) | |
| dirs_first | No | List directories before files | |
| privileged | No | Run as root. Needs a grant for this tool in mcp-sudo.yaml and a `paths:` entry covering the path, otherwise refused | |
| numeric_ids | No | Show numeric uid/gid instead of names (ls -n) | |
| output_format | No | Use json for structured output (yaml, table and wide return the same JSON); default is text | |
| human_readable | No | Sizes like 4.0K, 1.5M (ls -h); default is bytes |