@dynamoi/mcp 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -80,15 +80,17 @@ var BILLING_COUNTRY_READ_CONTRACT = {
80
80
  mcp: {
81
81
  ...mcp,
82
82
  definition: {
83
- description: "Read the artist billing country. Existing commercial currency stays fixed. This is not tax residency. Full profile only.",
83
+ description: "Read the artist billing country. Existing commercial currency stays fixed. This is not tax residency.",
84
84
  destructiveHint: false,
85
85
  name: "dynamoi_get_artist_billing_country",
86
86
  openWorldHint: false,
87
- profiles,
87
+ profiles: { directory: "advertised", full: "advertised" },
88
88
  readOnlyHint: true,
89
89
  schema: z2.object({ artistId: z2.string().uuid() }).strict(),
90
90
  title: "Get Artist Billing Country"
91
- }
91
+ },
92
+ directoryReason: "Read-only billing country is directory-safe.",
93
+ scopes: ["dynamoi:read", "dynamoi:billing.read"]
92
94
  },
93
95
  mobile: {
94
96
  ...mobile,
@@ -394,7 +396,7 @@ var DYNAMOI_MCP_TOOL_SCOPES = {
394
396
  dynamoi_get_account_overview: ["dynamoi:read"],
395
397
  dynamoi_get_action_center: ["dynamoi:read", "dynamoi:platform.read"],
396
398
  dynamoi_get_artist_analytics: ["dynamoi:read"],
397
- dynamoi_onboard_artist: ["dynamoi:read", "dynamoi:mcp.full"],
399
+ dynamoi_onboard_artist: ["dynamoi:read", "dynamoi:platform.write"],
398
400
  [AUDIENCE_ANALYTICS_CONTRACT.mcp.definition.name]: AUDIENCE_ANALYTICS_CONTRACT.mcp.scopes,
399
401
  [BILLING_COUNTRY_READ_CONTRACT.mcp.definition.name]: BILLING_COUNTRY_READ_CONTRACT.mcp.scopes,
400
402
  dynamoi_get_audit_log: ["dynamoi:read"],
@@ -407,19 +409,17 @@ var DYNAMOI_MCP_TOOL_SCOPES = {
407
409
  ],
408
410
  dynamoi_get_distribution_status: [
409
411
  "dynamoi:read",
410
- "dynamoi:distribution.read",
411
- "dynamoi:mcp.full"
412
+ "dynamoi:distribution.read"
412
413
  ],
413
414
  dynamoi_get_earnings: ["dynamoi:read", "dynamoi:distribution.read"],
414
415
  [GROWTH_AUDIT_CONTRACT.mcp.definition.name]: GROWTH_AUDIT_CONTRACT.mcp.scopes,
415
416
  dynamoi_get_platform_status: ["dynamoi:read", "dynamoi:platform.read"],
416
417
  dynamoi_prepare_distribution_release: [
417
418
  "dynamoi:read",
418
- "dynamoi:distribution.apply",
419
- "dynamoi:mcp.full"
419
+ "dynamoi:distribution.apply"
420
420
  ],
421
421
  [PLAYLIST_ANALYTICS_CONTRACT.mcp.definition.name]: PLAYLIST_ANALYTICS_CONTRACT.mcp.scopes,
422
- dynamoi_claim_referral_code: ["dynamoi:read", "dynamoi:mcp.full"],
422
+ dynamoi_claim_referral_code: ["dynamoi:read", "dynamoi:platform.write"],
423
423
  dynamoi_get_referrals: ["dynamoi:read"],
424
424
  dynamoi_get_resume_funding: ["dynamoi:read", "dynamoi:billing.read"],
425
425
  dynamoi_get_smart_link: ["dynamoi:read"],
@@ -435,7 +435,7 @@ var DYNAMOI_MCP_TOOL_SCOPES = {
435
435
  "dynamoi:read",
436
436
  "dynamoi:campaign.write"
437
437
  ],
438
- dynamoi_manage_team: ["dynamoi:read", "dynamoi:mcp.full"],
438
+ dynamoi_manage_team: ["dynamoi:read", "dynamoi:platform.write"],
439
439
  dynamoi_manage_youtube_draft: ["dynamoi:read", "dynamoi:campaign.write"],
440
440
  dynamoi_open_workspace: ["dynamoi:read"],
441
441
  dynamoi_preview_smart_link_themes: ["dynamoi:read"],
@@ -451,8 +451,8 @@ var DYNAMOI_MCP_TOOL_SCOPES = {
451
451
  "dynamoi:read",
452
452
  "dynamoi:platform.write"
453
453
  ],
454
- dynamoi_update_account_profile: ["dynamoi:read", "dynamoi:mcp.full"],
455
- dynamoi_update_campaign: ["dynamoi:read", "dynamoi:campaign.write"],
454
+ dynamoi_update_account_profile: ["dynamoi:read", "dynamoi:platform.write"],
455
+ dynamoi_update_campaign: ["dynamoi:read", "dynamoi:campaign.launch"],
456
456
  dynamoi_update_smart_link: ["dynamoi:read", "dynamoi:smart_links.write"],
457
457
  dynamoi_update_smart_link_artist_hub_settings: [
458
458
  "dynamoi:read",
@@ -1565,12 +1565,12 @@ var MediaAssetModerationOutputSchema = z11.strictObject({
1565
1565
  var MediaAssetSummaryOutputSchema = z11.object({
1566
1566
  aspectRatio: z11.string().optional(),
1567
1567
  createdAt: z11.string(),
1568
- moderation: MediaAssetModerationOutputSchema.optional(),
1569
- thumbnailUrl: z11.string().optional(),
1570
1568
  fileName: z11.string().optional(),
1571
1569
  fileType: z11.string(),
1572
1570
  height: z11.number().optional(),
1573
1571
  id: z11.string(),
1572
+ moderation: MediaAssetModerationOutputSchema.optional(),
1573
+ thumbnailUrl: z11.string().optional(),
1574
1574
  url: z11.string().optional(),
1575
1575
  urlExpiresAt: z11.string().optional(),
1576
1576
  width: z11.number().optional()
@@ -2046,8 +2046,8 @@ var ArtistIntakeInputSchema = z14.object({
2046
2046
  url: z14.string().trim().min(1).optional()
2047
2047
  }).strict();
2048
2048
  var ARTIST_INTAKE_TOOL_DEFINITION = {
2049
- description: "Full profile only. Search Spotify artists by query, preview a Spotify artist URL, or intake an artist from a Spotify or YouTube URL. Intake creates a workspace and starts onboarding using web organization policy; organizationId selects an editable organization. Existing claims, entitlements, caps and provider quotas apply. Sign in through the app or web first.",
2050
- destructiveHint: false,
2049
+ description: "Search Spotify artists by query, preview a Spotify artist URL, or intake an artist from a Spotify or YouTube URL. Intake creates a workspace and starts onboarding using web organization policy; organizationId selects an editable organization. Existing claims, entitlements, caps and provider quotas apply. Sign in through the app or web first.",
2050
+ destructiveHint: true,
2051
2051
  name: "dynamoi_onboard_artist",
2052
2052
  openWorldHint: true,
2053
2053
  outputSchema: AnyOutputEnvelopeSchema,
@@ -2062,8 +2062,8 @@ import {
2062
2062
  import * as z27 from "zod/v4";
2063
2063
 
2064
2064
  // src/version.ts
2065
- var BUNDLED_DYNAMOI_MCP_VERSION = "1.0.8";
2066
- var DYNAMOI_MCP_VERSION = BUNDLED_DYNAMOI_MCP_VERSION.length > 0 && !BUNDLED_DYNAMOI_MCP_VERSION.includes("__") ? BUNDLED_DYNAMOI_MCP_VERSION : "1.0.8";
2065
+ var BUNDLED_DYNAMOI_MCP_VERSION = "1.0.9";
2066
+ var DYNAMOI_MCP_VERSION = BUNDLED_DYNAMOI_MCP_VERSION.length > 0 && !BUNDLED_DYNAMOI_MCP_VERSION.includes("__") ? BUNDLED_DYNAMOI_MCP_VERSION : "1.0.9";
2067
2067
 
2068
2068
  // src/server/distribution-tools.ts
2069
2069
  import * as z16 from "zod/v4";
@@ -2095,8 +2095,8 @@ var DynamoiApplyForDistributionInputSchema = z15.object({
2095
2095
  userIntentSummary: z15.string().trim().min(1).max(500)
2096
2096
  }).strict();
2097
2097
  var pendingBehavior = {
2098
- status: "partial",
2099
- reason: "Eligibility, adult attestation, country admission, submission and persisted submitted-state readback still need frozen feature receipts on all five surfaces. Manual review and existing admission rules remain required."
2098
+ reason: "Eligibility, adult attestation, country admission, submission and persisted submitted-state readback still need frozen feature receipts on all five surfaces. Manual review and existing admission rules remain required.",
2099
+ status: "partial"
2100
2100
  };
2101
2101
  var DISTRIBUTION_APPLICATION_CONTRACT = {
2102
2102
  capabilityId: "distribution_application",
@@ -2104,7 +2104,7 @@ var DISTRIBUTION_APPLICATION_CONTRACT = {
2104
2104
  mcp: {
2105
2105
  definition: {
2106
2106
  description: "Submit an artist's application for Dynamoi music distribution after the user explicitly asks to apply and all five eligibility requirements are met. This records an application for manual review; it does not approve distribution, accept an agreement, submit a release, transfer rights, configure splits or tax forms, or deliver music to stores. All three valid ISO 3166-1 alpha-2 country or territory codes, an adult signer attestation, confirmApplicationSubmission=true, and a concise userIntentSummary are required. Country, tax, payout, sanctions, and provider-delivery checks remain manual progression gates after intake; a valid code does not imply approval. Repeated submission is idempotent for an active application.",
2107
- destructiveHint: false,
2107
+ destructiveHint: true,
2108
2108
  idempotentHint: true,
2109
2109
  name: "dynamoi_apply_for_distribution",
2110
2110
  openWorldHint: true,
@@ -2175,8 +2175,8 @@ var DynamoiPrepareDistributionReleaseInputSchema = z16.object({
2175
2175
  }).strict();
2176
2176
  var DISTRIBUTION_TOOL_DEFINITIONS = [
2177
2177
  {
2178
- description: "Prepare metadata, tracks and proposed splits for artist review in a private expiring web form. Does not submit a release, attest rights, accept agreements or invite collaborators. Full profile only.",
2179
- destructiveHint: false,
2178
+ description: "Prepare metadata, tracks and proposed splits for artist review in a private expiring web form. Does not submit a release, attest rights, accept agreements or invite collaborators.",
2179
+ destructiveHint: true,
2180
2180
  name: "dynamoi_prepare_distribution_release",
2181
2181
  openWorldHint: false,
2182
2182
  outputSchema: AnyOutputEnvelopeSchema,
@@ -2185,7 +2185,7 @@ var DISTRIBUTION_TOOL_DEFINITIONS = [
2185
2185
  title: "Prepare Release Handoff"
2186
2186
  },
2187
2187
  {
2188
- description: "Read native foundation, application, agreement, catalog or release status for an accessible artist through the same owners as web/mobile. Full profile only. Release intake status requires editor access, as on web; catalog retains viewer scoping. Catalog is a status overview; releases returns the latest 20 submissions, not complete history. Rights and agreement attestation and sending releases to stores are done by the artist in web or the app.",
2188
+ description: "Read native foundation, application, agreement, catalog or release status for an accessible artist through the same owners as web/mobile. Release intake status requires editor access, as on web; catalog retains viewer scoping. Catalog is a status overview; releases returns the latest 20 submissions, not complete history. Rights and agreement attestation and sending releases to stores are done by the artist in web or the app.",
2189
2189
  destructiveHint: false,
2190
2190
  name: "dynamoi_get_distribution_status",
2191
2191
  openWorldHint: false,
@@ -2308,16 +2308,19 @@ Common workflows:
2308
2308
  - Shop one-off promotion: dynamoi_shop_get_quote → explicit user confirmation → dynamoi_shop_create_checkout. The returned URL is an unpaid handoff; the user completes payment outside MCP and no Shop order exists until Dynamoi verifies settlement.
2309
2309
  `.trim();
2310
2310
  var DYNAMOI_CHATGPT_APP_INSTRUCTIONS = `
2311
- Dynamoi is a music promotion platform for independent artists, labels, managers, and YouTube creators on any distributor: free Smart Links and analytics, managed Meta Smart Campaigns, managed YouTube campaigns, and opt-in distribution to 100+ stores where artists keep 90% of net receipts. Call dynamoi_about for the canonical product overview.
2311
+ Dynamoi provides Smart Links, campaign and audience analytics, campaign drafts, and distribution status for the signed-in user's own artists. Call dynamoi_about for the product overview.
2312
2312
 
2313
- Reach for Dynamoi when a musician asks to act on or check their own music: plan and promote a new single or release, see how a release or campaign is doing (dynamoi_get_artist_analytics, dynamoi_get_campaign), make a link for a song or a link-in-bio (Smart Link tools), get music on Spotify and other stores (dynamoi_get_distribution_application), or grow a YouTube channel (dynamoi_get_youtube_channel_data). Distribution scores five requirements, including 1,000 Spotify followers and 10,000 monthly listeners; AI music is accepted only from artists who meet them. Never promise streams, followers, approval, or any other result.
2313
+ Use these tools only when the user asks about their own Dynamoi account, artists, campaigns, Smart Links, or releases. Never promise streams, followers, approval, or any other result.
2314
2314
 
2315
2315
  You are operating Dynamoi's tools on behalf of the authenticated user. This
2316
- surface is review-safe: it does not expose billing, subscription or plan setup,
2317
- campaign launch or budget tools, external OAuth connection starters, Shop
2318
- checkout, or any purchase flow. When the user asks to buy, subscribe, launch a
2319
- paid campaign, connect Meta or YouTube, or change a live campaign, explain that
2320
- the action is not available through this surface and tell them: "You can do this
2316
+ surface exposes billing and earnings status reads, account and team management,
2317
+ referral claims, artist onboarding, campaign draft preparation, release handoffs,
2318
+ Smart Link updates and controls, support requests, and Meta/YouTube connection
2319
+ links that the user opens to authorize access. Draft preparation never launches
2320
+ or changes live campaigns; release handoffs never accept agreements or deliver
2321
+ music to stores. Purchases, subscriptions and plan setup, checkout, adding funds,
2322
+ launching or editing live campaigns, billing-country changes, and account deletion
2323
+ remain dashboard-only. For those actions, tell the user: "You can do this
2321
2324
  in the Dynamoi dashboard at https://dynamoi.com/dashboard." Do not create or
2322
2325
  surface a purchase or checkout URL. Use the available read tools afterward to
2323
2326
  check existing status, analytics, and setup state.
@@ -2483,10 +2486,19 @@ function registerDynamoiPrompts(server) {
2483
2486
  import { ResourceTemplate } from "@modelcontextprotocol/server";
2484
2487
  import * as z18 from "zod/v4";
2485
2488
 
2486
- // src/server/budget-minimums.ts
2489
+ // src/campaign-limits.ts
2490
+ var CAMPAIGN_CREATIVE_SELECTION_LIMIT = 10;
2491
+ var CAMPAIGN_CREATIVE_TOTAL_SELECTION_LIMIT = 3 * CAMPAIGN_CREATIVE_SELECTION_LIMIT;
2492
+ var MIN_CAMPAIGN_DAYS = 5;
2493
+ var MAX_SOURCE_AUDIO_MIB = 250;
2494
+ var MAX_SOURCE_AUDIO_BYTES = MAX_SOURCE_AUDIO_MIB * 1024 * 1024;
2495
+ var MIN_DAILY_CAMPAIGN_BUDGET_USD = 10;
2487
2496
  var USD_BUDGET_MINIMUMS = {
2488
- smartCampaign: { dailyUsd: 10, totalUsd: 50 },
2489
- youtube: { dailyUsd: 10, totalUsd: 75 }
2497
+ smartCampaign: {
2498
+ dailyUsd: MIN_DAILY_CAMPAIGN_BUDGET_USD,
2499
+ totalUsd: MIN_DAILY_CAMPAIGN_BUDGET_USD * MIN_CAMPAIGN_DAYS
2500
+ },
2501
+ youtube: { dailyUsd: MIN_DAILY_CAMPAIGN_BUDGET_USD, totalUsd: 75 }
2490
2502
  };
2491
2503
 
2492
2504
  // src/server/playbook-resources.ts
@@ -3079,20 +3091,24 @@ function registerDynamoiResources(server, adapter) {
3079
3091
 
3080
3092
  // src/server/shop-tools.ts
3081
3093
  import * as z19 from "zod/v4";
3094
+
3095
+ // src/shop-limits.ts
3096
+ var SHOP_CUSTOM_MIN_TARGET_VIEWS = 25000;
3097
+ var SHOP_CUSTOM_MAX_TARGET_VIEWS = 1e6;
3098
+ var SHOP_CUSTOM_MIN_DURATION_DAYS = 7;
3099
+ var SHOP_CUSTOM_MAX_DURATION_DAYS = 30;
3100
+ var SHOP_MAX_TARGET_COUNTRY_CODES = 50;
3101
+
3102
+ // src/server/shop-tools.ts
3082
3103
  var DYNAMOI_SHOP_FULL_SCOPE = "dynamoi:mcp.full";
3083
- var DYNAMOI_SHOP_MAX_TARGET_COUNTRY_CODES = 50;
3084
- var DYNAMOI_SHOP_CUSTOM_MIN_TARGET_VIEWS = 25000;
3085
- var DYNAMOI_SHOP_CUSTOM_MAX_TARGET_VIEWS = 1e6;
3086
- var DYNAMOI_SHOP_CUSTOM_MIN_DURATION_DAYS = 7;
3087
- var DYNAMOI_SHOP_CUSTOM_MAX_DURATION_DAYS = 30;
3088
3104
  var ShopPackageSelectionInputSchema = z19.object({
3089
3105
  kind: z19.literal("package"),
3090
3106
  tier: z19.enum(["starter", "standard", "premium"])
3091
3107
  }).strict();
3092
3108
  var ShopCustomSelectionInputSchema = z19.object({
3093
- campaignDurationDays: z19.number().int().min(DYNAMOI_SHOP_CUSTOM_MIN_DURATION_DAYS).max(DYNAMOI_SHOP_CUSTOM_MAX_DURATION_DAYS),
3109
+ campaignDurationDays: z19.number().int().min(SHOP_CUSTOM_MIN_DURATION_DAYS).max(SHOP_CUSTOM_MAX_DURATION_DAYS),
3094
3110
  kind: z19.literal("custom"),
3095
- targetViews: z19.number().int().min(DYNAMOI_SHOP_CUSTOM_MIN_TARGET_VIEWS).max(DYNAMOI_SHOP_CUSTOM_MAX_TARGET_VIEWS)
3111
+ targetViews: z19.number().int().min(SHOP_CUSTOM_MIN_TARGET_VIEWS).max(SHOP_CUSTOM_MAX_TARGET_VIEWS)
3096
3112
  }).strict();
3097
3113
  var DynamoiShopSelectionInputSchema = z19.discriminatedUnion("kind", [
3098
3114
  ShopPackageSelectionInputSchema,
@@ -3100,7 +3116,7 @@ var DynamoiShopSelectionInputSchema = z19.discriminatedUnion("kind", [
3100
3116
  ]);
3101
3117
  var ShopGlobalTargetingInputSchema = z19.object({ mode: z19.literal("GLOBAL") }).strict();
3102
3118
  var ShopIncludedTargetingInputSchema = z19.object({
3103
- countryCodes: z19.array(z19.string().regex(/^[A-Z]{2}$/)).min(1).max(DYNAMOI_SHOP_MAX_TARGET_COUNTRY_CODES),
3119
+ countryCodes: z19.array(z19.string().regex(/^[A-Z]{2}$/)).min(1).max(SHOP_MAX_TARGET_COUNTRY_CODES),
3104
3120
  mode: z19.literal("INCLUDE")
3105
3121
  }).strict();
3106
3122
  var DynamoiShopTargetingInputSchema = z19.discriminatedUnion("mode", [
@@ -3258,10 +3274,10 @@ var UploadedSelectionSchema = z20.strictObject({
3258
3274
  var CreativeSelectionSchema = z20.strictObject({
3259
3275
  campaignId: z20.uuid(),
3260
3276
  expectedUpdatedAt: z20.iso.datetime(),
3261
- selectedCreativeIds: z20.array(z20.uuid()).min(1).max(100).optional(),
3262
- selectedSocialPosts: z20.array(z20.string().min(1).max(200)).max(10).optional(),
3277
+ selectedCreativeIds: z20.array(z20.uuid()).min(1).max(CAMPAIGN_CREATIVE_SELECTION_LIMIT).optional(),
3278
+ selectedSocialPosts: z20.array(z20.string().min(1).max(200)).max(CAMPAIGN_CREATIVE_SELECTION_LIMIT).optional(),
3263
3279
  source: z20.enum(["generate", "posts", "upload"]).optional(),
3264
- uploadedAssets: z20.array(UploadedSelectionSchema).max(30).optional()
3280
+ uploadedAssets: z20.array(UploadedSelectionSchema).max(CAMPAIGN_CREATIVE_SELECTION_LIMIT).optional()
3265
3281
  });
3266
3282
  var CreativeGenerationSchema = CreativeSelectionSchema.pick({
3267
3283
  campaignId: true,
@@ -3274,7 +3290,7 @@ var SourceAudioUploadStatusSchema = CreativeGenerationSchema.extend({
3274
3290
  var SourceAudioUploadSchema = z20.strictObject({
3275
3291
  campaignId: z20.uuid(),
3276
3292
  expectedUpdatedAt: z20.iso.datetime(),
3277
- fileSizeBytes: z20.number().int().positive().max(262144000),
3293
+ fileSizeBytes: z20.number().int().positive().max(MAX_SOURCE_AUDIO_BYTES),
3278
3294
  hookSeconds: z20.array(z20.number().int().nonnegative()).max(2),
3279
3295
  trackDurationSeconds: z20.number().positive()
3280
3296
  });
@@ -3319,6 +3335,11 @@ var SmartCampaignCreativeInputSchema = z20.strictObject({
3319
3335
  currency: z20.string().length(3).optional(),
3320
3336
  endDate: z20.iso.date().nullable()
3321
3337
  }).optional(),
3338
+ catalog: z20.strictObject({
3339
+ after: z20.string().min(1).max(2048).optional(),
3340
+ limit: z20.number().int().min(1).max(25).default(10),
3341
+ source: z20.enum(["facebook", "instagram"])
3342
+ }).optional(),
3322
3343
  locationSave: CreativeGenerationSchema.extend({
3323
3344
  targeting: z20.union([
3324
3345
  z20.strictObject({ mode: z20.literal("WORLDWIDE") }),
@@ -3347,6 +3368,9 @@ var SmartCampaignCreativeInputSchema = z20.strictObject({
3347
3368
  url: z20.string().max(8192).optional(),
3348
3369
  ...CreativeSelectionSchema.partial().shape,
3349
3370
  ...SourceAudioUploadCompleteSchema.partial().shape
3371
+ }).refine((input) => !input.catalog || input.action === "read", {
3372
+ message: "Request a social catalog only with action=read.",
3373
+ path: ["catalog"]
3350
3374
  });
3351
3375
  var GeneratedCreativeSchema = z20.strictObject({
3352
3376
  clipDurationSeconds: z20.number().nonnegative(),
@@ -3402,6 +3426,17 @@ var MediaUploadResultSchema = z20.union([
3402
3426
  var SmartCampaignCreativeOutputSchema = z20.strictObject({
3403
3427
  budgetDraft: z20.record(z20.string(), z20.unknown()).optional(),
3404
3428
  campaignId: z20.uuid(),
3429
+ catalog: z20.strictObject({
3430
+ items: z20.array(z20.strictObject({
3431
+ createdAt: z20.string(),
3432
+ eligibleForPromotion: z20.boolean().nullable(),
3433
+ id: z20.string(),
3434
+ mediaType: z20.string(),
3435
+ text: z20.string().max(2000)
3436
+ })).max(25),
3437
+ nextCursor: z20.string().nullable(),
3438
+ source: z20.enum(["facebook", "instagram"])
3439
+ }).optional(),
3405
3440
  draftState: z20.enum(["available", "missing"]).optional(),
3406
3441
  generation: z20.strictObject({
3407
3442
  items: z20.array(GeneratedCreativeSchema).max(100),
@@ -3451,8 +3486,8 @@ var SmartCampaignCreativeOutputSchema = z20.strictObject({
3451
3486
  }).optional()
3452
3487
  });
3453
3488
  var SMART_CAMPAIGN_CREATIVE_TOOL_DEFINITION = {
3454
- description: "Use save_setup with setupSave={playLinkId, appleMusicUrl?} and a stable UUID-v4 setupRequestId per setup flow; reuse it on retries, and start a new flow for different content. It returns setupDraft. Use read_budget for budgetDraft and save_budget with budgetSave={campaignId, expectedUpdatedAt, budgetAmountCents, budgetAmountMinor?, currency?, budgetType:DAILY|TOTAL, endDate:YYYY-MM-DD|null}. Amounts are exact minor units in the artist currency; use the budget policy from read_budget. Setup and budget saves only edit drafts and never launch or charge. Use read_location to read native draft targeting and save_location with locationSave={campaignId, expectedUpdatedAt, targeting:{mode:WORLDWIDE}|{mode:INCLUDE,countryCodes:[US]}} to save it. Read locationDraft first for the current revision; both location actions return locationDraft. Read generation progress, generated creatives and current selection with action=read. Use start_generation, retry_generation or clear_generation with campaignId and expectedUpdatedAt from read. Generation runs asynchronously; poll with read. Use source_audio_upload_status or abort_source_audio_upload with campaignId, expectedUpdatedAt, uploadId and uploadSessionId to inspect uploaded parts or abort the direct upload. Agents never approve or submit. Use action=select with campaignId and expectedUpdatedAt from read, source=generate|posts|upload, and selectedCreativeIds, selectedSocialPosts (owned META:post IDs), or uploadedAssets=[{mediaAssetId}] from dynamoi_list_media_assets. Omit selectedCreativeIds for social or uploaded media. Uploaded metadata is resolved by the server; only owned, moderation-approved uploads can be selected. Selection never attests artist approval and never submits the campaign. Upload private JPEG/PNG/MP4 campaign media (1 GiB maximum) with start_media_upload, campaignId, expectedUpdatedAt and mediaUpload={assetId:UUID,fileName,fileSizeBytes,contentType}. Retain the returned key/uploadId and PUT each presigned part URL. Complete with complete_media_upload, a freshly inspected expectedUpdatedAt, and mediaUpload={assetId,fileName,fileSizeBytes,fileType,key,uploadId,parts:[{partNumber,etag}]}. Use media_upload_status or abort_media_upload with campaignId and mediaUpload={key,uploadId}; both remain usable after draft edits. A completed status means retry completion, not re-upload. Completion returns only a moderation receipt; poll dynamoi_list_media_assets and select only after APPROVED. Uploads do not edit the draft selection. Attach source MP3 audio to a draft with start_source_audio_upload, PUT each returned presigned part URL, then complete_source_audio_upload with the returned uploadId/uploadSessionId and part ETags. Both actions require campaignId, expectedUpdatedAt, fileSizeBytes, trackDurationSeconds and 0–2 hookSeconds. Read sourceAudio to confirm. Use import_source_audio with a public Dropbox share url, campaignId, expectedUpdatedAt, trackDurationSeconds and 0–2 hookSeconds (250 MiB maximum). Google Drive is unsupported because it requires a Google API key. On timeout or an ambiguous result, re-read sourceAudio before retrying.",
3455
- destructiveHint: false,
3489
+ description: `Use save_setup with setupSave={playLinkId, appleMusicUrl?} and a stable UUID-v4 setupRequestId per setup flow; reuse it on retries, and start a new flow for different content. It returns setupDraft. Use read_budget for budgetDraft and save_budget with budgetSave={campaignId, expectedUpdatedAt, budgetAmountCents, budgetAmountMinor?, currency?, budgetType:DAILY|TOTAL, endDate:YYYY-MM-DD|null}. Amounts are exact minor units in the artist currency; use the budget policy from read_budget. Setup and budget saves only edit drafts and never launch or charge. Use read_location to read native draft targeting and save_location with locationSave={campaignId, expectedUpdatedAt, targeting:{mode:WORLDWIDE}|{mode:INCLUDE,countryCodes:[US]}} to save it. Read locationDraft first for the current revision; both location actions return locationDraft. Read generation progress, generated creatives and current selection with action=read. To discover owned social posts, explicitly add catalog={source:facebook|instagram,limit:1..25,after?:nextCursor}. Only requested catalog reads fetch connected-account posts; use catalog.items[].id directly in selectedSocialPosts. Pass nextCursor as after for another page. Catalog reads never alter selections, token state, or campaigns; provider failure is an error, and selection revalidates ownership. Use start_generation, retry_generation or clear_generation with campaignId and expectedUpdatedAt from read. Generation runs asynchronously; poll with read. Use source_audio_upload_status or abort_source_audio_upload with campaignId, expectedUpdatedAt, uploadId and uploadSessionId to inspect uploaded parts or abort the direct upload. Agents never approve or submit. Use action=select with campaignId and expectedUpdatedAt from read, source=generate|posts|upload, and selectedCreativeIds, selectedSocialPosts (owned META:post IDs), or uploadedAssets=[{mediaAssetId}] from dynamoi_list_media_assets. Omit selectedCreativeIds for social or uploaded media. Uploaded metadata is resolved by the server; only owned, moderation-approved uploads can be selected. Selection never attests artist approval and never submits the campaign. Upload private JPEG/PNG/MP4 campaign media (1 GiB maximum) with start_media_upload, campaignId, expectedUpdatedAt and mediaUpload={assetId:UUID,fileName,fileSizeBytes,contentType}. Retain the returned key/uploadId and PUT each presigned part URL. Complete with complete_media_upload, a freshly inspected expectedUpdatedAt, and mediaUpload={assetId,fileName,fileSizeBytes,fileType,key,uploadId,parts:[{partNumber,etag}]}. Use media_upload_status or abort_media_upload with campaignId and mediaUpload={key,uploadId}; both remain usable after draft edits. A completed status means retry completion, not re-upload. Completion returns only a moderation receipt; poll dynamoi_list_media_assets and select only after APPROVED. Uploads do not edit the draft selection. Attach source MP3 audio to a draft with start_source_audio_upload, PUT each returned presigned part URL, then complete_source_audio_upload with the returned uploadId/uploadSessionId and part ETags. Both actions require campaignId, expectedUpdatedAt, fileSizeBytes, trackDurationSeconds and 0–2 hookSeconds. Read sourceAudio to confirm. Use import_source_audio with a public Dropbox share url, campaignId, expectedUpdatedAt, trackDurationSeconds and 0–2 hookSeconds (${MAX_SOURCE_AUDIO_MIB} MiB maximum). Google Drive is unsupported because it requires a Google API key. On timeout or an ambiguous result, re-read sourceAudio before retrying.`,
3490
+ destructiveHint: true,
3456
3491
  name: "dynamoi_manage_smart_campaign_creative",
3457
3492
  openWorldHint: false,
3458
3493
  outputSchema: createOutputEnvelopeSchema(SmartCampaignCreativeOutputSchema),
@@ -3497,7 +3532,7 @@ render(window.openai?.toolOutput);
3497
3532
  window.addEventListener("openai:set_globals", event => render(event.detail?.globals?.toolOutput));
3498
3533
  </script>
3499
3534
  `.trim();
3500
- function registerSmartLinkThemePreviewResource(server) {
3535
+ function registerSmartLinkThemePreviewResource(server, uiDomain = "https://dynamoi.com") {
3501
3536
  server.registerResource("smart-link-theme-preview", SMART_LINK_THEME_PREVIEW_RESOURCE_URI, {
3502
3537
  description: "Visual preview for the four Dynamoi Smart Link page themes.",
3503
3538
  mimeType: "text/html;profile=mcp-app",
@@ -3516,7 +3551,7 @@ function registerSmartLinkThemePreviewResource(server) {
3516
3551
  "https://fonts.gstatic.com"
3517
3552
  ]
3518
3553
  },
3519
- domain: "https://dynamoi.com",
3554
+ domain: uiDomain,
3520
3555
  prefersBorder: true
3521
3556
  }
3522
3557
  },
@@ -3815,7 +3850,7 @@ var PHASE_4_TOOL_DEFINITIONS = [
3815
3850
  },
3816
3851
  {
3817
3852
  description: "Use this when the user gives a Spotify artist URL and wants Dynamoi to create, import, or refresh free Smart Links for the artist catalog and return the artist hub. If the signed-in user has no Dynamoi artist yet, omit artistId so Dynamoi can create the first artist from the Spotify artist profile. This starts the background catalog import so the user does not need to open the dashboard. Smart Links are free to create and manage. High-popularity or unverifiable artist catalog links may stay unpublished in verification hold until Dynamoi can verify the client relationship. This does not create a paid ad campaign. In the final answer, lead with the artist hub URL and current public Smart Link URLs; do not expose internal IDs unless asked.",
3818
- destructiveHint: false,
3853
+ destructiveHint: true,
3819
3854
  idempotentHint: true,
3820
3855
  name: "dynamoi_create_smart_links_from_spotify_artist",
3821
3856
  openWorldHint: true,
@@ -3957,7 +3992,7 @@ var DynamoiContactSupportInputSchema = z23.object({
3957
3992
  var SUPPORT_TOOL_DEFINITIONS = [
3958
3993
  {
3959
3994
  description: "Use this when the user wants to report a problem with Dynamoi (a tool error, sign-in or permission problem, wrong data, a billing, campaign or distribution question) or send Dynamoi feedback. Show the user the subject and message and get their OK before sending. Dynamoi attaches the signed-in account and this agent's identity, and support replies by email to the account address. Never include passwords, tokens, API keys or card numbers. Sending changes no campaign, billing or account data.",
3960
- destructiveHint: false,
3995
+ destructiveHint: true,
3961
3996
  idempotentHint: false,
3962
3997
  name: "dynamoi_contact_support",
3963
3998
  openWorldHint: false,
@@ -3976,7 +4011,7 @@ function createPhaseOnboardingToolDefinitions(schemas) {
3976
4011
  return [
3977
4012
  {
3978
4013
  description: "Use this when the user wants to grow a YouTube channel with Dynamoi campaigns or is ready to link a channel to one Dynamoi artist from chat. Set purpose=distribution_identity for the least-privilege identity connection required by a distribution application; that flow does not require advertising billing or Google Ads linking, and its result is checked with dynamoi_get_distribution_application. Use purpose=advertising (the default) for managed YouTube promotion, then poll dynamoi_get_platform_status until platforms.youtube.connected is true. The tool returns a Google OAuth URL bound to the signed-in user and artist.",
3979
- destructiveHint: false,
4014
+ destructiveHint: true,
3980
4015
  idempotentHint: true,
3981
4016
  name: "dynamoi_start_youtube_channel_link",
3982
4017
  openWorldHint: true,
@@ -3987,7 +4022,7 @@ function createPhaseOnboardingToolDefinitions(schemas) {
3987
4022
  },
3988
4023
  {
3989
4024
  description: "Use this when the user is ready to connect a Facebook Page and Instagram professional account to one Dynamoi artist. Set purpose=distribution_identity for the least-privilege identity connection required by a distribution application; that flow does not require advertising billing, and its result is checked with dynamoi_get_distribution_application. Use purpose=advertising (the default) for Spotify Smart Campaigns; advertising requires active billing and is checked with dynamoi_get_platform_status until platforms.meta.status is oauth_complete, partnership_pending, or partnership_active. Advertising returns billing_required when inactive and billing_check_unavailable for a transient verification failure. This returns a signed Meta OAuth URL and may include a Page/Instagram selection step.",
3990
- destructiveHint: false,
4025
+ destructiveHint: true,
3991
4026
  idempotentHint: true,
3992
4027
  name: "dynamoi_start_meta_connection",
3993
4028
  openWorldHint: true,
@@ -4104,7 +4139,7 @@ var DynamoiGetGrowthAuditInputSchema = GROWTH_AUDIT_CONTRACT.mcp.definition.sche
4104
4139
  var DynamoiGetPlaylistAnalyticsInputSchema = PLAYLIST_ANALYTICS_CONTRACT.mcp.definition.schema;
4105
4140
  var DynamoiGetAudienceAnalyticsInputSchema = AUDIENCE_ANALYTICS_CONTRACT.mcp.definition.schema;
4106
4141
  var DynamoiGetBillingInputSchema = z25.object({
4107
- action: z25.enum(["summary", "native_deposits", "native_commerce"]).optional(),
4142
+ action: z25.enum(["summary", "native_commerce"]).optional(),
4108
4143
  artistId: z25.string().uuid(),
4109
4144
  format: ToolFormatSchema2.optional(),
4110
4145
  onboardingAttemptId: OnboardingAttemptIdSchema
@@ -4426,6 +4461,7 @@ var DynamoiUpdateCampaignInputSchema = z25.object({
4426
4461
  "update_location",
4427
4462
  "update_end_date",
4428
4463
  "archive",
4464
+ "unarchive",
4429
4465
  "update_goals"
4430
4466
  ]),
4431
4467
  authorizeAutomaticDailyFunding: z25.literal(true).describe(`Set only after the client explicitly accepts: “${PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY}”`).optional(),
@@ -4453,6 +4489,7 @@ var DynamoiUpdateCampaignInputSchema = z25.object({
4453
4489
  "update_location",
4454
4490
  "update_end_date",
4455
4491
  "archive",
4492
+ "unarchive",
4456
4493
  "update_goals"
4457
4494
  ].includes(data.action) && !data.clientRequestId) {
4458
4495
  ctx.addIssue({
@@ -4776,7 +4813,7 @@ var PHASE_1_TOOL_DEFINITIONS = [
4776
4813
  title: "Get YouTube Channel Data"
4777
4814
  },
4778
4815
  {
4779
- description: "Use action=native_commerce for the native commerce projection (full profile, read-only; no subscription changes or invoices). Use action=native_deposits for the native funding summary and pending deposit (not transaction history); hosted Checkout remains the payment boundary. Use this when the user asks about billing state, credit balance, promo limits, subscription status, campaign-fund deposits, or whether billing blocks launches for one artist. This is a read-only status check; it does not create checkout links or collect payment. paymentMethod contains only the shared masked display details (brand or bank, type, last four digits and expiry); null means details are unavailable, not proof that no method exists. Each deposit in prefundPayments is pending (payment not yet confirmed), cleared (Stripe says paid and the funds are usable), failed (the payment did not complete) or held (paid, but funding is on hold for review and not usable yet). A Checkout link alone is never a deposit. To add campaign funds use dynamoi_add_campaign_funds; for other billing setup tell the user: 'You can do this in the Dynamoi dashboard at https://dynamoi.com/dashboard.' Then call this tool again to confirm the status. Do not use this for campaign analytics or platform connection troubleshooting.",
4816
+ description: "Use action=native_commerce for the native commerce projection (full profile, read-only; no subscription changes or invoices). Use this when the user asks about billing state, credit balance, promo limits, subscription status, campaign-fund deposits, or whether billing blocks launches for one artist. This is a read-only status check; it does not create checkout links or collect payment. paymentMethod contains only the shared masked display details (brand or bank, type, last four digits and expiry); null means details are unavailable, not proof that no method exists. Each deposit in prefundPayments is pending (payment not yet confirmed), cleared (Stripe says paid and the funds are usable), failed (the payment did not complete) or held (paid, but funding is on hold for review and not usable yet). A Checkout link alone is never a deposit. To add campaign funds use dynamoi_add_campaign_funds; for other billing setup tell the user: 'You can do this in the Dynamoi dashboard at https://dynamoi.com/dashboard.' Then call this tool again to confirm the status. Do not use this for campaign analytics or platform connection troubleshooting.",
4780
4817
  destructiveHint: false,
4781
4818
  name: "dynamoi_get_billing",
4782
4819
  openWorldHint: false,
@@ -4786,7 +4823,7 @@ var PHASE_1_TOOL_DEFINITIONS = [
4786
4823
  title: "Get Billing"
4787
4824
  },
4788
4825
  {
4789
- description: "Read an artist's platform Action Center after authenticated artist access. Preserve revision, task states, steps and primary/secondary actions: open_url opens a URL; navigate is dashboard navigation. Reading does not complete or approve a task. Unavailable data is an error, not an empty task list. Full profile only.",
4826
+ description: "Read an artist's platform Action Center after authenticated artist access. Preserve revision, task states, steps and primary/secondary actions: open_url opens a URL; navigate is dashboard navigation. Reading does not complete or approve a task. Unavailable data is an error, not an empty task list.",
4790
4827
  destructiveHint: false,
4791
4828
  name: "dynamoi_get_action_center",
4792
4829
  openWorldHint: false,
@@ -4796,7 +4833,7 @@ var PHASE_1_TOOL_DEFINITIONS = [
4796
4833
  title: "Get Action Center"
4797
4834
  },
4798
4835
  {
4799
- description: "Read distribution earnings for the authenticated payee only, optionally restricted to their artistIds. Team or artist access never grants payee access. action=overview returns the payee's own share in USD, range totals, monthly totals and at most 50 detail rows, narrowed by trackKey, storeKey, storeFamily and countryCode (totals remain for the whole range). action=ranking returns up to 300 rows by dimension (track, artist, store, country), with their filtered totalUsd, narrowed by trackKey, storeFamily and countryCode. action=geography returns {rows} of the country map with optional prior-window comparison. action=statement returns the web export data for one statement month: use axis=statement and equal fromMonth/toMonth, with no exploration filters or cursor. No new files are created. Rankings and prior-window geography read an equal preceding window within the owner's 60-month bound. For overview pagination, pass nextCursor unchanged to continue with the same range, axis, artists and filters. fromMonth/toMonth are inclusive YYYY-MM, at most 60 months. axis=statement groups by statement month; earned groups by royalty month, while payee share always follows statement month. Empty rows mean no matching data; an error means unavailable, never zero earnings. This grants no payout or tax authority and performs no writes. Full profile only.",
4836
+ description: "Read distribution earnings for the authenticated payee only, optionally restricted to their artistIds. Team or artist access never grants payee access. action=overview returns the payee's own share in USD, range totals, monthly totals and at most 50 detail rows, narrowed by trackKey, storeKey, storeFamily and countryCode (totals remain for the whole range). action=ranking returns up to 300 rows by dimension (track, artist, store, country), with their filtered totalUsd, narrowed by trackKey, storeFamily and countryCode. action=geography returns {rows} of the country map with optional prior-window comparison. action=statement returns the web export data for one statement month: use axis=statement and equal fromMonth/toMonth, with no exploration filters or cursor. No new files are created. Rankings and prior-window geography read an equal preceding window within the owner's 60-month bound. For overview pagination, pass nextCursor unchanged to continue with the same range, axis, artists and filters. fromMonth/toMonth are inclusive YYYY-MM, at most 60 months. axis=statement groups by statement month; earned groups by royalty month, while payee share always follows statement month. Nullable amounts or counts mean unavailable; an explicit 0 is measured zero. Empty rows mean no matching data; an error means unavailable, never zero earnings. This grants no payout or tax authority and performs no writes.",
4800
4837
  destructiveHint: false,
4801
4838
  name: "dynamoi_get_earnings",
4802
4839
  openWorldHint: false,
@@ -4806,7 +4843,7 @@ var PHASE_1_TOOL_DEFINITIONS = [
4806
4843
  title: "Get Distribution Earnings"
4807
4844
  },
4808
4845
  {
4809
- description: "Read organization members and pending invitations after artist and organization settings authority checks. Artist collaboration alone never grants roster access. No invitation tokens or role mutations. Full profile only.",
4846
+ description: "Read organization members and pending invitations after artist and organization settings authority checks. Artist collaboration alone never grants roster access. No invitation tokens or role mutations.",
4810
4847
  destructiveHint: false,
4811
4848
  name: "dynamoi_get_team",
4812
4849
  openWorldHint: false,
@@ -4816,7 +4853,7 @@ var PHASE_1_TOOL_DEFINITIONS = [
4816
4853
  title: "Get Team"
4817
4854
  },
4818
4855
  {
4819
- description: "Change an organization member's role, remove a member or revoke a pending organization invitation using the same authority and transactional protections as web. Full profile only. targetId is the organization membership or pending invitation row ID from dynamoi_get_team. Owner and last-admin protections apply; removal can revoke access and pending invitations.",
4856
+ description: "Change an organization member's role, remove a member or revoke a pending organization invitation using the same authority and transactional protections as web. targetId is the organization membership or pending invitation row ID from dynamoi_get_team. Owner and last-admin protections apply; removal can revoke access and pending invitations.",
4820
4857
  destructiveHint: true,
4821
4858
  name: "dynamoi_manage_team",
4822
4859
  openWorldHint: false,
@@ -4826,7 +4863,7 @@ var PHASE_1_TOOL_DEFINITIONS = [
4826
4863
  title: "Manage Organization Members"
4827
4864
  },
4828
4865
  {
4829
- description: "Read sanitized artist or organization settings audit events, or your own 12 recent account activity entries with scope=account (artist access required; no cursor). Organization scope requires organization settings authority, beyond artist access. Pass nextCursor unchanged within the same scope; cursors are bounded and scope-checked. Full profile only.",
4866
+ description: "Read sanitized artist or organization settings audit events, or your own 12 recent account activity entries with scope=account (artist access required; no cursor). Organization scope requires organization settings authority, beyond artist access. Pass nextCursor unchanged within the same scope; cursors are bounded and scope-checked.",
4830
4867
  destructiveHint: false,
4831
4868
  name: "dynamoi_get_audit_log",
4832
4869
  openWorldHint: false,
@@ -4836,8 +4873,8 @@ var PHASE_1_TOOL_DEFINITIONS = [
4836
4873
  title: "Get AuditLog"
4837
4874
  },
4838
4875
  {
4839
- description: "Claim or change your own referral code using the web claim rules. Claiming accepts the current referral program terms. Full profile only.",
4840
- destructiveHint: false,
4876
+ description: "Claim or change your own referral code using the web claim rules. Claiming accepts the current referral program terms.",
4877
+ destructiveHint: true,
4841
4878
  name: "dynamoi_claim_referral_code",
4842
4879
  openWorldHint: false,
4843
4880
  outputSchema: AnyOutputEnvelopeSchema,
@@ -4846,7 +4883,7 @@ var PHASE_1_TOOL_DEFINITIONS = [
4846
4883
  title: "Claim Referral Code"
4847
4884
  },
4848
4885
  {
4849
- description: "Read the authenticated caller's referral dashboard after artist access, without cookie attribution or commission refresh. USD cents and observed states: PENDING is not yet available; AVAILABLE is eligible, not payout approval; WITHDRAWAL_PENDING is awaiting payout; PAID is paid. Never describe pending or available amounts as approved or paid. Full profile only.",
4886
+ description: "Read the authenticated caller's referral dashboard after artist access, without cookie attribution or commission refresh. USD cents and observed states: PENDING is not yet available; AVAILABLE is eligible, not payout approval; WITHDRAWAL_PENDING is awaiting payout; PAID is paid. Never describe pending or available amounts as approved or paid.",
4850
4887
  destructiveHint: false,
4851
4888
  name: "dynamoi_get_referrals",
4852
4889
  openWorldHint: false,
@@ -4902,8 +4939,8 @@ var PHASE_ONBOARDING_TOOL_DEFINITIONS = createPhaseOnboardingToolDefinitions({
4902
4939
  });
4903
4940
  var PHASE_2_TOOL_DEFINITIONS = [
4904
4941
  {
4905
- description: "Read ad copy for a Smart Campaign creation draft, or save copy by providing save with the revision read. Full profile only; editor access required. Refuses submitted campaigns. Never launches, submits or publishes.",
4906
- destructiveHint: false,
4942
+ description: "Read ad copy for a Smart Campaign creation draft, or save copy by providing save with the revision read. Editor access required. Refuses submitted campaigns. Never launches, submits or publishes.",
4943
+ destructiveHint: true,
4907
4944
  name: "dynamoi_smart_campaign_ad_copy",
4908
4945
  openWorldHint: false,
4909
4946
  outputSchema: AnyOutputEnvelopeSchema,
@@ -4923,7 +4960,7 @@ var PHASE_2_TOOL_DEFINITIONS = [
4923
4960
  title: "Add Campaign Funds"
4924
4961
  },
4925
4962
  {
4926
- description: "Full profile; editor access required. Returns the current draft summary in data and the native operation response in stepResult. Read native setup with setup, browse videos with videos and optional pageToken, screen with screen and videoId. Save draft steps with save_content/contentSave={campaignId,videoId,playlistId,strategy}, save_location/locationSave={campaignId,targeting:{mode:GLOBAL}|{mode:COUNTRIES,countries:[US]}}, save_ad_copy/adCopySave={campaignId,adCopy,mode:assisted|preserve}, or save_budget/budgetSave={campaignId,budgetAmountCents,budgetType,endDate,currency?,budgetAmountMinor?}. Amounts are exact minor units in the artist currency; use the setup budget policy. Reuse the campaignId when retrying. Saves use native last-write-wins semantics; re-read setup after ambiguous outcomes. Draft saves never launch, change live campaigns or call Google Ads; launch stays on dynamoi_launch_campaign. Inspect a recoverable draft with inspect. Use discard only on explicit user request with campaignId, expectedUpdatedAt from inspect and userIntentSummary. Discard cannot be undone.",
4963
+ description: "Editor access required. Returns the current draft summary in data and the native operation response in stepResult. Read native setup with setup, browse videos with videos and optional pageToken, screen with screen and videoId. Save draft steps with save_content/contentSave={campaignId,videoId,playlistId,strategy}, save_location/locationSave={campaignId,targeting:{mode:GLOBAL}|{mode:COUNTRIES,countries:[US]}}, save_ad_copy/adCopySave={campaignId,adCopy,mode:assisted|preserve}, or save_budget/budgetSave={campaignId,budgetAmountCents,budgetType,endDate,currency?,budgetAmountMinor?}. Amounts are exact minor units in the artist currency; use the setup budget policy. Reuse the campaignId when retrying. Saves use native last-write-wins semantics; re-read setup after ambiguous outcomes. Draft saves never launch, change live campaigns or call Google Ads; launch stays on dynamoi_launch_campaign. Inspect a recoverable draft with inspect. Use discard only on explicit user request with campaignId, expectedUpdatedAt from inspect and userIntentSummary. Discard cannot be undone.",
4927
4964
  destructiveHint: true,
4928
4965
  name: "dynamoi_manage_youtube_draft",
4929
4966
  openWorldHint: false,
@@ -4933,7 +4970,7 @@ var PHASE_2_TOOL_DEFINITIONS = [
4933
4970
  title: "Manage YouTube Draft"
4934
4971
  },
4935
4972
  {
4936
- description: `Use only when the user explicitly requests a campaign change. Resume isn't available for fixed-flight YouTube campaigns. Duplicate the campaign to relaunch it. Actions: pause, resume, update_budget, update_end_date (DAILY or TOTAL budget; TOTAL end-date extensions may require the same funding consent fields as update_budget or resume), update_location (GLOBAL or catalog-valid countries), change_strategy (managed YouTube Demand Gen), update_goals (YouTube optimization toggles), archive (never deletes). Inspect the campaign first and supply expectedCurrentStatus where possible. For resume, update_budget, or a TOTAL update_end_date that needs automatic daily card funding, first show the user the exact consent copy for the campaign's budget type, then pass the request's clientRequestId and, for DAILY, authorizeAutomaticDailyFunding=true with acceptedConsentVersion and acceptedConsentCopyHash: "${PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY}" (version "${PROSPECTIVE_BUDGET_FUNDING_CONSENT_VERSION}", hash "${PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY_HASH}"); for TOTAL, acceptedTotalConsentVersion and acceptedTotalConsentCopyHash: "${TOTAL_BUDGET_FUNDING_CONSENT_COPY}" (version "${TOTAL_BUDGET_FUNDING_CONSENT_VERSION}", hash "${TOTAL_BUDGET_FUNDING_CONSENT_COPY_HASH}"). A budget type refuses the other's consent. Without them, a resume that needs card funding is refused with: "Review and accept the daily funding authorization to resume this campaign." When retrying the same action, reuse the same clientRequestId.`,
4973
+ description: `Use only when the user explicitly requests a campaign change. Resume isn't available for fixed-flight YouTube campaigns. Duplicate the campaign to relaunch it. Actions: pause, resume, update_budget, update_end_date (DAILY or TOTAL budget; TOTAL end-date extensions may require the same funding consent fields as update_budget or resume), update_location (GLOBAL or catalog-valid countries), change_strategy (managed YouTube Demand Gen), update_goals (YouTube optimization toggles), archive (never deletes), unarchive (restores PAUSED without funding or activating providers). Inspect the campaign first and supply expectedCurrentStatus where possible. For resume, update_budget, or a TOTAL update_end_date that needs automatic daily card funding, first show the user the exact consent copy for the campaign's budget type, then pass the request's clientRequestId and, for DAILY, authorizeAutomaticDailyFunding=true with acceptedConsentVersion and acceptedConsentCopyHash: "${PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY}" (version "${PROSPECTIVE_BUDGET_FUNDING_CONSENT_VERSION}", hash "${PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY_HASH}"); for TOTAL, acceptedTotalConsentVersion and acceptedTotalConsentCopyHash: "${TOTAL_BUDGET_FUNDING_CONSENT_COPY}" (version "${TOTAL_BUDGET_FUNDING_CONSENT_VERSION}", hash "${TOTAL_BUDGET_FUNDING_CONSENT_COPY_HASH}"). A budget type refuses the other's consent. Without them, a resume that needs card funding is refused with: "Review and accept the daily funding authorization to resume this campaign." When retrying the same action, reuse the same clientRequestId.`,
4937
4974
  destructiveHint: true,
4938
4975
  idempotentHint: true,
4939
4976
  name: "dynamoi_update_campaign",
@@ -5220,7 +5257,7 @@ async function openWorkspace(adapter) {
5220
5257
  function workspaceHtml() {
5221
5258
  return `<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Dynamoi workspace</title><style>${WORKSPACE_STYLE}</style></head><body><main id="workspace"><header><h1>Dynamoi workspace</h1><p>Artists, campaigns and Smart Links</p></header><p role="status" id="connection">Connecting to your host…</p><section id="content" aria-label="Artist workspace"></section><noscript>This workspace needs JavaScript. Use Dynamoi’s individual read tools to inspect your account.</noscript></main><script>${WORKSPACE_SCRIPT.replaceAll("</script", "<\\/script")}</script></body></html>`;
5222
5259
  }
5223
- function registerWorkspaceResource(server) {
5260
+ function registerWorkspaceResource(server, uiDomain = "https://dynamoi.com") {
5224
5261
  server.registerResource("artist-workspace", WORKSPACE_RESOURCE_URI, {
5225
5262
  description: "Read-only artist, campaign and Smart Link workspace.",
5226
5263
  mimeType: "text/html;profile=mcp-app",
@@ -5231,7 +5268,7 @@ function registerWorkspaceResource(server) {
5231
5268
  _meta: {
5232
5269
  ui: {
5233
5270
  csp: { connectDomains: [], resourceDomains: [] },
5234
- domain: "https://dynamoi.com",
5271
+ domain: uiDomain,
5235
5272
  prefersBorder: true
5236
5273
  }
5237
5274
  },
@@ -5301,21 +5338,6 @@ var DIRECTORY_DESCRIPTIVE_DATA_SCHEMAS = {
5301
5338
  summary: z27.string().optional(),
5302
5339
  totalCount: z27.number().optional()
5303
5340
  }).passthrough(),
5304
- dynamoi_update_smart_link: DescriptiveEntitySchema.extend({
5305
- artistId: z27.string().optional(),
5306
- artistName: z27.string().optional(),
5307
- defaultTheme: z27.string().optional(),
5308
- renderQueuedCount: z27.number().optional(),
5309
- renderWarning: z27.string().nullable().optional()
5310
- }).passthrough(),
5311
- dynamoi_update_smart_link_artist_hub_settings: DescriptiveEntitySchema.extend({
5312
- artistHub: z27.object({}).passthrough().optional(),
5313
- artistId: z27.string().optional(),
5314
- artistName: z27.string().optional(),
5315
- defaultTheme: z27.string().optional(),
5316
- renderQueuedCount: z27.number().optional(),
5317
- renderWarning: z27.string().nullable().optional()
5318
- }).passthrough(),
5319
5341
  dynamoi_update_smart_link_artist_settings: DescriptiveEntitySchema.extend({
5320
5342
  artistId: z27.string().optional(),
5321
5343
  artistName: z27.string().optional(),
@@ -5330,16 +5352,6 @@ var DIRECTORY_DESCRIPTIVE_DATA_SCHEMAS = {
5330
5352
  renderQueuedCount: z27.number().optional(),
5331
5353
  renderWarning: z27.string().nullable().optional()
5332
5354
  }).passthrough(),
5333
- dynamoi_update_smart_link_release_settings: DescriptiveEntitySchema.extend({
5334
- artistId: z27.string().optional(),
5335
- customDescription: z27.string().nullable().optional(),
5336
- nextActions: z27.array(z27.string()).optional(),
5337
- publishState: z27.string().optional(),
5338
- releaseSettings: z27.object({}).passthrough().optional(),
5339
- releaseTitle: z27.string().optional(),
5340
- renderWarning: z27.string().nullable().optional(),
5341
- theme: z27.string().optional()
5342
- }).passthrough(),
5343
5355
  fetch: DescriptiveEntitySchema,
5344
5356
  search: z27.object({ results: z27.array(DescriptiveEntitySchema).optional() }).passthrough()
5345
5357
  };
@@ -5389,49 +5401,20 @@ var DYNAMOI_TOOL_DEFINITIONS = [
5389
5401
  var DYNAMOI_TOOL_NAMES = DYNAMOI_TOOL_DEFINITIONS.map((definition) => definition.name);
5390
5402
  var MUTATING_TOOL_NAMES = new Set(DYNAMOI_TOOL_DEFINITIONS.filter((definition) => !definition.readOnlyHint).map((definition) => definition.name));
5391
5403
  var DIRECTORY_EXCLUDED_TOOL_NAMES = new Set([
5392
- "dynamoi_onboard_artist",
5393
- "dynamoi_smart_link_controls",
5394
- "dynamoi_claim_referral_code",
5395
- "dynamoi_smart_campaign_ad_copy",
5396
- "dynamoi_delete_account",
5397
- "dynamoi_update_account_profile",
5398
- "dynamoi_get_artist_billing_country",
5399
- "dynamoi_set_artist_billing_country",
5400
- "dynamoi_contact_support",
5401
5404
  "dynamoi_add_campaign_funds",
5405
+ "dynamoi_launch_campaign",
5406
+ "dynamoi_update_campaign",
5402
5407
  "dynamoi_shop_create_checkout",
5403
5408
  "dynamoi_shop_get_quote",
5404
5409
  "dynamoi_shop_list_orders",
5405
- "dynamoi_get_billing",
5406
- "dynamoi_get_action_center",
5407
- "dynamoi_get_team",
5408
- "dynamoi_manage_team",
5409
- "dynamoi_get_audit_log",
5410
- "dynamoi_get_referrals",
5411
- "dynamoi_get_distribution_status",
5412
- "dynamoi_prepare_distribution_release",
5413
- "dynamoi_get_earnings",
5410
+ "dynamoi_set_artist_billing_country",
5414
5411
  "dynamoi_get_resume_funding",
5415
- "dynamoi_get_campaign_readiness",
5416
- "dynamoi_manage_youtube_draft",
5417
- "dynamoi_manage_smart_campaign_creative",
5418
- "dynamoi_launch_campaign",
5419
- "dynamoi_list_available_countries",
5420
- "dynamoi_list_media_assets",
5421
- "dynamoi_start_meta_connection",
5422
- "dynamoi_start_youtube_channel_link",
5423
- "dynamoi_update_campaign",
5424
- "dynamoi_update_smart_link",
5425
- "dynamoi_update_smart_link_artist_hub_settings",
5426
- "dynamoi_update_smart_link_release_settings"
5412
+ "dynamoi_delete_account"
5427
5413
  ]);
5428
5414
  var DIRECTORY_ONLY_TOOL_NAMES = new Set([
5429
5415
  "dynamoi_update_smart_link_artist_settings",
5430
5416
  "dynamoi_update_smart_link_description"
5431
5417
  ]);
5432
- var DIRECTORY_COMPATIBILITY_TOOL_NAMES = new Set([
5433
- "dynamoi_update_smart_link"
5434
- ]);
5435
5418
  function getDynamoiToolDefinitions(options) {
5436
5419
  const definitions = [...DYNAMOI_TOOL_DEFINITIONS];
5437
5420
  if (options?.toolProfile === "full") {
@@ -5442,11 +5425,8 @@ function getDynamoiToolDefinitions(options) {
5442
5425
  }
5443
5426
  return definitions.filter((definition) => definition.profiles ? definition.profiles.directory === "advertised" : !DIRECTORY_EXCLUDED_TOOL_NAMES.has(definition.name));
5444
5427
  }
5445
- function getDynamoiToolCompatibilityDefinitions(options) {
5446
- if (options?.toolProfile === "full") {
5447
- return [];
5448
- }
5449
- return DYNAMOI_TOOL_DEFINITIONS.filter((definition) => DIRECTORY_COMPATIBILITY_TOOL_NAMES.has(definition.name));
5428
+ function getDynamoiToolCompatibilityDefinitions(_options) {
5429
+ return [];
5450
5430
  }
5451
5431
  var RECOVERY_METADATA_FIELDS = [
5452
5432
  "draftId",
@@ -5459,6 +5439,27 @@ var RECOVERY_METADATA_FIELDS = [
5459
5439
  "retryable",
5460
5440
  "retryAfterSeconds"
5461
5441
  ];
5442
+ var SMART_LINK_STATE_CONFLICT_TOOLS = new Set([
5443
+ "dynamoi_update_smart_link",
5444
+ "dynamoi_update_smart_link_description",
5445
+ "dynamoi_update_smart_link_artist_settings",
5446
+ "dynamoi_update_smart_link_artist_hub_settings",
5447
+ "dynamoi_update_smart_link_release_settings"
5448
+ ]);
5449
+ var SMART_LINK_STATE_CONFLICT_FIELDS = new Map([
5450
+ [
5451
+ "Smart Link changed since it was last read. Read it again before updating.",
5452
+ "expectedUpdatedAt"
5453
+ ],
5454
+ [
5455
+ "Smart Link changed since it was last read. Reload before updating.",
5456
+ "expectedVersion"
5457
+ ],
5458
+ [
5459
+ "Theme applied, other changes refused because Smart Link changed. Reload before updating.",
5460
+ "expectedVersion"
5461
+ ]
5462
+ ]);
5462
5463
  var SPOTIFY_SOURCE_ERROR_MESSAGES = new Set([
5463
5464
  "Paste a valid Spotify artist, album, or track URL.",
5464
5465
  "Paste a Spotify artist, album, or track URL.",
@@ -5562,10 +5563,11 @@ function mapKnownErrorRecovery(toolName, kind, message) {
5562
5563
  retryable: false
5563
5564
  };
5564
5565
  }
5565
- if ((toolName === "dynamoi_update_smart_link" || toolName === "dynamoi_update_smart_link_description" || toolName === "dynamoi_update_smart_link_artist_settings" || toolName === "dynamoi_update_smart_link_artist_hub_settings" || toolName === "dynamoi_update_smart_link_release_settings") && message === "Smart Link changed since it was last read. Read it again before updating.") {
5566
+ const conflictField = SMART_LINK_STATE_CONFLICT_FIELDS.get(message);
5567
+ if (SMART_LINK_STATE_CONFLICT_TOOLS.has(toolName) && conflictField) {
5566
5568
  return {
5567
5569
  code: "STATE_CONFLICT",
5568
- field: "expectedUpdatedAt",
5570
+ field: conflictField,
5569
5571
  nextAction: {
5570
5572
  kind: "read_status",
5571
5573
  reason: "Read the existing Smart Link again, then resubmit only with its current state."
@@ -5928,8 +5930,8 @@ function createDynamoiMcpServer(options) {
5928
5930
  }
5929
5931
  ]
5930
5932
  }));
5931
- registerSmartLinkThemePreviewResource(server);
5932
- registerWorkspaceResource(server);
5933
+ registerSmartLinkThemePreviewResource(server, options.uiDomain);
5934
+ registerWorkspaceResource(server, options.uiDomain);
5933
5935
  if (toolProfile === "full") {
5934
5936
  registerDynamoiPrompts(server);
5935
5937
  registerDynamoiResources(server, options.adapter);
@@ -6163,7 +6165,7 @@ export {
6163
6165
  DYNAMOI_MCP_TOOL_SCOPES,
6164
6166
  DYNAMOI_MCP_VERSION,
6165
6167
  DYNAMOI_SHOP_FULL_SCOPE,
6166
- DYNAMOI_SHOP_MAX_TARGET_COUNTRY_CODES,
6168
+ SHOP_MAX_TARGET_COUNTRY_CODES as DYNAMOI_SHOP_MAX_TARGET_COUNTRY_CODES,
6167
6169
  DYNAMOI_SUPPORT_CATEGORIES,
6168
6170
  DateRangeSchema2 as DateRangeSchema,
6169
6171
  DeleteAccountSchema,