Skip to main content
Glama

Rename or move a file

ptero_rename_file

Rename or move a file or directory on a Pterodactyl server, relative to a root path, including moves between directories. Safe alternative to deletion, with protected-path checks.

Instructions

Rename a file or directory — and, because from and to are both interpreted relative to root, MOVE it between directories too. root="/", from="plugins/old.jar", to="plugins/disabled/old.jar" moves the jar into the disabled folder. The destination directory must already exist.

This is the safe way to take a plugin or config out of service: rename it rather than deleting it, and it can be renamed back. Prefer this over ptero_delete_file whenever the change might need undoing.

Both the source and the destination are checked against PTERODACTYL_PROTECTED_PATHS, so a rename cannot be used to move something out of a protected directory. No backup is taken (nothing is destroyed) and no confirmation is required, but the call is counted against PTERODACTYL_MAX_MUTATIONS and audited.

It does not create directories and it does not overwrite: if to already exists the panel returns an error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesNew path, relative to `root`. Give a different directory here to move the file rather than just rename it. Must not already exist.
fromYesExisting path, relative to `root`. E.g. `plugins/old.jar`.
rootNoDirectory that `from` and `to` are relative to. Defaults to `/` (the server root), which lets you move between directories by giving full paths in `from` and `to`./
serverNoServer short identifier (e.g. 1a2b3c4d). Omit to use PTERODACTYL_DEFAULT_SERVER. Call ptero_list_servers to discover valid identifiers.
dry_runNoWhen true, validate and preview the change without performing it. Nothing is modified and no confirmation token is issued. Use this to reason about an operation before committing to it.
confirmation_tokenNoTwo-phase confirmation token. Leave this out on the first call: the tool will refuse to act and instead return a preview of exactly what would change, plus a single-use token that expires in 120 seconds. THE PREVIEW IS FOR THE HUMAN — show it to the user in your reply and let them decide. Do not silently round-trip the token back in an immediate second call. Only call again with the token once the user has seen the preview and approved it. The token is bound to a hash of these exact arguments, so changing any argument invalidates it.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNo
fromNo
rootNo
reasonNoWhy the call was refused.
serverYes
statusYessuccess = the change was made. refused = a guardrail blocked it (see reason/variable). dry_run = nothing changed; preview shows what would. needs_confirmation = nothing changed; SHOW the preview to the human and, only if they agree, call again with confirmation_token.
messageNo
previewNoWhat would / did change.
to_pathNoFull server-relative destination path.
variableNoEnvironment variable that caused the refusal.
backup_idNoUUID of the automatic pre-change backup, if one was taken.
from_pathNoFull server-relative source path.
expires_in_sNo
confirmed_viaNo
confirmation_tokenNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior3/5

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

The description discloses protected-path checks, no-overwrite behavior, no-directory-creation, and mutation accounting, which adds real value beyond the annotations. However, it states 'no confirmation is required' while the confirmation_token parameter says the tool will refuse to act without a token and requires human approval, an internal inconsistency that undermines an otherwise strong disclosure.

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

Conciseness4/5

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

The description is front-loaded with the core action and move capability, and every paragraph adds operational context. It is longer than necessary and contains the contradictory confirmation statement, but there is no filler.

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

Completeness4/5

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

For a mutation tool with six parameters, the description covers use case, constraints, safety, and relationship to sibling tools; a rich output schema covers the return value. The confirmation-token contradiction is the main completeness gap, preventing a 5.

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 schema already documents all six parameters. The description adds a concrete move example and reinforces that from/to are both root-relative, going slightly beyond the bare 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?

The description names the operation ('Rename a file or directory') and immediately extends it to moving by interpreting both from and to relative to root, with a concrete example. This clearly distinguishes the tool from ptero_delete_file and ptero_copy_file.

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?

It explicitly says to prefer this over ptero_delete_file whenever a change might need undoing, giving a clear when-to-use rule. It also sets boundaries by stating the destination directory must already exist and that overwriting is not supported.

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