devtune_start_action_draft
Start a content-draft run for an action, for accounts with content drafts: the Page Drafter for a create action, the Section Editor for a refresh action. The same checks as Generate draft in the app apply, and a refusal carries its reason: not_content_action, read_only (live or archived), brief_not_ready, brief_outdated (the brief predates the current format; regenerate it), no_target_page, page_locked, draft_kind_changed (the action now takes the other kind than the draftKind passed), forbidden (needs the manage permission) or unavailable (content drafts are off). The caller must be a member of the project. Retrying with the same requestIdempotencyKey returns the same run as it stands, even if the action has since changed, with status failed if that run failed; reusing it for a different request, including another modelId (omitted means the account default), is a conflict. The run uses agent credits; read the estimate from devtune_get_action_draft first. Returns the run id; follow it with devtune_get_action_draft, whose run is this one while it is in flight and whose current version is the draft once it finishes. An account with content drafts can also read the run metadata with devtune_get_agent_run, whose draftOutput stays null for content drafts; an account that drafts only Agent Picks Actions cannot read that run. Retrieve the actual draft with devtune_get_action_draft using actions.read under its existing action-specific checks. A draft is never published: a person reviews it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| modelId | No | Optional model id from devtune_get_action_draft models; the default model when absent. | |
| actionId | Yes | UUID of the action. | |
| draftKind | No | The draft you expect from devtune_get_action_draft; the start refuses with draft_kind_changed if the action now takes the other kind. | |
| requestIdempotencyKey | Yes | Required caller-generated UUID for idempotent retries. |