Skip to main content
Glama
scottehastings16

Adobe Target MCP

createABActivity

Create A/B Test activities in Adobe Target via API for bulk or CI/CD. Configure locations, experiences, metrics, and traffic allocation; activities are locked from UI editing.

Instructions

CRITICAL WARNING: DO NOT USE THIS TOOL FOR NORMAL WORKFLOWS

Activities created via this API are PERMANENTLY LOCKED - they CANNOT be edited in Adobe Target UI.

DEFAULT WORKFLOW (USE THIS 99% OF THE TIME):

  1. Create offers using createOffer tool (HTML) or createJsonOffer tool (JSON)

  2. Provide user with offer IDs

  3. User manually builds A/B activity in Target UI with full editing flexibility

DO NOT USE THIS TOOL UNLESS:

  1. User is creating 10+ activities in bulk (programmatic bulk creation)

  2. This is part of an automated CI/CD workflow

  3. User has been EXPLICITLY WARNED that activities cannot be edited in Target UI

  4. User has confirmed they understand the limitation and still want to proceed

MANDATORY STEPS BEFORE USING THIS TOOL: You MUST complete ALL of these steps before calling this tool:

  1. Ask user: "Are you creating 10+ activities in bulk?"

    • If NO: Stop. Tell user to use createOffer workflow instead

    • If YES: Continue to step 2

  2. Warn user: "Activities created via API will be permanently locked and cannot be edited in Adobe Target UI. You will not be able to modify them later through the Target interface. Do you understand and want to proceed?"

    • If NO: Stop. Use createOffer workflow instead

    • If YES: Continue to step 3

  3. Confirm: "To confirm: You understand the activity will be locked in Target UI and you still want to create it programmatically?"

    • If NO: Stop. Use createOffer workflow

    • If YES: Proceed with this tool

If user does NOT confirm all three steps, DO NOT use this tool. Use createOffer instead.

RECOMMENDED ALTERNATIVE (99% of use cases): Use createOffer to create offers, then tell user: "I've created the offers. Here are the offer IDs: [list IDs] To create your A/B activity:

  1. Go to Adobe Target → Activities → Create Activity → A/B Test

  2. Choose Form-Based Experience Composer

  3. Add experiences and select these offer IDs

  4. Configure traffic split and metrics This gives you full editing flexibility in the Target UI."

AUTO-FILLED DEFAULTS:

  • priority: 5

  • workspace: TARGET_WORKSPACE_ID

  • locations.mboxes: target-global-mbox

  • metrics: Page views goal (engagement: "page_count")

  • analytics (A4T): Auto-configured if set in .env

ACTIVITY MUST INCLUDE:

  • name (string)

  • state: "saved" (always use saved, activate later with updateActivityState)

  • options: Array with offerIds from createOffer

  • experiences: Traffic split configuration

  • locations: Where activity runs (auto-filled if not provided)

  • metrics: Success goal (auto-filled page views if not provided)

REFERENCE - Complete Payload Structure: { "id": 0, // int64: Activity ID (optional for create, auto-generated) "thirdPartyId": "string", // string: Optional external ID reference "name": "string", // string: REQUIRED - Activity name "state": "saved", // string: REQUIRED - "approved" | "saved" | "deactivated" | "deleted" // ALWAYS use "saved" for new activities "priority": 5, // int32: REQUIRED - Default: 5, Range: 0-999 "startsAt": "2024-01-01T00:00:00Z", // string (ISO-8601): Required if state is "approved" "endsAt": "2024-12-31T23:59:59Z", // string (ISO-8601): Required if state is "approved" "modifiedAt": "2024-01-01T00:00:00Z", // string (ISO-8601): Auto-generated timestamp

// LOCATIONS - Define where activity runs "locations": { "mboxes": [ // array: For server-side/mbox-based activities { "locationLocalId": 0, // int32: Unique ID for this location "name": "target-global-mbox", // string: Mbox name "audienceIds": [] // array: Optional audience targeting for location } ], "selectors": [ // array: For SPA/VEC activities with CSS selectors { "locationLocalId": 0, // int32: Unique ID for this location "name": "Hero Selector", // string: Display name "selector": "#hero-section", // string: CSS selector "audienceIds": [], // array: Optional audience targeting "selectorVersion": 1, // int32: Selector version "viewLocalId": 0 // int32: Reference to view (for SPA) } ] },

// OPTIONS - Define what content variations to show "options": [ { "optionLocalId": 0, // int32: Unique ID for this option "name": "Option A", // string: Option display name "offerId": 123456, // int64: ID from createOffer or existing offer "offerTemplates": [ // array: Optional - For dynamic offer templates { "offerTemplateId": 0, // int64: Template ID "templateParameters": [ // array: Template parameters { "name": "paramName", // string: Parameter name "value": "paramValue" // string: Parameter value } ] } ] } ],

// EXPERIENCES - Map options to locations with traffic allocation "experiences": [ { "experienceLocalId": 0, // int32: Unique ID for this experience "name": "Experience A (Control)", // string: Experience display name "audienceIds": [], // array: Optional audience targeting "visitorPercentage": 50, // int32: Traffic allocation (must total 100%) "optionLocations": [ // array: Map options to locations { "locationLocalId": 0, // int32: Reference to location "optionLocalId": 0 // int32: Reference to option } ] }, { "experienceLocalId": 1, "name": "Experience B", "audienceIds": [], "visitorPercentage": 50, "optionLocations": [ { "locationLocalId": 0, "optionLocalId": 1 } ] } ],

// METRICS - Define success metrics (conversions, engagement) "metrics": [ { "metricLocalId": 0, // int32: Unique ID for this metric "name": "Primary Goal", // string: Metric display name "conversion": true, // boolean: true for conversion metric "engagement": "page_count", // string: "page_count" | "score" | "time_on_site" | "none"

  // Action configuration (how to count metric)
  "action": {
    "type": "count_once",          // string: How to count this metric
    // Valid types:
    // "count_once" - Count only once per visitor
    // "count_landings" - Count each landing
    // "always_convert" - Always count as conversion
    // "restart_same_experience" - Restart in same experience
    // "restart_random_experience" - Restart in random experience
    // "restart_new_experience" - Restart in new experience
    // "exclude_to_same_experience" - Exclude but keep in same experience
    // "ban_from_campaign" - Permanently exclude from activity

    "conditions": {                // object: When to count
      "maxVisitCount": 0,          // int32: Max visits before counting (0 = unlimited)
      "maxImpressionCount": 0,     // int32: Max impressions before counting
      "experiences": [             // Per-experience conditions
        {
          "experienceLocalId": 0,  // int32: Reference to experience
          "maxVisitCount": 0,      // int32: Max visits for this experience
          "maxImpressionCount": 0  // int32: Max impressions for this experience
        }
      ]
    },
    "onConditionsMetAction": "count_once"  // string: Same values as "type"
  },

  // Mbox-based success tracking
  "mboxes": [
    {
      "name": "orderConfirmPage",   // string: Mbox name
      "successEvent": "mbox_shown", // string: "mbox_shown" | "mbox_clicked"
      "audienceIds": []              // array<int64>: Optional audience segmentation
    }
  ],

  // Click tracking (alternative to mbox tracking)
  "clickTrackSelectors": [
    {
      "selector": "#buy-button",   // string: CSS selector to track
      "audienceIds": [],           // array<int64>: Optional audience segmentation
      "selectorVersion": 1,        // int32: Selector version
      "viewLocalId": 0             // int32: Reference to view (for SPA)
    }
  ],

  // View-based tracking (for SPA)
  "views": [
    {
      "viewLocalId": 0,            // int32: Reference to view
      "audienceIds": []            // array<int64>: Optional audience segmentation
    }
  ],

  // Per-metric A4T configuration (overrides activity-level)
  "analytics": {
    "dataCollectionHost": "company.sc.omtrdc.net",
    "reportSuites": [
      {
        "companyName": "Company",
        "reportSuites": ["prod-rsid"]
      }
    ]
  }
}

],

// OPTIONAL: Entry constraints (limit who can enter) "entryConstraint": { "mboxes": [ // Require specific mboxes to fire { "name": "target-global-mbox", "audienceIds": [] // Optional audience constraints } ], "visitorPercentage": 100 // Limit % of visitors (default: 100) },

// OPTIONAL: Reporting audiences (segment reports) "reportingAudiences": [ { "reportingAudienceLocalId": 0, // int32: Unique ID for this reporting audience "audienceId": 789, // int64: Reference to audience "metricLocalId": 0 // int32: Reference to metric } ],

// OPTIONAL: Analytics for Target (A4T) integration "analytics": { "dataCollectionHost": "company.sc.omtrdc.net", // string: Analytics tracking server "reportSuites": [ // array: Report suite configuration { "companyName": "Company", // string: Analytics company name "reportSuites": ["prod-rsid"] // array: Report suite IDs } ] },

// OPTIONAL: For premium customers "workspace": "1234567", // string: Workspace ID (max 250 chars) "propertyIds": [123], // array: Unique property IDs

// OPTIONAL: For SPA/single-page applications "views": [ { "viewLocalId": 0, // int32: Local ID for this view "viewId": 1001, // int64: Global view ID "audienceIds": [] // array: Optional audience targeting } ],

// OPTIONAL: Application context (mobile, channel) "applicationContext": { "channel": "web", // string: "web" | "mobile" "applicationVersions": ["1.0"], // array: App version numbers "mobilePlatformVersions": ["iOS 16"], // array: OS versions "deviceType": "phone", // string: "phone" | "tablet" | "desktop" "screenOrientation": "portrait" // string: "portrait" | "landscape" } }

See full API documentation for complete field reference.

REMINDER: For normal use cases, create offers with createOffer tool instead of using this advanced API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesActivity name
activityYesFull A/B Test activity definition object with locations, experiences, metrics, and optional fields

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It does this well by warning that created activities are permanently locked, cannot be edited in Target UI, and require later activation via updateActivityState. It also documents auto-filled defaults and the required state value.

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?

The description is front-loaded and well-sectioned with warnings, mandatory steps, and a structured payload reference. However, it is very long and repeats the same core guidance—'do not use for normal workflows, use createOffer instead'—in the critical warning, conditions list, mandatory steps, recommended alternative, and final reminder.

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?

Despite having no annotations and no output schema, the description is complete enough for safe invocation: it covers prerequisites, required user confirmations, default values, required fields, and the full nested payload structure. An agent can construct a valid request and understand the irreversible consequences.

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 input schema has 100% description coverage, its descriptions are shallow: 'activity' is simply 'Full A/B Test activity definition object'. The tool description compensates with a complete annotated payload reference covering field types, defaults, enums, required vs optional fields, and relationships among locations, options, experiences, and metrics.

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 makes clear that this tool creates A/B Test activities programmatically and positions it against the normal createOffer workflow. It also defines the tool's unique niche: bulk or CI/CD-driven activity creation where the normal UI-based flow is not appropriate.

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?

The description is explicit about when to use this tool, when not to use it, and which alternative to prefer. It mandates specific user-confirmation steps before invocation and names createOffer as the default workflow, leaving essentially no ambiguity about tool selection.

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