Content

generate_draft

Start drafting a content opportunity. Spends one monthly content credit: set confirm_credit=true only after the user agrees. Reuse the same idempotency_key when retrying so a retry cannot spend twice. Read the result later with get_draft.
writeChanges your workspace. Needs a read-and-write credential.
Plan
Scale and Custom
Rate cost
1 unit

Try asking

Draft the comparison page — yes, spend a credit.

Assistants should ask the person first: this is the one tool that spends money. It is annotated as not read-only and not idempotent, so a well-behaved client will prompt for confirmation before calling it.

Arguments

Passed as the tool call's arguments.

project_idstringrequired

The project to read, from list_projects.

asset_idstringrequired

The content opportunity, from list_content_assets.

idempotency_keystringrequired

Your own key, 1–128 characters. Reuse it on retries.

confirm_creditbooleandefault false

Send true to proceed. Left out, nothing is spent and the tool answers confirmation_required.

Result

The same object as Generate a draft, returned as structured output.

asset_idstring

The content opportunity being drafted.

generation_versioninteger

Which draft this is for the opportunity, counting from 1.

statusstring

pending on a new request. A replayed idempotency_key returns the original generation's current status. refunded is a failure whose credit was returned.

Values:pendingsucceededfailedrefunded

credit_consumedboolean

Whether this generation spent a content credit.

Errors

403 write_not_allowedThe key is read-only. Writes need a read-and-write key, and read-and-write keys need Scale or Custom.
422 confirmation_requiredA draft spends a content credit, and the call didn't confirm it with `confirm_credit: true`.
402 credits_exhaustedThis month's content credits are used up. Retrying won't help until the credits reset on the 1st (UTC).
402 payment_requiredThe plan doesn't include this capability for the project, or the workspace has reached its daily usage limit. Drafting a content opportunity is the call that can return it.
409 conflictThe item isn't in a state that allows the change — for example marking an opportunity published before it has a draft, or drafting one that is already being drafted.
404 not_foundThe project or item doesn't exist in this workspace. A project from another workspace also returns 404, never 403.
422 invalid_requestA parameter or body field is missing or has the wrong type or value. The message names the field. Also returned when a write would pass the plan's prompt limit.
401 unauthorizedNo key was sent, or the key is unknown, revoked or expired, or the member who created it has left the workspace or been deactivated.
402 plan_requiredThe workspace's plan doesn't include API access. It's included on Grow, Scale and Custom.
403 workspace_not_approvedThe workspace is still waiting for approval, or wasn't approved.
429 rate_limitedToo many requests this minute. Wait for the number of seconds in the `Retry-After` header, then retry.

Every code, and what to retry, is in Errors.

Failures arrive as a tool error — isError: true with code: message as text. See Using the tools.