update_playbook
Edit a content playbook. Pass only the fields to change; if items is provided it fully replaces the playbook's items and order.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
team_id | integer | Yes | — | Team id to act in (from initialize instructions or get_current_user_info). Required on external MCP; optional in bound sessions. |
playbook_id | integer | Yes | — | Numeric id of the playbook to edit — the `id` from list_playbooks or get_playbook, not a UUID. It only selects which playbook to change and is never itself modified. Unknown ids, playbooks in another team, and teammates' private playbooks all return NotFound. |
name | string | No | — | Omit to keep the current name (it cannot be cleared — playbooks always have a name). |
description | string | null | No | — | Omit to KEEP the current description; pass null to CLEAR it. |
visibility | string | No | — | Change the playbook's visibility. Creator-only — non-creators get InputError. |
anchor_date | string | null | No | — | Optional YYYY-MM-DD anchor date the playbook is built around. Omit to KEEP the current value; pass null to CLEAR it. Each item's offset_days counts from it, and it's the default anchor when instantiating. |
items | array of object | No | — | Ordered items in the playbook (sets the item list and order; omit `items` to keep existing items). Call get_playbook first and send every kept item back WITH its `id`: an id-matched item keeps every field you omit (name/title, description, prompt, blueprint_id, category_id, offset_days, builds_on remapped to the new positions and step settings), and null (or [] for builds_on) clears a field. A list with no ids that would reset existing checklist, action, or workflow steps or step settings is refused; to rewrite them on purpose, send kind on every item. |
anchor_label | string | null | No | — | What anchor_date is called, e.g. "Launch day". Up to 60 characters; null clears it. |
default_project_id | string (uuid) | null | No | — | Project a run starts in by default. Setting a project clears new_project_each_use unless new_project_each_use: true is also passed; null clears. |
new_project_each_use | boolean | No | — | true = automatically create a fresh project each time this playbook is run (clears default_project_id). |
project_name_pattern | string | null | No | — | Optional name pattern for projects auto-created per cycle when new_project_each_use is true (max 500 chars; {Variable} tokens are filled at instantiate time). null or blank clears it. |
variables | array of object | No | — | Placeholders like {Product} for names, prompts and action params, filled when run. Up to 30; a name is 1-40 letters, numbers, spaces, dashes or underscores. On update this REPLACES the whole list. |
include_workflow_steps | boolean | No | — | Set true to include kind "workflow" steps and their workflow config in the response (default false filters them and remaps builds_on; automatically enabled when sending kind: "workflow" items). Here, true also means a workflow step left out of `items` is removed. |
Input Schema
{
"type": "object",
"required": [
"team_id",
"playbook_id"
],
"properties": {
"name": {
"type": "string",
"description": "Omit to keep the current name (it cannot be cleared — playbooks always have a name)."
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The item's id from get_playbook. Send it for every kept item: an id-matched item keeps every field you omit (name/title, description, prompt, blueprint_id, category_id, offset_days, builds_on remapped to the new positions, and step settings). An item without an id is a new step (name required). Ids are re-issued each time items are saved, so use the ones from the latest read."
},
"kind": {
"enum": [
"content",
"action",
"checklist",
"workflow"
],
"type": "string",
"description": "content (default), checklist, action, or workflow; omit to keep the step's kind. Content writes a document, checklist is a to-do, action runs a connected-app action (`action`), and workflow runs a Marcora workflow (`workflow`)."
},
"name": {
"type": "string",
"description": "Item name (title of the plan this item becomes). Alias: `title`. Required for new (id-less) items; omit on an id-matched item to keep its current name."
},
"title": {
"type": "string",
"description": "Alias for `name`. Omit on an id-matched item to keep its current name."
},
"action": {
"type": [
"object",
"null"
],
"required": [
"instruction"
],
"properties": {
"instruction": {
"type": "string",
"description": "What to do, in plain language; {Variable} allowed."
}
},
"description": "Required for kind \"action\": { instruction }."
},
"prompt": {
"type": [
"string",
"null"
],
"description": "Generation prompt carried onto the plan created from this item. Omit on an id-matched item to keep its current prompt; pass null to clear it."
},
"due_time": {
"type": [
"string",
"null"
],
"description": "Optional time of day due, \"HH:MM\", no time zone. Needs offset_days; null clears it."
},
"optional": {
"type": "boolean",
"description": "true = can be left out when the playbook is run. Pass the step's id in instantiate_playbook skip_item_ids to leave it out."
},
"reviewer": {
"type": [
"string",
"null"
],
"deprecated": true,
"description": "Deprecated and ignored (not written or returned by MCP; existing values are kept)."
},
"workflow": {
"type": [
"object",
"null"
],
"required": [
"workflow_id"
],
"properties": {
"inputs": {
"type": "object",
"description": "Optional mappings keyed by declared workflow input name.",
"additionalProperties": {
"type": "object",
"properties": {
"from": {
"enum": [
"step",
"field",
"text"
],
"type": "string",
"description": "Source kind: step (earlier item doc), field (playbook variable), or text (literal)."
},
"name": {
"type": "string",
"description": "When from is \"field\": playbook variable name."
},
"rank": {
"type": "integer",
"description": "When from is \"step\": 0-based index of an earlier template item."
},
"value": {
"type": "string",
"description": "When from is \"text\": literal text value."
}
}
}
},
"workflow_id": {
"type": "string",
"format": "uuid",
"description": "Workflow UUID from list_playbook_workflow_options."
}
},
"description": "Required for kind \"workflow\": { workflow_id, inputs? }. Pick workflows with list_playbook_workflow_options. Custom workflows accept step/field/text inputs; team setups accept step inputs only."
},
"builds_on": {
"type": [
"array",
"null"
],
"items": {
"type": "integer"
},
"description": "Step links: 0-based positions, in THIS request's items array, of EARLIER items this step builds on (e.g. [0] = builds on the first item). A link to itself or a later item is rejected. When the playbook is run, each step's generation draws on the steps it builds on. On an id-matched item, omit builds_on to keep existing links remapped to the kept items' new positions (links to removed steps are dropped; moving a step ahead of one it builds on is rejected unless builds_on is also sent); pass [] or null to clear them."
},
"owner_name": {
"type": [
"string",
"null"
],
"description": "Typed owner (an agent, or a non-member; max 60 chars) for content and checklist steps, never action or workflow steps. Spelling matches the team's existing one (list_playbook_owner_names). owner_user_id or null clears it."
},
"sort_order": {
"type": "integer",
"description": "Explicit order; defaults to array position."
},
"category_id": {
"type": [
"integer",
"null"
],
"description": "Content category for the plan. Omit on an id-matched item to keep its current category; pass null to clear it."
},
"description": {
"type": [
"string",
"null"
],
"description": "Optional item description. Omit on an id-matched item to keep its current description; pass null to clear it."
},
"offset_days": {
"type": [
"integer",
"null"
],
"description": "Days relative to anchor_date at instantiation; sets the plan due_date. Negative = before the anchor. On an id-matched item, omit to keep the current offset_days; pass null to clear it (\"No date\"). On a new item, null or omitted = no due date."
},
"blueprint_id": {
"type": [
"integer",
"null"
],
"description": "Blueprint to attach to the plan. Omit on an id-matched item to keep its current blueprint; pass null to clear it."
},
"goes_out_time": {
"type": [
"string",
"null"
],
"description": "Content steps: optional time it goes out, \"HH:MM\". Needs goes_out_offset_days; null clears it."
},
"owner_user_id": {
"type": [
"integer",
"null"
],
"description": "Team member the step is assigned to when run. Must be an active member; null clears it, and the step then goes to whoever runs the playbook. On workflow steps running a custom workflow, owner stays pinned to creator; team-setup workflows allow teammates who can run them."
},
"off_by_default": {
"type": "boolean",
"description": "true = starts unticked when the playbook template is used; left out unless included (instantiate_playbook include_item_ids). Implies optional."
},
"document_update": {
"type": [
"object",
"null"
],
"properties": {
"mode": {
"enum": [
"create",
"update"
],
"type": "string"
},
"review_mode": {
"enum": [
"approval",
"direct"
],
"type": "string"
},
"instructions": {
"type": [
"string",
"null"
],
"maxLength": 25000
},
"target_content_id": {
"type": [
"string",
"null"
],
"format": "uuid"
},
"target_document_id": {
"type": [
"string",
"null"
],
"format": "uuid"
}
},
"description": "Content steps only (refused on checklist/action steps): update an existing target document instead of creating a new document (`{ mode: \"update\", target_content_id, review_mode?: \"approval\" | \"direct\", instructions? }`, or `{ mode: \"create\" }` / `null` to clear to new-document mode)."
},
"draft_lead_days": {
"type": "integer",
"maximum": 365,
"minimum": 0,
"description": "Content steps only: whole calendar days (0-365) before due_date when auto-generate starts (defaults to 3 when auto-generate is newly turned on for a content step and 0 for existing schedules; rejects non-integers and null; omit on id-matched items to keep). Changing draft_lead_days (or schedule_time_zone, title, description, prompt, blueprint_id, project_id, reference_document_ids (even [])/builds_on_plan_ids, context_collection_ids, targeting_dimension_ids, generation_settings) via update_plan turns an enabled auto-generate schedule off, and MCP cannot turn auto-generate on (stored lead only; when the owner turns it back on in-app, an unset lead resets to 3 so they must pick the intended lead there)."
},
"use_cycle_source": {
"type": [
"boolean",
"null"
],
"description": "Content steps only: true sees a live snapshot of the cycle (topic/details, variables, anchor, and team-visible steps' title, owner, dates and status; private steps omitted with a footer count, not other steps' text); omit on id-matched items to keep, or false/null to clear."
},
"goes_out_offset_days": {
"type": [
"integer",
"null"
],
"description": "Content steps: days after anchor_date it goes out. This is a second date besides offset_days (the due date): whole days from -3650 to 3650, and null clears it."
},
"context_collection_ids": {
"type": [
"array",
"null"
],
"items": {
"type": "integer"
},
"description": "Content steps only: default context collection IDs (omit keeps, []/null clears readable). Uses list_context_collections; hidden context collections the caller cannot see are preserved on save, checklist, action, and workflow steps refuse non-empty values (accept [] or null), and unavailable context collections are refused identically whether or not already stored."
},
"targeting_dimension_ids": {
"type": [
"array",
"null"
],
"items": {
"type": "integer"
},
"description": "Content steps only: default targeting option IDs (omit keeps, []/null clears). Uses list_targeting_dimensions; checklist, action, and workflow steps refuse non-empty values (accept [] or null), and unavailable IDs are refused."
}
}
},
"description": "Ordered items in the playbook (sets the item list and order; omit `items` to keep existing items). Call get_playbook first and send every kept item back WITH its `id`: an id-matched item keeps every field you omit (name/title, description, prompt, blueprint_id, category_id, offset_days, builds_on remapped to the new positions and step settings), and null (or [] for builds_on) clears a field. A list with no ids that would reset existing checklist, action, or workflow steps or step settings is refused; to rewrite them on purpose, send kind on every item."
},
"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."
},
"variables": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"required": {
"type": "boolean"
}
}
},
"description": "Placeholders like {Product} for names, prompts and action params, filled when run. Up to 30; a name is 1-40 letters, numbers, spaces, dashes or underscores. On update this REPLACES the whole list."
},
"visibility": {
"enum": [
"private",
"team"
],
"type": "string",
"description": "Change the playbook's visibility. Creator-only — non-creators get InputError."
},
"anchor_date": {
"type": [
"string",
"null"
],
"description": "Optional YYYY-MM-DD anchor date the playbook is built around. Omit to KEEP the current value; pass null to CLEAR it. Each item's offset_days counts from it, and it's the default anchor when instantiating."
},
"description": {
"type": [
"string",
"null"
],
"description": "Omit to KEEP the current description; pass null to CLEAR it."
},
"playbook_id": {
"type": "integer",
"description": "Numeric id of the playbook to edit — the `id` from list_playbooks or get_playbook, not a UUID. It only selects which playbook to change and is never itself modified. Unknown ids, playbooks in another team, and teammates' private playbooks all return NotFound."
},
"anchor_label": {
"type": [
"string",
"null"
],
"description": "What anchor_date is called, e.g. \"Launch day\". Up to 60 characters; null clears it."
},
"default_project_id": {
"type": [
"string",
"null"
],
"format": "uuid",
"description": "Project a run starts in by default. Setting a project clears new_project_each_use unless new_project_each_use: true is also passed; null clears."
},
"new_project_each_use": {
"type": "boolean",
"description": "true = automatically create a fresh project each time this playbook is run (clears default_project_id)."
},
"project_name_pattern": {
"type": [
"string",
"null"
],
"maxLength": 500,
"description": "Optional name pattern for projects auto-created per cycle when new_project_each_use is true (max 500 chars; {Variable} tokens are filled at instantiate time). null or blank clears it."
},
"include_workflow_steps": {
"type": "boolean",
"description": "Set true to include kind \"workflow\" steps and their workflow config in the response (default false filters them and remaps builds_on; automatically enabled when sending kind: \"workflow\" items). Here, true also means a workflow step left out of `items` is removed."
}
}
}Output Schema
{
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"team": {
"type": "object",
"required": [
"id",
"name"
],
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
},
"description": "Team this action applied to."
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"kind": {
"enum": [
"content",
"action",
"checklist",
"workflow"
],
"type": "string"
},
"name": {
"type": "string"
},
"title": {
"type": "string",
"description": "Mirror of name."
},
"action": {
"type": [
"object",
"null"
],
"properties": {
"instruction": {
"type": "string",
"description": "What to do, in plain language; {Variable} allowed."
}
},
"description": "{ instruction } for an action step, else null."
},
"prompt": {
"type": [
"string",
"null"
]
},
"team_id": {
"type": "integer"
},
"due_time": {
"type": [
"string",
"null"
]
},
"optional": {
"type": "boolean"
},
"workflow": {
"type": [
"object",
"null"
],
"description": "{ workflow_id, inputs } for a workflow step when include_workflow_steps is enabled, else null."
},
"builds_on": {
"type": "array",
"items": {
"type": "integer"
},
"description": "0-based positions of earlier items this step builds on."
},
"created_at": {
"type": "integer",
"description": "Unix ms timestamp."
},
"owner_name": {
"type": [
"string",
"null"
]
},
"sort_order": {
"type": "integer"
},
"updated_at": {
"type": "integer",
"description": "Unix ms timestamp."
},
"category_id": {
"type": [
"integer",
"null"
]
},
"description": {
"type": [
"string",
"null"
]
},
"offset_days": {
"type": [
"integer",
"null"
]
},
"playbook_id": {
"type": "integer"
},
"blueprint_id": {
"type": [
"integer",
"null"
]
},
"goes_out_time": {
"type": [
"string",
"null"
]
},
"owner_user_id": {
"type": [
"integer",
"null"
]
},
"off_by_default": {
"type": "boolean"
},
"document_update": {
"type": "object",
"properties": {
"mode": {
"enum": [
"update"
],
"type": "string"
},
"review_mode": {
"enum": [
"approval",
"direct"
],
"type": "string"
},
"instructions": {
"type": [
"string",
"null"
]
},
"target_title": {
"type": [
"string",
"null"
]
},
"target_can_open": {
"type": "boolean"
},
"target_link_url": {
"type": [
"string",
"null"
]
},
"target_content_id": {
"type": [
"string",
"null"
],
"format": "uuid"
}
},
"description": "Present on content steps configured to update an existing document."
},
"draft_lead_days": {
"type": "integer",
"description": "Content steps: whole calendar days (0-365) before due_date when auto-generate starts (defaults to 3 when newly enabled; 0 for existing schedules). Changing draft_lead_days (or schedule_time_zone, title, description, prompt, blueprint_id, project_id, reference_document_ids (even [])/builds_on_plan_ids, context_collection_ids, targeting_dimension_ids, generation_settings) via update_plan turns an enabled auto-generate schedule off, and MCP cannot turn auto-generate on (stored lead only; when the owner turns it back on in-app, an unset lead resets to 3 so they must pick the intended lead there)."
},
"use_cycle_source": {
"type": "boolean",
"description": "Present (true) on content steps whose generation also sees a live snapshot of the cycle's team-visible steps (private steps are omitted with a footer count)."
},
"goes_out_offset_days": {
"type": [
"integer",
"null"
]
},
"context_collection_ids": {
"type": "array",
"items": {
"type": "integer"
},
"description": "Default context collection IDs readable by the caller for this content step ([] for non-content steps, when none are set, or when hidden from the caller)."
},
"targeting_dimension_ids": {
"type": "array",
"items": {
"type": "integer"
},
"description": "Default targeting dimension option IDs for this content step ([] for non-content steps or when none are set)."
}
}
}
},
"team_id": {
"type": "integer"
},
"link_url": {
"type": "string",
"description": "URL to open this playbook in the Marcora web app — share it so the user can view what you created."
},
"variables": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"required": {
"type": "boolean"
}
}
},
"description": "Placeholders to fill when the playbook is run."
},
"created_at": {
"type": "integer",
"description": "Unix ms timestamp."
},
"created_by": {
"type": "integer"
},
"updated_at": {
"type": "integer",
"description": "Unix ms timestamp."
},
"visibility": {
"enum": [
"private",
"team"
],
"type": "string",
"description": "private = creator-only; team = visible to all active teammates."
},
"anchor_date": {
"type": [
"string",
"null"
],
"description": "Persisted YYYY-MM-DD anchor date, or null. Each item's offset_days counts from it; it's the default when instantiating."
},
"description": {
"type": [
"string",
"null"
]
},
"anchor_label": {
"type": [
"string",
"null"
],
"description": "What anchor_date is called, or null."
},
"default_project_id": {
"type": [
"string",
"null"
],
"description": "Default project id for runs, or null."
},
"new_project_each_use": {
"type": "boolean",
"description": "Whether each run creates a new project automatically."
},
"project_name_pattern": {
"type": [
"string",
"null"
],
"description": "Name pattern with {Variable} tokens for per-cycle projects, or null."
}
}
}Instructions
Edit a content playbook. Any playbook is fully editable. Pass only the fields to change: name, description, variables, anchor_date, anchor_label, default_project_id, new_project_each_use, and project_name_pattern patch in place. If items is provided it sets the playbook's items and their order; omit items to leave them untouched. Changing visibility is creator-only.
Workflow steps are never deleted by accident. get_playbook leaves workflow steps out by default, so a client editing from that view would drop them. When items is sent without include_workflow_steps: true and without any workflow step, and the playbook has a workflow step whose id is missing from items, the call is refused with a 409 ("Nothing was changed. This playbook has workflow steps that are not included in this edit…") and nothing is written. Read with get_playbook include_workflow_steps: true and send the workflow steps back in items with their ids, or pass include_workflow_steps: true to remove one on purpose. Custom-workflow steps keep their owner pinned to the person who made the workflow.
Output: the updated playbook object (same shape as get_playbook, including anchor_date, anchor_label, default_project_id, new_project_each_use, project_name_pattern, variables, ordered items with step fields, and link_url).
Links: present link_url to the user exactly as returned — copy it character for character. Never retype, shorten, or rebuild a link or the IDs inside it.