Skip to main content
Glama

Copy path

copy_path

Copy a file or directory within the workspace, enabling recursive for folders and overwrite to replace an existing target file when duplicating templates.

Instructions

Copy a file, or a directory with recursive=true, inside the workspace. overwrite=true replaces an existing file; symbolic links and protected files inside a directory are skipped. Use when: you duplicate a file or folder, for example to start from a template. Avoid when: you move or rename (move_path). Output: from, to, kind, overwritten, entries, bytes, skipped_symlinks/skipped_protected when any. Missing source gives not_found, an existing target without overwrite gives conflict.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "from": "<from>",
      "to": "<to>"
    },
    "name": "copy_path"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesNew workspace path: the final name, not a parent directory.
fromYesExisting workspace path to copy.
reasonNoOptional why (max 400 chars), audit-logged.
overwriteNotrue replaces an existing target file (default false). A directory is never replaced.
recursiveNotrue is required to copy a directory (default false).
create_dirsNotrue creates missing parent directories of `to` (default true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed15 schema fields changedv4.5.0
    • removedInput schema / properties / create_dirs / anyOf
      Removed value: -[
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "maximum": 1,
      -    "minimum": 0,
      -    "type": "integer"
      -  }
      -]
    • changedInput schema / properties / create_dirs / description
      Previous value: -"1 creates missing parent directories of `to` (default 1)."New value: +"true creates missing parent directories of `to` (default true)."
    • removedInput schema / properties / create_dirs / maximum
      Removed value: -1
    • removedInput schema / properties / create_dirs / minimum
      Removed value: -0
    • changedInput schema / properties / create_dirs / type
      Previous value: -"integer"New value: +"boolean"
    • removedInput schema / properties / overwrite / anyOf
      Removed value: -[
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "maximum": 1,
      -    "minimum": 0,
      -    "type": "integer"
      -  }
      -]
    • changedInput schema / properties / overwrite / description
      Previous value: -"1 replaces an existing target file (default 0). A directory is never replaced."New value: +"true replaces an existing target file (default false). A directory is never replaced."
    • removedInput schema / properties / overwrite / maximum
      Removed value: -1
    • removedInput schema / properties / overwrite / minimum
      Removed value: -0
    • changedInput schema / properties / overwrite / type
      Previous value: -"integer"New value: +"boolean"
    • removedInput schema / properties / recursive / anyOf
      Removed value: -[
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "maximum": 1,
      -    "minimum": 0,
      -    "type": "integer"
      -  }
      -]
    • changedInput schema / properties / recursive / description
      Previous value: -"1 is required to copy a directory (default 0)."New value: +"true is required to copy a directory (default false)."
    • removedInput schema / properties / recursive / maximum
      Removed value: -1
    • removedInput schema / properties / recursive / minimum
      Removed value: -0
    • changedInput schema / properties / recursive / type
      Previous value: -"integer"New value: +"boolean"
  2. Addedv4.0.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare the generic hints (readOnly=false, destructive=false, idempotent=false); the description adds concrete behavior: overwrite replaces an existing file but never a directory, symlinks and protected files inside a directory are skipped, and which error codes (not_found, conflict) map to which failure. It also enumerates the return payload (from, to, kind, overwritten, entries, bytes, skipped counters), which is essential since no output schema exists.

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?

Front-loaded core statement followed by labeled sections (Use when / Avoid when / Output), each one line. No filler; every sentence carries either routing, behavior, or error 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?

With six parameters, no output schema, and generic annotations, the description covers what is needed: selection guidance, overwrite/skip semantics, return fields, and the two named error outcomes. Minor gap: it does not state whether the operation is atomic or what happens on partial failure during a recursive copy.

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, but the description adds meaning beyond field docs: recursive is framed as the gate for directory copies, overwrite is scoped to files (directories never replaced), and skipped symlink/protected entries are tied to the recursive case. Only create_dirs and reason are left entirely to 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?

Opens with a specific verb+resource ('Copy a file, or a directory with recursive=true') and scopes it to the workspace. It explicitly names the sibling it is not ('move or rename (move_path)'), so an agent can distinguish it without inspecting 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?

Provides explicit 'Use when' (duplicating a file/folder, e.g. from a template) and 'Avoid when' (move/rename -> move_path) guidance. The alternative is named along with the condition that selects it.

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