Skip to Content
MCPRecipesPlan a campaign with Work

Plan a campaign with Work

Goal. The person asks for a social campaign — “launch posts for our new tote, Instagram first” — and you want them to pick a direction before anything is generated. Work writes a brief, exactly three directions, and a recommendation onto a canvas, waits for the choice, and then runs one generation for the chosen direction.

Tools used. work_prepare, work_continue, work_execute, work_get, and run_snapshot or work_refresh to follow progress. Optionally save_image_to_canvas for references first.

Requires. A full-access connection. Preparing needs canvas:read, canvas:write, and asset:read; continuing needs canvas:read and canvas:write; executing also needs image:generate.

The Work tools are not listed by default. They answer to their exact name on a connection with no profile, and ?profile=advanced lists them. A ?profile=creative connection cannot call them. Work is optional: for “make me four images of this bag”, call generate_image_in_canvas directly.

What Work will and will not do. Version 1 plans social campaigns only, with exactly three directions and one selected 4:5 output per Work. A request for a different number of outputs or another aspect ratio is refused at preparation, with a message pointing at direct image generation. Each Work starts at most one paid run; another generation needs a new Work.


The sequence

Save references first, if there are any

A product or style image the person supplied must be on a canvas before Work can use it. Work does not fetch URLs. Save it with save_image_to_canvas (see Save an image and use it) and keep the canvas handle and the node: handle.

If there are no references yet, skip this step and let work_prepare create the canvas.

Prepare the Work

{ "name": "work_prepare", "arguments": { "request": "Launch posts for our new canvas tote on Instagram. Warm, everyday, not luxury.", "references": [{ "handle": "node:tote1a", "role": "product" }], "canvasId": "canvas:abc123:tote-launch", "idempotencyKey": "tote-launch-work-2026-10-05-01" } }
  • request is the person’s campaign request, up to 8,000 characters.
  • references takes up to 12 node: or asset: handles, each optionally with a role of identity, style, or product.
  • canvasId is the task’s existing canvas. Pass it whenever the task already has one — for example the canvas your references are on. Omit it and work_prepare creates the task canvas itself; do not call canvas_create first in that case.

Check: the result has workId (work:<id>), status, canvas (with its handle and an href), and work, whose directions holds exactly three, each with a handle (direction:<id>), name, summary, rationale, and recommended. Keep work.canvasHandle and use it for every later save, import, and generation in the task.

Nothing has been generated. The brief, directions, and recommendation are now nodes on the canvas.

Stop for the person’s choice

Present the three directions and the recommendation, and ask which one to make:

I’ve drafted three directions on your canvas: Everyday carry (recommended), Weekend market, and Desk to dinner. Which should I generate? Generating makes one image with your connected provider.

The Work’s status reads directions_ready or waiting_for_choice here. If it reads needs_input, the brief has a question to answer first: ask the person, then send the answer with work_continue.

Record the choice

{ "name": "work_continue", "arguments": { "workId": "work:7hq2la", "action": "select_direction", "directionId": "direction:everyday-carry", "idempotencyKey": "tote-launch-select-2026-10-05-01" } }

work_continue takes one action at a time, and only that action’s field:

actionFieldUse it to
answeranswer (1–2,000)Answer a question in the brief
select_directiondirectionId (an ID or direction: handle)Record the person’s choice
adjustadjustment (1–2,000)Refine the brief
acknowledge_canvasnoneAccept edits someone made on the canvas

It only updates planning and never starts paid work. Check: status is now ready_to_run.

Get explicit approval, then execute

Selecting a direction is not approval to spend. Confirm in the current turn, then:

{ "name": "work_execute", "arguments": { "workId": "work:7hq2la", "confirm": true, "idempotencyKey": "tote-launch-execute-2026-10-05-01" } }

This can incur provider cost. confirm must be true, and only after the person approved. work_execute returns immediately with durable progress. Do not call it again to see how it is going: a repeat with the same key only replays the original, and one with a new key is refused, because a Work starts at most one paid run.

Check: status is running, and progress shows completed out of total.

Follow progress

To look without side effects:

{ "name": "work_get", "arguments": { "workId": "work:7hq2la" } }

work_get and run_snapshot with the work: handle read the stored Work and never poll the provider, so they can lag behind. The Work’s owner can reconcile it with the provider:

{ "name": "work_refresh", "arguments": { "workId": "work:7hq2la" } }

work_refresh polls the provider and writes progress and finished output into the Work and the canvas. It is free, owner-only, and needs image:generate.

Check: status reaches completed (or partially_failed / failed, which you report and stop on).

Verify and report

{ "name": "canvas_validate", "arguments": { "canvasId": "canvas:abc123:tote-launch" } }

Call the work done only when completionReview.doneClaimAllowed is true:

Generated the Everyday carry direction on canvas:abc123:tote-launch. The other two directions stay on the canvas for later. Review it here: https://app.gavana.ai/…


When the canvas changed

People keep working on the canvas while a Work waits. If someone edits the Work’s nodes, canvasSync.status turns stale, and work_execute refuses with 409 “Canvas changed outside this Work.” Read the canvas, tell the person what changed, and when they are happy with it, acknowledge it:

{ "name": "work_continue", "arguments": { "workId": "work:7hq2la", "action": "acknowledge_canvas", "idempotencyKey": "tote-launch-ack-2026-10-05-01" } }

Then execute. Acknowledging accepts the person’s edits; it never overwrites them.

When it fails

SymptomCauseFix
400 “prepares social campaigns only”The request names no social channelMention the channel, or use direct image generation.
400 about three directions or 4:5 outputsThe request asks for another count or ratioUse generate_image_in_canvas with items and explicit ratios.
400 “Reference URLs must first be imported”A URL was passed as a referenceSave it with save_image_to_canvas and pass the node: handle.
403 “This Canvas is view-only.”The connection’s account can only view that canvasUse a canvas the account can edit.
409 “Select one direction before executing this Work.”No direction selectedwork_continue with select_direction first.
409 “Canvas changed outside this Work.”Someone edited the canvasAcknowledge it with acknowledge_canvas, as above.
409 “already started its single paid run”work_execute was already used on this WorkFollow the existing run. A new generation needs a new Work and new approval.
409 “cannot be changed after generation has started”work_continue after executionCreate a new Work for another direction.
403 “Only the Work owner can reconcile provider progress.”work_refresh by someone other than the ownerUse work_get or run_snapshot.
Planning reported as degradedThe planner could not verify directions; nothing generatedStart a new Work later, or generate directly from the saved request.

Common mistakes

MistakeWhy it hurts
Treating the selection as approvalChoosing a direction and agreeing to pay are separate. Ask.
Creating a canvas before work_prepare, then omitting canvasIdTwo canvases for one task. Pass the handle you already have.
Calling work_execute again to check progressIt is a paid action. Use work_get or run_snapshot.
Using Work for a non-social or multi-output requestRefused. Generate directly instead.
Losing work.canvasHandleEvery later save and generation in the task belongs on that canvas.
Last updated on