Skip to main content
Glama

Prepare workflow draft

prepare_workflow_draft
Destructive

Creates or incrementally updates an AD_STRUCTURE_CREATE draft. Collect the Sponsored Products Campaign/Ad Group/Product Ad structure and any targeting the customer already supplied. One MANUAL ad group can contain only one positive targeting family: KEYWORD or ASIN TARGET. If positive targeting is omitted, collect manualTargetingFamily=KEYWORD|TARGET before execution. If the customer wants both, model separate manual Campaign/Ad Group structures from the start and assign one family to each; never put both into one ad group. Every ad group needs a negative-targeting decision: supplied allowed negative items automatically record negativeTargetingMode=CONFIGURED; when none are supplied, recommend negatives and ask the customer to choose CONFIGURED or NONE. AUTO permits both negative keywords and negative ASINs; a MANUAL KEYWORD group permits only negative keywords, and a MANUAL TARGET group permits only negative ASINs. Continuation prepares all Campaigns together, then all Ad Groups, then all Product Ads across every ad group in one multi-group plan before any AUTO bid decision or MANUAL recommendation can pause the draft. After all Product Ads exist, continuation queries and persists Amazon recommendations only for each manual ad group's recorded family, asks the customer to choose up to 100 candidates, obtains suggested or custom bids, then combines all ready MANUAL positive targeting into one Targeting batch plan. It subsequently combines every configured negative targeting item across AUTO and MANUAL structures into one separate negative Targeting batch plan. AUTO-only drafts skip the MANUAL stage and MANUAL-only drafts skip the AUTO stage. If recommendations are absent or rejected, submit customer-approved customCandidates of the same family to the continuation; do not recreate the already-created structure. For every AUTO ad group, explain that Amazon creates exactly four targets after the ad group exists and record automaticTargetBidding.mode as KEEP_DEFAULT, AMAZON_SUGGESTED, CUSTOM, or DECIDE_LATER; CUSTOM requires all four official theme bids. Never model those themes as manually created targets. Every supplied nested entity requires a stable clientRef. Updating requires draftId and expectedDraftVersion; arrays merge by clientRef and remove only through removeClientRefs. When the draft is READY, call continue_workflow_draft. The server then persists the current atomic plan, created Amazon IDs, recommendation choices, and bid choice so later calls safely resume. Every returned write plan must still be shown, explicitly confirmed, and applied. Pass applyContinuation to the matching operation-specific execution tool so successful writes automatically prepare the next stage; never ask the customer for permission merely to advance. Recommendation 429 responses are recoverable and do not create a write plan. During draft collection, accept syntactically valid SKU/ASIN values without querying Inventory or Listings; production Product Ad plan preparation performs product resolution.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
draftIdNoExisting draft ID. Omit only when creating a new draft.
storeIdNoStore ID in sellerId:marketplaceId format. Required when creating a draft and immutable afterwards.
parametersNoPartial SP advertising structure. Only supplied fields are merged into the draft.
workflowTypeYesDraft workflow type.
removeClientRefsNoStable clientRef values to delete explicitly. Omission never deletes entities.
expectedDraftVersionNoRequired optimistic-lock version when updating an existing draft.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNo
draftIdNo
storeIdNo
summaryNo
warningsNo
createdAtNo
expiresAtNo
updatedAtNo
parametersNo
nextActionsNo
continuationNo
draftVersionNo
workflowTypeNo
missingInputsNo
schemaVersionNo
validationErrorsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Adds substantial behavior beyond the destructiveHint=true annotation: merge-by-clientRef semantics, deletion only via removeClientRefs, optimistic locking with draftId/expectedDraftVersion, server-side persistence and safe resume, and recoverable 429 responses that create no write plan. Nothing contradicts the annotations (omission never deletes, consistent with explicit removal), but the exact effect of a merge on previously supplied nested arrays could be stated more sharply.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single dense paragraph of roughly 350 words mixing purpose, collection rules, continuation sequencing, error handling, and validation policy. Nearly every sentence carries information, but the lack of structure or grouping makes it hard to scan, and several points (AUTO negative support, family exclusivity) duplicate schema text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers the full lifecycle an agent needs: draft creation, incremental update with version locking, the multi-stage continuation ordering, AUTO bid mode decisions, recommendation handling, and the final confirm-and-apply path. With an output schema present, no return-value detail is owed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the baseline is 3, and the description earns more by adding cross-field constraints the schema cannot express: one positive targeting family per MANUAL ad group, negative families gated by ad group type, and the requirement for a stable clientRef on every nested entity. Some of this restates the schema's own manualTargetingFamily and negativeTargetingMode descriptions, which caps it at 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource: 'Creates or incrementally updates an AD_STRUCTURE_CREATE draft', and immediately scopes it to SP Campaign/Ad Group/Product Ad structures. It is clear what the tool does, but it never names the narrower siblings (prepare_campaign_creation, prepare_ad_group_creation, prepare_targeting_creation) to explain when the umbrella draft tool is preferred over them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states the transition points: call continue_workflow_draft when the draft is READY, pass applyContinuation to the operation-specific execution tool, and never ask permission merely to advance. It also gives when-not guidance (do not recreate an already-created structure when recommendations are rejected) and how to split both targeting families into separate structures.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources