Skip to main content
Glama

Apply portfolio changes

apply_portfolio_changes
Destructive

Executes only a confirmed AD_PORTFOLIO_CHANGE plan on the authorized Amazon Ads account. Changes portfolio names or budgets. Requires the plan's one-time confirmation receipt and an idempotency key. Review Sandbox simulates advertising writes.

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": {
      "planId": "<planId>",
      "confirmationReceipt": "<confirmationReceipt>",
      "idempotencyKey": "<idempotencyKey>"
    },
    "name": "apply_portfolio_changes"
  }
}

Input Schema

NameRequiredDescriptionDefault
planIdYesConfirmed immutable workflow plan ID. If this call times out or disconnects, do not prepare a replacement plan: query get_workflow_plan, or retry this exact plan with the same idempotency key. An INDETERMINATE item means Amazon may have accepted the write and must be reconciled before any retry.
idempotencyKeyYesClient-generated key unique to this plan. Generate a new key for every newly prepared plan; include the planId or another random value. Reuse the exact key only when retrying apply for this same plan; never reuse it for a newly prepared plan.
confirmationReceiptYesOne-time receipt returned by confirm_workflow_plan for this exact plan. A receipt for the current plan does not confirm subsequent plans.

Output Schema

NameRequiredDescriptionDefault
itemsNo
planIdNo
statusNo
storeIdNo
summaryNo
planHashNo
policyIdNo
warningsNo
createdAtNo
expiresAtNo
simulatedNo
parametersNo
confirmedAtNo
nextActionsNo
planVersionNo
continuationNo
workflowTypeNo
executionModeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and openWorldHint=true, so the description's job is lighter. It still adds real value by disclosing the one-time confirmation receipt requirement and idempotency-key semantics, plus the caveat that writes in Review Sandbox are simulated. The 'Review Sandbox simulates advertising writes' phrase is useful but worded vaguely enough that an agent may not be sure how it affects behavior.

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

Conciseness4/5

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

Four short sentences, front-loaded with the scope and constraint, with no filler. The one weak spot is the trailing 'Review Sandbox simulates advertising writes', which reads as an afterthought and slightly muddies the action being taken.

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

Completeness4/5

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

For a destructive, open-world write tool, the description covers scope, prerequisites, and idempotency, and an output schema exists so return values need no explanation. The main omission is routing guidance versus apply_portfolio_creation and prepare_portfolio_changes, which matters given the large apply_*/prepare_* sibling set.

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

Parameters3/5

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

Schema coverage is 100% and the per-parameter descriptions already explain planId retry/reconciliation rules, idempotency key reuse, and receipt scoping in more depth than the description. The description only restates that the receipt and idempotency key are required, adding no meaning beyond the schema. Baseline 3 applies when the schema does the heavy lifting.

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?

States a specific verb and resource: executes a confirmed AD_PORTFOLIO_CHANGE plan and changes portfolio names or budgets. That clearly separates it from the many apply_* siblings for campaigns, ads, and targeting. It stops short of explicitly contrasting with apply_portfolio_creation, though the 'changes' versus creation split is inferable from the name.

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

Usage Guidelines3/5

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

'Executes only a confirmed ... plan' establishes the prerequisite that confirm_workflow_plan must run first and implies prepare_portfolio_changes feeds it. However, it never names those siblings as alternatives, nor does it state when to choose apply_portfolio_creation or cancel_workflow_plan instead. The workflow ordering is implied rather than spelled out.

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