Skip to main content
Glama

google_ads_asset_group_images_replace

Replace a Performance Max asset group image or logo atomically, keeping the minimum asset count intact and checking dimensions before upload.

Instructions

Swaps one image or logo of a Performance Max asset group for another. Mutating. Use this whichever situation you are in: pass new_asset_id when the account already holds the image (google_ads_image_assets_list finds one), or new_image_path to upload a local file first — exactly one of the two, and mureo handles the difference. The replacement is linked under the same field_type and the old link is removed in ONE atomic GoogleAdsService.mutate, so the asset group's asset count for that field type never dips below the Performance Max minimum (a removal issued on its own is refused with AssetGroupError.NOT_ENOUGH_MARKETING_IMAGE_ASSET or its square / logo twin). Neither Asset is deleted; only the old link to this asset group is. Google enforces a shape per slot — MARKETING_IMAGE 1.91:1 (min 600x314), SQUARE_MARKETING_IMAGE 1:1 (min 300x300), PORTRAIT_MARKETING_IMAGE 4:5 (min 480x600), LOGO 1:1 (min 128x128), LANDSCAPE_LOGO 4:1 (min 512x128) — and mureo checks it before uploading or linking anything, then refuses with the rule spelled out. It never crops or resizes. Returns {asset_group_id, field_type, added: {asset_id, asset_name, width_pixels, height_pixels, source ('existing_asset' | 'uploaded'), asset_group_asset}, removed: {asset_id, asset_name, url, asset_group_asset}, note}. Not automatically reversible — to swap back, call this tool again with the old asset_id; record before-state with mureo_state_action_log_append if you may need to roll back. Call google_ads_asset_group_assets_list first to get old_asset_id. For headlines and descriptions use google_ads_asset_group_assets_replace instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNoWhy this change is being made: one or two sentences naming the evidence and the expected effect. Stored in the journal and on the action_log entry this call produces, for the operator and the next session.
field_typeYesWhich image slot to swap. Must match the field_type the old asset is linked under — the same image can be linked as more than one field type, and each has its own required aspect ratio.
customer_idNoGoogle Ads customer ID as a 10-digit string without dashes (e.g. '1234567890'). Optional — falls back to GOOGLE_ADS_CUSTOMER_ID / GOOGLE_ADS_LOGIN_CUSTOMER_ID from the configured credentials when omitted.
new_asset_idNoAn image asset the account already holds, from google_ads_image_assets_list or from another asset group's entry. Rejected if it is not an image asset, if its dimensions do not fit this field_type, or if it is already linked to this asset group under this field_type (Google Ads refuses a duplicate link). Supply this OR new_image_path, never both.
old_asset_idYesasset_id of the entry being replaced, from google_ads_asset_group_assets_list. Rejected before any write if it is not linked to this asset group under this field_type.
asset_group_idYesAsset group whose image is being changed, as reported by google_ads_asset_group_assets_list.
new_image_nameNoAsset name for the uploaded image. Only used with new_image_path; defaults to the file name.
new_image_pathNoLocal path to an image to upload and link (jpg/jpeg/png/gif, max 5MB). Its dimensions are checked against this field_type BEFORE the upload, so a wrongly proportioned file costs no API call. Supply this OR new_asset_id, never both.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.20.0
    • addedInput schema / properties / reason
      Added value: +{
      +  "description": "Why this change is being made: one or two sentences naming the evidence and the expected effect. Stored in the journal and on the action_log entry this call produces, for the operator and the next session.",
      +  "maxLength": 500,
      +  "type": "string"
      +}
  2. Addedv0.13.1

TDQS

A5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral disclosure burden, and it does so thoroughly. It states that the tool mutates, performs the swap in one atomic GoogleAdsService.mutate, never deletes assets, never lets the asset count dip below the Performance Max minimum, never crops or resizes, and is not automatically reversible. It also documents likely error causes such as AssetGroupError.NOT_ENOUGH_MARKETING_IMAGE_ASSET, giving the agent a realistic model of side effects and failure modes.

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

Conciseness5/5

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

The description is long, but every sentence earns its place for a complex mutation tool with no annotations and no output schema. It front-loads the core swap behavior, then layers usage rules, atomicity, asset-count safety, dimension constraints, return shape, rollback guidance, and sibling routing in a logical structure. The density is justified by the number of decisions the caller must make correctly.

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?

Given the tool's complexity — 8 parameters, no annotations, no output schema — the description is remarkably complete. It includes the full return object shape, preconditions, error conditions, validation behavior, rollback limitations, and the relationship to sibling tools. An agent has everything needed to select, prepare for, invoke, and interpret this tool correctly.

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

Parameters5/5

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

Although the schema already describes all 8 parameters, the description adds material meaning beyond the schema. It clarifies the mutual exclusivity of new_asset_id and new_image_path, explains where each value comes from, ties field_type to exact aspect-ratio requirements and minimum dimensions, and notes that dimension validation happens before any upload or API call. This turns bare parameter names into an operational decision procedure.

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

Purpose5/5

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

The description opens with a specific verb and resource: 'Swaps one image or logo of a Performance Max asset group for another.' It clearly identifies the scope (image/logo slots), and explicitly distinguishes itself from google_ads_asset_group_assets_replace by stating that headlines and descriptions belong there. This leaves no ambiguity about what the tool does or how it relates to its closest sibling.

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?

Usage guidance is explicit and actionable: pass new_asset_id when the account already holds the image, or new_image_path to upload a local file, with the critical constraint that exactly one must be provided. It also names prerequisite calls (google_ads_asset_group_assets_list to get old_asset_id, google_ads_image_assets_list to find existing assets) and gives the alternative tool for headlines and descriptions. The agent is told both when and how to use this tool versus alternatives.

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

Deploy Server

Other Tools