Copy Project File
openl_copy_project_fileCopy a file to a new project-relative path with automatic folder creation. Staged in working copy; commit with save tool. Ideal for duplicating rules or test sets.
Instructions
Copy a file within a project to a new project-relative path. Maps to POST /projects/{projectId}/file-copy. Intermediate destination folders are created automatically. There is NO overwrite option — if destinationPath already exists the call fails with HTTP 409; choose a different destination or delete the existing file first. The copy is staged in the working copy — commit it with openl_save_project. Use 'branch' to pin the project's branch. Use this to scaffold a new module from an existing one or clone a test set.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| branch | No | Branch the project must be on for this operation. Ignored when blank. Fails if the repository has no branches or the project is on another branch. Omit for repository 'local' and non-branch repositories. | |
| projectId | Yes | Project ID returned by backend. Use the exact 'projectId' value from openl_list_projects() response without modification or reformatting. | |
| sourcePath | Yes | Project-relative path of the source file (e.g. 'rules/Model.xlsx'). | |
| destinationPath | Yes | Project-relative destination path (e.g. 'rules/Model-copy.xlsx'). Intermediate folders are created automatically. | |
| response_format | No | Response format: 'json' for structured data, 'markdown' for human-readable (default), 'markdown_concise' for brief summary (1-2 paragraphs), 'markdown_detailed' for full details with context | markdown |