Create or Clone Project
openl_create_projectCreates a new OpenL project in a design repository, either as a blank project or by cloning an existing project's full structure including rules, tests, and settings.
Instructions
Create a new OpenL project in a design repository and commit it. Two modes, selected by the template argument:
• CREATE (omit template): create a BLANK project from the default empty skeleton. Committed atomically on the repository's default branch; returns the commit revision.
• CLONE (pass template = an existing project name): copy the source project's FULL structure (rules, tests, settings, request/response examples) into the new project and rename it — the project name in rules.xml is updated to projectName, matching OpenL Studio's Copy Project. The clone is committed atomically through the create-from-zip endpoint, so it is indexed and appears in openl_list_projects immediately.
Call openl_list_repositories() / openl_list_projects() first. Returns the new project name and commit revision (hash). A name collision is rejected with 409; a missing clone source returns 404; missing permission returns 403. Note: branch is honored for clones but that path writes directly to Git via the files API (one commit per file, not atomic), so a BRANCH clone may not appear in openl_list_projects until OpenL re-indexes the repository — omit branch for the default, immediately-visible clone. Local repositories are not supported.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| branch | No | Target branch (the ticket's `defaultBranch`). Honored when CLONING (the source is read from and the clone written to this branch). For a BLANK project, omit this — blank projects are created on the repository's default branch (the create endpoint cannot target a branch); passing branch without template is rejected. | |
| comment | No | Commit comment for audit. Applied when creating a BLANK project; clone commit messages are system-generated. Defaults to 'Project <name> is created.' when omitted. | |
| template | No | How to create the project (the ticket's `template`). OMIT to create a BLANK project from the default empty skeleton. To CLONE an existing project, pass its name (from openl_list_projects()): its full structure is copied (rules, tests, settings, request/response examples) and the project is renamed to projectName. The clone source must be in the same repository. | |
| repository | Yes | Repository identifier. Pass either the 'id' or the 'name' field from openl_list_repositories() — the tool accepts both (and is case-insensitive). DO NOT invent values like 'Design Repository' or 'design-repo'; the actual names are typically short tokens (e.g. 'Design'). Always call openl_list_repositories() first if you don't already have the value in context. | |
| projectName | Yes | Name for the new project (the ticket's `project`). Becomes the project folder name and — when cloning — the renamed project name written into rules.xml. Must be unique in the repository; a collision is rejected with 409. Allowed characters: letters, digits, space, '_' and '-'. | |
| 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 |