Skip to main content
Glama

copy_file

Copy a file to a new path, preserving permissions and creating parent directories. Prevents overwriting unless enabled and supports cross-device copies.

Instructions

Copy a file to a new path, preserving file permissions. Parent directories of to are created if missing. Refuses to overwrite an existing destination unless overwrite=true. Cross-device copies are supported. Notifies the LSP server with FileCreated so diagnostics update immediately. To move or rename a file, use rename_file instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoAbsolute path, file:// URI, or workspace-relative path of the destination. Parent directories are created automatically.
fromNoAbsolute path, file:// URI, or workspace-relative path of the source file.
dirty_okNoAllow copying a file that has uncommitted changes. Default false.
overwriteNoAllow overwriting an existing destination file. Default false.
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It reveals that permissions are preserved, parent directories are created, overwrite is refused by default, cross-device copies work, and the LSP server is notified (FileCreated) for immediate diagnostics. This is comprehensive and goes well beyond the basic schema.

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 (three sentences) and well-structured: it starts with the primary purpose, then covers behavioral details, and ends with a pointer to an alternative. Every sentence contributes unique value; no fluff or repetition.

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?

For a file copy tool with four parameters and no output schema, the description provides complete context: purpose, key effects (permissions, parent directories, LSP notification), safety (overwrite refusal), technical capability (cross-device), and differentiation from sibling. The absence of an output schema is acceptable, as the description explains the outcome sufficiently.

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 parameters (to, from, dirty_ok, overwrite) are fully documented in the schema. The description adds slight context by reiterating overwrite behavior and parent directory creation, but these are already present in the parameter descriptions. Thus it meets the baseline without significantly enriching 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?

The description states the exact action ('Copy a file to a new path') and explicitly distinguishes from the sibling 'rename_file' by instructing to use it for move/rename. It also names the resource and key behaviors clearly, leaving no ambiguity about the tool's purpose.

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?

The description explicitly tells the user when to use an alternative tool ('To move or rename a file, use rename_file instead'), and provides usage context such as automatic parent directory creation, overwrite behavior with the overwrite=true flag, and cross-device support. This is clear guidance on when and how to use the tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/plumbkit/plumb'

If you have feedback or need assistance with the MCP directory API, please join our Discord server