Update Saved Build
ads_update_buildUpdate one saved build by ID: rename it, edit notes, patch its portable spec with specPatch, or replace the full spec. specPatch merges field by field: omitted fields survive, nested text entries merge, supplied arrays replace and null removes a field. It needs expectedRevision, the revision from ads_get_build. Changes to spec, webState, mediaItems or uploadBatchId bump the revision. A rename or notes-only update does not bump it. Parallel updates to one build collide on the revision: a stale expectedRevision returns "Build changed since it was read" (HTTP 409), and ads_get_build returns the current revision. spec replaces the whole portable spec. webState is only accepted unchanged from a build that was read; the web uploader regenerates it when it next opens the build, and webStateStale: true until then is normal. Setting a name turns an autosaved build into a kept, named build. An open uploader tab picks up the update automatically. Returns updated metadata and display: totalAdSets, totalAds and the ads in each ad set as the web uploader renders them (display.complete false carries a reason, and display.inheritedFromSource lists fields that come from the source ad or preset); ads_get_build returns the stored state. Uploaded-media texts.perAd keys are file names or media:. CTA fields take Meta enum values such as SHOP_NOW. Uploaded media accepts texts.common.multiAdvertiserAds only (boolean); omit to copy the source, which is off when the source ad does not say. True is refused while site links remain. Imported posts keep per-row choices. Website highlights is copied from the source and cannot be changed; none, all off and empty features never change it. Preview and saved display report both settings separately. video_uncrop and translate_voiceover require source OPT_IN.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"buildId": "<buildId>"
},
"name": "ads_update_build"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | New build name. Setting a name marks the build as manually saved, so it stops rotating out with autosaves. | |
| spec | No | Replacement portable spec (the launch configuration used by ads_create with buildId). Send the FULL updated spec object, not a partial diff. Set to null to clear it. | |
| notes | No | Free-form notes stored on the build. | |
| buildId | Yes | Saved build ID, e.g. build_abc123... | |
| webState | No | Opaque web uploader session snapshot. Do not construct this object by hand. Only send it when round-tripping a webState previously read from the build without changing its structure. For content changes, update spec only; the web uploader regenerates webState on its next resume. | |
| specPatch | No | Preferred for content edits. Field-aware merge patch applied to the stored portable spec: omitted fields survive, nested objects (including individual texts.perAd/perAdset entries) merge, supplied arrays replace, and null removes a field. Requires expectedRevision. Computed launchability metadata cannot be patched. | |
| expectedRevision | No | Revision returned by ads_get_build. Required with specPatch and recommended for every update; the update fails instead of overwriting a newer revision. |