push_workspace_version
Create a new version of a workspace and push it to a git repository. Supports platform-wide or workspace-level repository selectors.
Instructions
Push a workspace to a git repository by creating a new version.
If the user asks to push to git, you MUST pass gitPlatform (or repositoryId) — do not call this tool without one of these selectors. Omitting both is only valid when the caller explicitly wants a non-git local snapshot.
Selector choice:
gitPlatform— the default for pushing to git on Prisme.ai. Pass the platform repository id (key under the workspace'splatformRepositories). If you don't know the id, pass any plausible value; the tool will reject it and return the list of available platform repos so you can retry. Prefer this selector unless the user specifically names a workspace-level repo.repositoryId— only when the user explicitly references a repo declared on the workspace itself (underrepositories:with moderead-write).
Response includes pushedToGit: true|false — if false after a "push to git" request, the call was wrong; retry with gitPlatform.
Common errors:
400 "not up-to-date": the remote has newer commits — pull the workspace and retry.
A successful push holds a ~30 min write lock on the workspace; use
unlock_workspaceto release it early.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional version name (e.g. "v1.2.0"). Auto-generated server-side if omitted. | |
| description | Yes | Version description — used as the git commit message when pushing to a repository. Provide a plain string (preferred for git pushes, as the localized object form is stringified to "[object Object]" in the commit message) or a localized object like `{ en: "...", fr: "..." }`. | |
| environment | No | Optional environment name (from PRISME_ENVIRONMENTS) to use specific API URL and workspace | |
| gitPlatform | No | Platform-wide git repository id (key under `platformRepositories` on the workspace). **Pass this whenever the user asks to push to git on Prisme.ai** — it is the primary selector for git pushes. If you don't know the exact id, pass your best guess; the tool validates it and returns the list of available platform repos so you can retry. Mutually exclusive with `repositoryId`. | |
| workspaceId | No | Alternative: direct workspace ID (use workspaceName instead when possible) | |
| repositoryId | No | Workspace-level repository id (key under `repositories:` in the workspace config). Mutually exclusive with `gitPlatform`. Omit if the workspace has a single repository. | |
| workspaceName | Yes | Workspace name that resolves to ID via PRISME_WORKSPACES or PRISME_ENVIRONMENTS mapping |