Skip to main content
Glama

List files in a server directory

ptero_list_files
Read-onlyIdempotent

List 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

TableJSON Schema
NameRequiredDescriptionDefault
serverNoServer short identifier (e.g. 1a2b3c4d). Omit to use PTERODACTYL_DEFAULT_SERVER. Call ptero_list_servers to discover valid identifiers.
directoryNoDirectory to list, relative to the server root. Defaults to `/` (the root). Examples: `plugins`, `logs`, `plugins/Geyser-Spigot`. Leading slashes are optional./

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYes
serverYes
entriesYesDirectories first, then files, each group sorted by name.
directoryYesDirectory that was listed, as a server-relative path (`/` = server root).
file_countYes
directory_countYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already signal read-only, idempotent, and non-destructive behavior. The description adds valuable behavioral context beyond those annotations: it is non-recursive, returns entries with full server-relative paths, lists directories before files, and sorts each group by name. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded: result semantics first, then use cases, then limitations. Every sentence carries useful information for tool selection or invocation, with no filler or repetition of schema content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the rich input schema, safe annotations, and presence of an output schema, the description covers everything an agent needs: what is listed, how results are ordered, the non-recursive behavior, the lack of file contents, and how the returned paths connect to other file tools. Nothing important is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds extra practical meaning by explaining that the returned `path` is the value other file tools expect and by giving concrete directory examples like `plugins/Geyser-Spigot`. This enriches parameter understanding beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'List one directory on the game server, relative to the server root.' It also describes exactly what each entry contains and the ordering, so an agent can distinguish this from file-content and write/delete tools without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says when to use it ('Use this to find out what is actually on disk before reading or changing anything'), what it is not ('not recursive', 'does not return file contents'), and names ptero_read_file as the alternative for contents. This gives clear routing guidance against sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.