Documentation version: 2026-10-29.2
Canonical: https://docs.creator.gg/tools/workflows_update.md

# workflows_update

Replace an entire draft workflow. Every omitted step is deleted. Read workflows_get after setting draft and echo definition.version exactly. Preserve all unrelated steps/settings. A stale version or published workflow is rejected. Does not publish. Reuse the same requestId when retrying an uncertain operation.

## Execution

Call this MCP tool at https://mcp.creator.gg/mcp. The connection selects the workspace. A tool name is not a REST route.

Effect: changes workspace data. requestId is required by the service (8–128 characters); reuse it only for the same action and arguments.
This action has destructive or external-delivery effects. Resolve the user's requested scope before execution.


## Example arguments

Examples illustrate the schema. Replace placeholder IDs with workspace IDs and recalculate dates. For mutations, use a new requestId for each new action and retain it for identical retries.

```json
{
  "workflowId": "workflow_example",
  "definition": {
    "version": 3.2,
    "name": "Welcome draft",
    "source": {
      "system": "api"
    },
    "triggers": [],
    "actions": [],
    "edges": []
  },
  "requestId": "example-workflows_update-001"
}
```

## Input schema

Generated from the executable tool contract. The behavior notes and related guide cover rules that JSON Schema cannot express.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workflowId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 300,
      "pattern": "^[A-Za-z0-9_-]+$"
    },
    "definition": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500
        },
        "source": {
          "type": "object",
          "properties": {
            "system": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          "required": [
            "system"
          ],
          "additionalProperties": {}
        },
        "triggers": {
          "maxItems": 1000,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              }
            },
            "required": [
              "type"
            ],
            "additionalProperties": {}
          }
        },
        "actions": {
          "maxItems": 5000,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300,
                "pattern": "^[A-Za-z0-9_-]+$"
              },
              "type": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              }
            },
            "required": [
              "id",
              "type"
            ],
            "additionalProperties": {}
          }
        },
        "edges": {
          "maxItems": 10000,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300,
                "pattern": "^[A-Za-z0-9_-]+$"
              },
              "to": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300,
                "pattern": "^[A-Za-z0-9_-]+$"
              }
            },
            "required": [
              "from",
              "to"
            ],
            "additionalProperties": {}
          }
        },
        "triggerRelation": {
          "type": "string",
          "enum": [
            "and",
            "or"
          ]
        },
        "settings": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "folderName": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500
        },
        "folderPath": {
          "minItems": 1,
          "maxItems": 10,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "createFolderIfMissing": {
          "type": "boolean"
        },
        "version": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "Opaque counter returned by workflows_get. Echo exactly, including fractional values."
        }
      },
      "required": [
        "name",
        "source",
        "triggers",
        "actions",
        "edges",
        "version"
      ],
      "additionalProperties": false
    },
    "requestId": {
      "description": "Required by the Creator Platform service for mutations: a stable 8–128 character identifier. Reuse on retries; change for a new action.",
      "type": "string",
      "pattern": "^[A-Za-z0-9_.:-]{8,128}$"
    }
  },
  "required": [
    "workflowId",
    "definition"
  ],
  "additionalProperties": false
}
```

## Result interpretation

Inspect status, message and operation-specific data; list and record shapes vary. A completed read or accepted request does not prove delivery or publication. Reconcile unknown outcomes. HUMAN_ACTION_REQUIRED returns instructions without performing the action.

## Related guides

- [workflows](https://docs.creator.gg/guides/workflows.md)
- [Recovery](https://docs.creator.gg/guides/recovery.md)
