MCP Tools
Plans & Playbooks

update_playbook_step_workflow

Swap the workflow and input mappings on an open playbook workflow step (e.g. after an original workflow was archived).

Parameters

NameTypeRequiredDefaultDescription
team_idintegerYes—Team id to act in (from initialize instructions or get_current_user_info). Required on external MCP; optional in bound sessions.
plan_uuidstring (uuid)Yes—Workflow step plan_uuid from get_playbook_cycle.
workflowobjectYes—Replacement workflow configuration: { workflow_id, inputs? }.

Input Schema

{
  "type": "object",
  "required": [
    "team_id",
    "plan_uuid",
    "workflow"
  ],
  "properties": {
    "team_id": {
      "type": "integer",
      "minimum": 1,
      "description": "Team id to act in (from initialize instructions or get_current_user_info). Required on external MCP; optional in bound sessions."
    },
    "workflow": {
      "type": "object",
      "required": [
        "workflow_id"
      ],
      "properties": {
        "inputs": {
          "type": "object",
          "description": "Input mappings keyed by workflow input name ({ from: \"step\", plan_uuid } | { from: \"field\", name, value? } | { from: \"text\", value }; team setups accept step inputs only).",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "from": {
                "enum": [
                  "step",
                  "field",
                  "text"
                ],
                "type": "string",
                "description": "Source kind: step (earlier cycle step), field (playbook variable), or text (literal)."
              },
              "name": {
                "type": "string",
                "description": "When from is \"field\": playbook variable name."
              },
              "value": {
                "type": "string",
                "description": "When from is \"text\" (or optional resolved field value): text string."
              },
              "plan_uuid": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "When from is \"step\": UUID of an earlier step in this running playbook (or null)."
              }
            }
          }
        },
        "workflow_id": {
          "type": "string",
          "format": "uuid",
          "description": "Workflow UUID from list_playbook_workflow_options."
        }
      },
      "description": "Replacement workflow configuration: { workflow_id, inputs? }."
    },
    "plan_uuid": {
      "type": "string",
      "format": "uuid",
      "description": "Workflow step plan_uuid from get_playbook_cycle."
    }
  }
}

Output Schema

{
  "type": "object",
  "required": [
    "plan_uuid",
    "status",
    "link_url"
  ],
  "properties": {
    "run": {
      "type": [
        "object",
        "null"
      ]
    },
    "mode": {
      "type": [
        "string",
        "null"
      ]
    },
    "team": {
      "type": "object",
      "required": [
        "id",
        "name"
      ],
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        }
      },
      "description": "Team this action applied to."
    },
    "inputs": {
      "type": "array"
    },
    "status": {
      "type": "string"
    },
    "can_run": {
      "type": "boolean"
    },
    "link_url": {
      "type": "string"
    },
    "workflow": {
      "type": [
        "object",
        "null"
      ]
    },
    "plan_uuid": {
      "type": "string",
      "format": "uuid"
    },
    "read_only": {
      "type": "boolean"
    },
    "runs_as_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "blocked_reason": {
      "type": [
        "string",
        "null"
      ]
    },
    "runs_as_user_id": {
      "type": [
        "integer",
        "null"
      ]
    },
    "can_choose_another": {
      "type": "boolean"
    },
    "unavailable_reason": {
      "type": [
        "string",
        "null"
      ]
    }
  }
}

Instructions

Replaces the workflow and input mappings on an open playbook workflow step (plan_uuid, owner-only) — e.g. to choose another workflow after the original was archived, made inactive, or lost. Pick a replacement from list_playbook_workflow_options; step-type inputs pass { from: "step", plan_uuid } naming an earlier step in the same cycle. Clears waiting-workflow holds and re-syncs schedules/builds_on. Refuses finished or running steps (409). Present link_url as returned.

Output: the same state as get_playbook_step_workflow plus team. A swap clears any waiting-workflow hold and re-syncs the step's schedule and builds_on.

When to use

Use when an open kind: "workflow" playbook step needs a different workflow or updated input mappings (plan_uuid).