Skip to main content
Glama

Copy a file

ptero_copy_file

Duplicate a file or directory in place to create a safe copy before editing. The panel names the copy; list files after to find its actual name.

Instructions

Duplicate a file or directory in place. THE PANEL CHOOSES THE NAME OF THE COPY — you cannot specify it. Copying config.yml produces something like config copy.yml (and config copy 2.yml the next time) in the same directory. If you need a specific name, copy first and then ptero_rename_file the result; call ptero_list_files afterwards to find out what the copy was actually called.

The obvious use is a hand-rolled safety net before editing a config: copy it, then ptero_write_file the original. For anything bigger than a single file, a real backup (ptero_create_backup) is better — it is off-server and restorable.

The source path is checked against PTERODACTYL_PROTECTED_PATHS. No confirmation and no automatic backup (nothing is overwritten), but the call is counted against PTERODACTYL_MAX_MUTATIONS and audited. Note the copy consumes disk quota.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile or directory to duplicate, relative to the server root, e.g. `plugins/Geyser-Spigot/config.yml`.
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
noteNoReminder that the panel chooses the copy's name; list the directory to see it.
pathNoServer-relative path that was copied.
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.
variableNoEnvironment variable that caused the refusal.
backup_idNoUUID of the automatic pre-change backup, if one was taken.
expires_in_sNo
confirmed_viaNo
confirmation_tokenNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

Adds useful behavioral detail: panel chooses the name, protected-path checks, no overwriting, mutation-limit counting, auditing, and disk-quota consumption. However, the phrase 'No confirmation' conflicts with the two-phase dry_run/confirmation_token flow in the input schema, making the behavioral guidance partially misleading.

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?

Three dense paragraphs, front-loaded with the core action and naming behavior. Each sentence carries useful information—naming scheme, workflow, alternatives, safety, quota—with minimal filler. Slightly long but justified by the unusual naming behavior.

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

Completeness3/5

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

Covers purpose, naming uncertainty, workflow, alternatives, safety checks, mutation limits, audit, and quota. The 'No confirmation' statement conflicts with the documented confirmation-token flow, creating a gap in completeness that could mislead an agent, so it is not fully reliable.

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

Parameters3/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 some relevant constraints (protected-path check, quota consumption) but these are behavioral rather than per-parameter semantics. It does not meaningfully extend the schema's parameter explanations.

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?

Description opens with 'Duplicate a file or directory in place,' a specific verb and resource, and immediately explains the panel-controlled naming behavior. It clearly differentiates from siblings like ptero_rename_file and ptero_write_file by describing the post-copy discovery workflow.

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 states the primary use case (safety net before editing a config), the workflow for getting a specific name (copy, rename, list), and the better alternative for larger operations (ptero_create_backup). This satisfies when/when-not guidance with named alternatives.

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