List files in a server directory
ptero_list_filesList directory contents on a Pterodactyl game server to inspect files, plugins, and logs before reading or changing them.
Instructions
List one directory on the game server, relative to the server root. Returns each entry's name, full server-relative path, whether it is a file or a directory, size, unix mode, MIME type and last-modified time. Directories are listed first, then files, each group sorted by name.
Use this to find out what is actually on disk before reading or changing anything: which plugins are installed (plugins), which world folders exist, which log files are available (logs), or the exact spelling of a config path.
The path on each entry is the value other file tools want — pass it to ptero_read_file, or use it with ptero_delete_file.
This is not recursive: it lists one level. To go deeper, call it again with a child directory's path. It also does not return file contents — use ptero_read_file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| server | No | Server short identifier (e.g. 1a2b3c4d). Omit to use PTERODACTYL_DEFAULT_SERVER. Call ptero_list_servers to discover valid identifiers. | |
| directory | No | Directory to list, relative to the server root. Defaults to `/` (the root). Examples: `plugins`, `logs`, `plugins/Geyser-Spigot`. Leading slashes are optional. | / |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | ||
| server | Yes | ||
| entries | Yes | Directories first, then files, each group sorted by name. | |
| directory | Yes | Directory that was listed, as a server-relative path (`/` = server root). | |
| file_count | Yes | ||
| directory_count | Yes |