Set up a Workflow
set_up_workflowSet up the Workflow preview_workflow_setup proposed: pass the same arguments plus its previewHash. Publishes the definition as version 1 and creates a translation memory unless one was named. Refused when anything changed since the preview (WORKFLOW_PREVIEW_STALE, with the fresh preview), and when a Workflow already holds the repository (WORKFLOW_REPOSITORY_CLAIMED), so a retry never creates a second one. Starts no run: start_workflow_run does, once the user agrees to spend credits. When referring to a project or language in your reply to the user, use its name and locale (e.g. "French (fr-FR)") — ids (UUIDs) are for tool calls only, never show them to the user.
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": {
"installationId": "<installationId>",
"repository": "<repository>",
"previewHash": "<previewHash>"
},
"name": "set_up_workflow"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Default: the repository’s `owner/repo`. | |
| import | No | What the first run does with translations already in the target files: `ignore` (default) translates every string afresh and writes over them; `reviewed` or `translated` imports them at that status. | |
| branches | No | Watched branches, in order; detection reads the first. Default: the repository’s default branch. | |
| patterns | No | Patterns in place of detection’s. With them, no `patterns` need is answered: a setup may sit on a branch with no locale files yet. | |
| repository | Yes | `owner/repo`, any case. Its numeric id is resolved through the installation. | |
| previewHash | Yes | The previewHash preview_workflow_setup answered | |
| installationId | Yes | GitHub’s numeric App installation id (`installationId` of `GET /api/github/installations`); it must be this organisation’s | |
| sourceLanguage | No | In place of the detected source; respelled to the language catalog’s spelling. | |
| targetLanguages | No | Declared targets in place of the detected ones, taken as given. | |
| translationMemoryId | No | An existing translation memory of the organisation (404 `TRANSLATION_MEMORY_NOT_FOUND` otherwise). Absent, confirm creates one named after the Workflow. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| name | Yes | ||
| active | Yes | Whether its Input’s connection is healthy: a GitHub Input’s credentials, or a Contentful Input’s space linked to this organisation. An inactive Workflow starts no runs. | |
| archived | Yes | ||
| createdAt | Yes | ||
| takeovers | Yes | ||
| updatedAt | Yes | ||
| archivedAt | Yes | ||
| description | Yes | ||
| currentVersion | Yes | ||
| createdTranslationMemory | Yes | The translation memory setup created; `null` when the body named one |