← All MCP tools

MCP tool

generate_optimizations

Analyse the campaign plan, delivery and observed outcomes and replace its pending optimisation set with fresh explainable proposals. This creates recommendations only; it does not approve a budget reallocation or change a live provider. Previously approved or rejected decisions remain immutable. Review the returned confidence, rationale and expected impact, then ask the user before approve_optimization or reject_optimization.

Input

Pass fields from this schema as the tool arguments. Runtime ownership, product scope and readiness checks still apply.

Input JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "campaignId": {
      "type": "string",
      "minLength": 1,
      "description": "campaign id to analyse"
    }
  },
  "required": [
    "campaignId"
  ]
}

REST mapping and authority

The tool wraps this REST endpoint. The mapping identifies path/query/body transformations and approval or idempotency headers.

Request contract
{
  "method": "POST",
  "path": "/api/v1/campaigns/{campaignId}/optimize",
  "pathFields": [
    "campaignId"
  ],
  "pathSchema": {
    "type": "object",
    "properties": {
      "campaignId": {
        "type": "string",
        "minLength": 1,
        "description": "campaign id to analyse"
      }
    },
    "additionalProperties": false,
    "required": [
      "campaignId"
    ]
  },
  "pathEncoding": "encodeURIComponent for each path field",
  "governedAction": null,
  "headers": {},
  "body": null,
  "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
}

Output

This is the registered MCP output envelope. Nested fields are only modeled where the schema explicitly defines them.

Output JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "proposals": {
      "type": "array",
      "items": {}
    }
  },
  "required": [
    "proposals"
  ],
  "additionalProperties": {}
}

Safety annotations

MCP annotations
{
  "readOnlyHint": false,
  "destructiveHint": true,
  "idempotentHint": false,
  "openWorldHint": true
}

Annotations help a client present the tool. The API independently enforces authorization and exact action approvals. Error and retry guidance →

generate_optimizations | AdBuyMCP docs