Skip to main content
Glama

Copy a file

copy-file
DestructiveIdempotent

Copies a file (up to 50 MiB) into an existing folder in Foundry’s data storage, leaving the original in place. Use it to duplicate assets or stage a move before rewriting paths.

Instructions

Copy a file (at most 50 MiB) inside Foundry's data storage into an existing folder. The original stays: Foundry cannot delete files. To move files: find-file-references on the old path, copy-file, then world-rewrite-paths (dryRun first), then find-missing-files. Needs the write switch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesThe target folder; it must exist
fromYesThe file to copy, such as "worlds/<world>/old/map.webp"
nameNoNew file name; default the same name
dryRunNoOnly check and report what would happen; nothing is written. Needs no write permission.
overwriteNoReplace a file of the same name in the target folder

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv14.2609.4

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, and idempotentHint=true. The description adds important context: the original file is preserved; actually, it says 'The original stays: Foundry cannot delete files.' It also clarifies the write switch requirement and the dryRun behavior (needs no write permission, implying the actual copy does). However, it does not explicitly state that the operation is destructive (overwrites) or that it is idempotent, but the annotations cover those.

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 concise and well-structured. It front-loads the core action and constraints, then provides a practical moving workflow, all in a few sentences with no wasted words. It efficiently packs essential information.

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?

Given that there is no output schema, the description does not explain return values, but that is acceptable for a copy operation. It covers key prerequisites (existing folder, write switch), constraints (size limit, no deletion), and the moving workflow. It does not mention the overwrite behavior in detail, but the schema covers that. Overall, it is fairly complete for the tool's complexity.

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 description coverage is 100%, so the schema already documents all parameters. The description does not add significant detail beyond the schema, but it clarifies the 'to' folder must exist and the 'name' default. The description reinforces the dryRun purpose but adds little new meaning, so baseline 3 is appropriate.

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

Purpose4/5

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

The description states a clear verb ('Copy'), a resource ('a file inside Foundry's data storage'), and a destination ('existing folder'), with an explicit size limit. It distinguishes itself from file-moving alternatives by noting it cannot delete files, but does not directly name a sibling tool for copying (though file movement tools are implied).

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

Usage Guidelines4/5

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

The description provides explicit direction on when to use this tool versus moving files: it states the tool cannot delete files and outlines a multi-step procedure (find-file-references, copy-file, world-rewrite-paths, find-missing-files) for moving. It also mentions the write switch requirement, but does not explicitly say when NOT to use it (e.g., if only moving is needed).

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

Deploy Server

Other Tools