instantiate_playbook
Run a playbook: create one content plan per playbook item, in order, as a batch.
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 saved playbook to run — the `id` from list_playbooks or get_playbook, not a UUID. If you only have the playbook's name or `playbook_uuid` (e.g. from list_playbook_suggestions), call list_playbooks first to resolve the id. The playbook must contain at least one item; running an empty playbook fails. |
suggestion_id | string (uuid) | No | — | Optional UUID of a playbook suggestion (call or workflow) from list_playbook_suggestions. Must match this playbook_id's template; replays return the started cycle. Call suggestions start only steps not already covered by existing plans (locked variables cannot change); workflow suggestions start all selected steps without changing workflow-prefilled variables. |
anchor_date | string | null | No | — | The reference date every item's `offset_days` counts from: each plan's due_date = anchor_date + offset_days. Three distinct cases, so choose deliberately — OMIT the field to inherit the playbook's own saved anchor_date (due dates are only unset if the playbook has no saved anchor either); pass an explicit null (or empty string) to force NO anchor, which leaves every due date unset even when the playbook has a saved one; or pass a YYYY-MM-DD date to override with that date. Any other format is rejected. When the user names a date ("anchored to next Monday") send it explicitly; when they just say "run my playbook" omit the field so their saved anchor is honored. |
project_id | string (uuid) | No | — | Scope every created plan to an existing project (optional; mutually exclusive with new_project). Overrides default_project_id and new_project_each_use for this run. |
new_project | object | No | — | Create a new project for this cycle and scope every created plan to it (mutually exclusive with project_id). Templates with new_project_each_use: true already create one automatically when omitted; pass this to override the project name or description. Visibility matches the playbook. |
assigned_to | integer | No | — | User id to assign the created plans to. Defaults to the caller. |
category_id | integer | No | — | Override the content category for every created plan (optional). |
topic | string | No | — | What this cycle is about (optional) — e.g. the product, launch or campaign it is for. Stored on the cycle and shown as its topic; it is the same text as the "What's this cycle about?" box in the Marcora web app, and is used when the cycle's content is generated. |
variables | object | No | — | Values for the playbook's variables by name, e.g. { "Product": "Acme" }. Each is up to 500 characters and every required variable must be given. |
skip_item_ids | array of integer | No | — | Ids of OPTIONAL steps (get_playbook) to leave out. One step must remain; a step that is not optional is refused. |
include_item_ids | array of integer | No | — | Ids of the playbook template's OFF-BY-DEFAULT steps (get_playbook shows off_by_default) to include in this running playbook. An off-by-default step you do not name here is left out, and any builds_on link to a left-out step is dropped. Naming an id that is not in the playbook is refused. |
targeting_dimension_ids | array of integer | No | — | Optional run-wide targeting dimension option IDs (list_targeting_dimensions) for content steps (beats template step default; pass [] to clear template defaults for this run; overridden per step by step_overrides; nothing is saved on the cycle or template; checklist/action steps ignore them). Unavailable IDs are refused. |
context_collection_ids | array of integer | No | — | Optional run-wide context collection IDs (list_context_collections) for content steps (beats template step default; pass [] to clear template defaults for this run; overridden per step by step_overrides; nothing is saved on the cycle or template; checklist/action steps ignore them). Must be readable by you; unavailable IDs are refused. |
step_overrides | array of object | No | — | Optional per-step overrides for this run only (nothing is saved on the template). Precedence: a step override beats the run-wide value, which beats the template step default. Any step kind may override `owner` (turning that step's auto-generate off when it changes the owner or sets a typed `name`; passing the same member owner keeps it on; custom-workflow steps pin `owner` to creator and team-setup steps allow `owner: { user_id }` only if that teammate can run it); only content steps may override `prompt`, `blueprint_id`, `targeting_dimension_ids`, `context_collection_ids`, `target_content_id`, `target_document_id`, `review_mode`, or `document_update` (checklist, action, and workflow steps refuse those fields). One entry per step; unknown or duplicate item_id is refused. |
Input Schema
{
"type": "object",
"required": [
"team_id",
"playbook_id"
],
"properties": {
"topic": {
"type": "string",
"maxLength": 4000,
"description": "What this cycle is about (optional) — e.g. the product, launch or campaign it is for. Stored on the cycle and shown as its topic; it is the same text as the \"What's this cycle about?\" box in the Marcora web app, and is used when the cycle's content is generated."
},
"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": "object",
"description": "Values for the playbook's variables by name, e.g. { \"Product\": \"Acme\" }. Each is up to 500 characters and every required variable must be given.",
"additionalProperties": {
"type": "string"
}
},
"project_id": {
"type": "string",
"format": "uuid",
"description": "Scope every created plan to an existing project (optional; mutually exclusive with new_project). Overrides default_project_id and new_project_each_use for this run."
},
"anchor_date": {
"type": [
"string",
"null"
],
"description": "The reference date every item's `offset_days` counts from: each plan's due_date = anchor_date + offset_days. Three distinct cases, so choose deliberately — OMIT the field to inherit the playbook's own saved anchor_date (due dates are only unset if the playbook has no saved anchor either); pass an explicit null (or empty string) to force NO anchor, which leaves every due date unset even when the playbook has a saved one; or pass a YYYY-MM-DD date to override with that date. Any other format is rejected. When the user names a date (\"anchored to next Monday\") send it explicitly; when they just say \"run my playbook\" omit the field so their saved anchor is honored."
},
"assigned_to": {
"type": "integer",
"description": "User id to assign the created plans to. Defaults to the caller."
},
"category_id": {
"type": "integer",
"description": "Override the content category for every created plan (optional)."
},
"new_project": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Project name ({Variable} allowed). Omit to use project_name_pattern or the cycle name."
},
"description": {
"type": "string",
"description": "Project description. Omit to fall back to the cycle topic."
}
},
"description": "Create a new project for this cycle and scope every created plan to it (mutually exclusive with project_id). Templates with new_project_each_use: true already create one automatically when omitted; pass this to override the project name or description. Visibility matches the playbook."
},
"playbook_id": {
"type": "integer",
"description": "Numeric id of the saved playbook to run — the `id` from list_playbooks or get_playbook, not a UUID. If you only have the playbook's name or `playbook_uuid` (e.g. from list_playbook_suggestions), call list_playbooks first to resolve the id. The playbook must contain at least one item; running an empty playbook fails."
},
"skip_item_ids": {
"type": "array",
"items": {
"type": "integer"
},
"description": "Ids of OPTIONAL steps (get_playbook) to leave out. One step must remain; a step that is not optional is refused."
},
"suggestion_id": {
"type": "string",
"format": "uuid",
"description": "Optional UUID of a playbook suggestion (call or workflow) from list_playbook_suggestions. Must match this playbook_id's template; replays return the started cycle. Call suggestions start only steps not already covered by existing plans (locked variables cannot change); workflow suggestions start all selected steps without changing workflow-prefilled variables."
},
"step_overrides": {
"type": "array",
"items": {
"type": "object",
"required": [
"item_id"
],
"properties": {
"owner": {
"type": "object",
"required": [
"user_id"
],
"properties": {
"name": {
"type": [
"string",
"null"
],
"maxLength": 60,
"description": "Typed owner name (1-60 chars, matched case-insensitively to list_playbook_owner_names), only when `user_id` is null. Not allowed on action or workflow steps; custom-workflow step owners stay pinned to creator."
},
"user_id": {
"type": [
"integer",
"null"
],
"description": "Enabled member user id on that team, or null (for a typed `name` or to reset to the run starter)."
}
},
"description": "Step owner override for content, checklist, action, or workflow steps (`step_overrides` never accepts `kind` or `workflow`); workflow steps refuse `prompt`, `blueprint_id`, `targeting_dimension_ids`, `context_collection_ids`, and `owner.name`, pin custom-workflow owners to creator, and allow `owner.user_id` on team-setup workflows only if that teammate can run them. Either a team member (`user_id`, `name: null`/omitted) or a typed owner name (`user_id: null`, `name`), never both; action steps require a team member (`user_id`). Pass `{ user_id: null, name: null }` to reset to the run starter. Changing the step's owner (or setting a typed `name`) turns that step's auto-generate (`do_on_date`) off; passing the same member owner keeps it on."
},
"prompt": {
"type": "string",
"maxLength": 25000,
"description": "Content steps only: step prompt for this run (1-25k chars, non-blank; omit to use the template prompt — blank/whitespace prompts are refused). {Variable} tokens are filled with this run's `variables` values (literal braces stay intact); nothing is saved on the template."
},
"item_id": {
"type": "integer",
"description": "Step id from get_playbook (unique)."
},
"review_mode": {
"enum": [
"approval",
"direct",
null
],
"type": [
"string",
"null"
],
"description": "Content steps only: how generated updates to an existing target document are handled (`\"approval\"` holds a proposal for review, `\"direct\"` writes directly)."
},
"blueprint_id": {
"type": [
"string",
"integer",
"null"
],
"description": "Content steps only: blueprint UUID (from list_blueprints) or integer id, or null to clear the blueprint for this run. Must be an accessible team blueprint (not another user's private blueprint)."
},
"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: structured document update configuration (`{ mode: \"update\", target_content_id, review_mode?, instructions? }`, or `{ mode: \"create\" }` / `null` to clear to new-document mode)."
},
"target_content_id": {
"type": [
"string",
"null"
],
"format": "uuid",
"description": "Content steps only: existing document UUID to update instead of creating a new document (`null` clears to new-document mode)."
},
"target_document_id": {
"type": [
"string",
"null"
],
"format": "uuid",
"description": "Content steps only: alias for `target_content_id` (`null` clears to new-document mode)."
},
"context_collection_ids": {
"type": [
"array",
"null"
],
"items": {
"type": "integer"
},
"description": "Step context collection IDs ([]/null clears for this step). Beats run-wide context_collection_ids and template step defaults; must be readable by you."
},
"targeting_dimension_ids": {
"type": [
"array",
"null"
],
"items": {
"type": "integer"
},
"description": "Step targeting IDs ([]/null clears for this step). Beats run-wide targeting_dimension_ids and template step defaults; unavailable IDs are refused."
}
}
},
"description": "Optional per-step overrides for this run only (nothing is saved on the template). Precedence: a step override beats the run-wide value, which beats the template step default. Any step kind may override `owner` (turning that step's auto-generate off when it changes the owner or sets a typed `name`; passing the same member owner keeps it on; custom-workflow steps pin `owner` to creator and team-setup steps allow `owner: { user_id }` only if that teammate can run it); only content steps may override `prompt`, `blueprint_id`, `targeting_dimension_ids`, `context_collection_ids`, `target_content_id`, `target_document_id`, `review_mode`, or `document_update` (checklist, action, and workflow steps refuse those fields). One entry per step; unknown or duplicate item_id is refused."
},
"include_item_ids": {
"type": "array",
"items": {
"type": "integer"
},
"description": "Ids of the playbook template's OFF-BY-DEFAULT steps (get_playbook shows off_by_default) to include in this running playbook. An off-by-default step you do not name here is left out, and any builds_on link to a left-out step is dropped. Naming an id that is not in the playbook is refused."
},
"context_collection_ids": {
"type": "array",
"items": {
"type": "integer"
},
"description": "Optional run-wide context collection IDs (list_context_collections) for content steps (beats template step default; pass [] to clear template defaults for this run; overridden per step by step_overrides; nothing is saved on the cycle or template; checklist/action steps ignore them). Must be readable by you; unavailable IDs are refused."
},
"targeting_dimension_ids": {
"type": "array",
"items": {
"type": "integer"
},
"description": "Optional run-wide targeting dimension option IDs (list_targeting_dimensions) for content steps (beats template step default; pass [] to clear template defaults for this run; overridden per step by step_overrides; nothing is saved on the cycle or template; checklist/action steps ignore them). Unavailable IDs are refused."
}
}
}Output Schema
{
"type": "object",
"properties": {
"run": {
"type": "object",
"description": "The created cycle: id (the integer run_id), playbook_run_uuid, name (auto-named \"<playbook> — <Mon YYYY>\" unless you passed a name), context (the topic you passed, or null), anchor_date, project_id, project_name, and link_url (https://app.marcora.ai/runs/{playbook_run_uuid}) — share it to hand the user their new cycle."
},
"team": {
"type": "object",
"required": [
"id",
"name"
],
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
},
"description": "Team this action applied to."
},
"plans": {
"type": "array",
"items": {
"type": "object",
"description": "Created content-plan payloads, each with its own link_url (https://app.marcora.ai/plans/{plan_uuid}). Stage = Accepted, source = \"playbook\"."
}
},
"run_id": {
"type": "integer",
"description": "ID of the cycle (run) this instantiation created — the group its plans belong to."
},
"suggestion": {
"oneOf": [
{
"type": "object",
"required": [
"id",
"initiative",
"playbook",
"call",
"visibility",
"variables",
"anchor_date",
"supporting_quote",
"status",
"run",
"created_at",
"updated_at"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"run": {
"type": [
"object",
"null"
],
"required": [
"playbook_run_uuid",
"link_url"
],
"properties": {
"link_url": {
"type": "string"
},
"playbook_run_uuid": {
"type": "string",
"format": "uuid"
}
}
},
"call": {
"type": "object",
"required": [
"context_item_id",
"name"
],
"properties": {
"name": {
"type": "string"
},
"context_item_id": {
"type": "string",
"format": "uuid"
}
}
},
"type": {
"enum": [
"call"
],
"type": "string"
},
"source": {
"type": "object",
"required": [
"kind",
"label",
"link"
],
"properties": {
"kind": {
"enum": [
"call"
],
"type": "string"
},
"link": {
"type": [
"string",
"null"
]
},
"label": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"enum": [
"suggested",
"started",
"dismissed"
],
"type": "string"
},
"coverage": {
"type": "array",
"items": {
"type": "object",
"required": [
"item_id",
"plan_uuid"
],
"properties": {
"item_id": {
"type": "integer",
"description": "Playbook step id already covered by an existing plan."
},
"plan_uuid": {
"type": "string",
"format": "uuid",
"description": "UUID of the existing plan covering that step."
}
},
"additionalProperties": false
},
"description": "Which steps the call already planned; edits to those steps are refused."
},
"playbook": {
"type": "object",
"required": [
"playbook_uuid",
"name",
"link_url"
],
"properties": {
"name": {
"type": "string"
},
"link_url": {
"type": "string"
},
"playbook_uuid": {
"type": "string",
"format": "uuid"
}
}
},
"variables": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"created_at": {
"type": "integer",
"description": "Unix ms timestamp."
},
"initiative": {
"type": "object",
"required": [
"id",
"name",
"occurrence"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"occurrence": {
"type": "string"
}
}
},
"updated_at": {
"type": "integer",
"description": "Unix ms timestamp."
},
"visibility": {
"enum": [
"private",
"team"
],
"type": "string"
},
"anchor_date": {
"type": [
"string",
"null"
]
},
"supporting_quote": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"id",
"type",
"source",
"workflow",
"competitor",
"change_kind",
"evidence",
"playbook",
"visibility",
"variables",
"anchor_date",
"status",
"run",
"created_at",
"updated_at"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"run": {
"type": [
"object",
"null"
],
"required": [
"playbook_run_uuid",
"link_url"
],
"properties": {
"link_url": {
"type": "string"
},
"playbook_run_uuid": {
"type": "string",
"format": "uuid"
}
}
},
"type": {
"enum": [
"workflow"
],
"type": "string"
},
"source": {
"type": "object",
"required": [
"kind",
"label",
"link"
],
"properties": {
"kind": {
"enum": [
"workflow"
],
"type": "string"
},
"link": {
"type": [
"string",
"null"
]
},
"label": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"enum": [
"suggested",
"started",
"dismissed"
],
"type": "string"
},
"evidence": {
"type": "object",
"required": [
"line",
"url",
"page"
],
"properties": {
"url": {
"type": [
"string",
"null"
]
},
"line": {
"type": "string"
},
"page": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
},
"playbook": {
"type": "object",
"required": [
"playbook_uuid",
"name",
"link_url"
],
"properties": {
"name": {
"type": "string"
},
"link_url": {
"type": "string"
},
"playbook_uuid": {
"type": "string",
"format": "uuid"
}
}
},
"workflow": {
"type": "object",
"required": [
"id",
"name",
"run_id"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"run_id": {
"type": "string",
"format": "uuid"
}
},
"additionalProperties": false
},
"variables": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"competitor": {
"type": "string"
},
"created_at": {
"type": "integer",
"description": "Unix ms timestamp."
},
"updated_at": {
"type": "integer",
"description": "Unix ms timestamp."
},
"visibility": {
"enum": [
"private",
"team"
],
"type": "string"
},
"anchor_date": {
"type": [
"string",
"null"
]
},
"change_kind": {
"enum": [
"price",
"plan",
"launch"
],
"type": "string"
}
},
"additionalProperties": false
}
],
"description": "Present when started from a playbook suggestion (call or workflow): the updated suggestion record."
},
"playbook_id": {
"type": "integer"
},
"created_count": {
"type": "integer",
"description": "Number of plans created (one per uncovered playbook item)."
},
"covered_plan_uuids": {
"type": "array",
"items": {
"type": "string",
"format": "uuid"
},
"description": "Present when started from a playbook suggestion: plan UUIDs already covering steps in a call suggestion's initiative (empty for workflow suggestions)."
}
}
}Instructions
Run a playbook: create one content plan per playbook item, in order, as a batch. Plans land in the Accepted stage with source playbook and inherit the playbook's visibility. Optionally anchor due dates to a date (each item's offset_days is applied to anchor_date) and/or scope the batch to an existing project (project_id) or a new project (new_project). This is a distinct bulk action — it does not create or edit the playbook itself.
Output: an object describing the run:
| Field | Type | Description |
|---|---|---|
playbook_id |
integer | The instantiated playbook |
run_id |
integer | ID of the cycle (run) this created — the group the plans belong to |
run |
object | The created cycle: id, name (auto-named "<playbook> — <Mon YYYY>" unless you passed a name), context (the topic you passed, or null), anchor_date, project_id, project_name, and link_url (https://app.marcora.ai/runs/{playbook_run_uuid}) — share it to hand the user their new cycle |
created_count |
integer | Number of plans created (one per playbook item) |
plans |
array | The created content plans (same shape as create_plan / get_plan), each with its own link_url (https://app.marcora.ai/plans/{plan_uuid}). Stage Accepted, source playbook |
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.