@dynamoi/mcp 0.5.2 → 0.6.0

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
@@ -2,7 +2,7 @@ import {
2
2
  DYNAMOI_MCP_SCOPES,
3
3
  buildProtectedResourceMetadata,
4
4
  buildWwwAuthenticateHeader
5
- } from "./chunk-U5Y6RJS2.js";
5
+ } from "./chunk-6SBJ7DZU.js";
6
6
 
7
7
  // src/auth/verify-token.ts
8
8
  import { createRemoteJWKSet, jwtVerify } from "jose";
@@ -73,6 +73,7 @@ async function verifyAccessToken(options) {
73
73
 
74
74
  // src/server/create-server.ts
75
75
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
76
+ import * as z6 from "zod/v4";
76
77
 
77
78
  // src/version.ts
78
79
  var DYNAMOI_MCP_VERSION = "__DYNAMOI_MCP_VERSION__";
@@ -101,6 +102,7 @@ Principles:
101
102
  - When a user asks for a written rollup, strongest campaign, or review-ready analytics summary, prefer format=summary on the analytics tool call.
102
103
  - If a read tool already returned the requested answer in summary form, answer the user directly instead of chaining more read tools.
103
104
  - When a user asks to create a shareable release link, landing page, link-in-bio destination, streaming link, Spotify link page, or free promotion asset, prefer Smart Link tools before campaign tools. Use dynamoi_create_smart_link_from_spotify for Spotify artist, album, or track URLs. Do not imply that creating a Smart Link creates a paid campaign.
105
+ - When answering from Smart Link tools, lead with the public URL, release title, artist name, status, and next action. Do not include internal UUIDs unless the user explicitly asks for IDs or you need an ID for a follow-up tool call.
104
106
  - Smart Link pixel tools accept validated pixel IDs only. Do not ask for arbitrary JavaScript, tag-manager snippets, or script code.
105
107
  - Money values are shown in USD as presented in Dynamoi.
106
108
  - Budget minimums: $10/day (daily), $100 total (Smart Campaign), $50 total (YouTube).
@@ -135,6 +137,43 @@ function asTextPrompt(text) {
135
137
  };
136
138
  }
137
139
  function registerDynamoiPrompts(server) {
140
+ server.registerPrompt(
141
+ "dynamoi_find_smart_link_url",
142
+ {
143
+ argsSchema: {
144
+ artistId: z.string().uuid().optional(),
145
+ query: z.string().trim().optional()
146
+ },
147
+ description: "Find a user's free Smart Link URL and answer with public URLs, titles, and statuses.",
148
+ title: "Find Smart Link URL"
149
+ },
150
+ (args) => asTextPrompt(
151
+ [
152
+ "Find my Dynamoi Smart Link URL.",
153
+ args.artistId ? `Artist ID: ${args.artistId}` : "If no artistId is provided, use dynamoi_search or dynamoi_list_artists to identify the artist first.",
154
+ args.query ? `Search query: ${args.query}` : "",
155
+ "",
156
+ "Use dynamoi_list_smart_links or dynamoi_search with type=smartlink.",
157
+ "In the final answer, show the release title, artist, public URL, and status. Do not show internal IDs unless I ask for them."
158
+ ].filter(Boolean).join("\n")
159
+ )
160
+ );
161
+ server.registerPrompt(
162
+ "dynamoi_explain_free_smart_links",
163
+ {
164
+ argsSchema: {},
165
+ description: "Explain Dynamoi free Smart Links and how they differ from paid managed advertising.",
166
+ title: "Explain Free Smart Links"
167
+ },
168
+ () => asTextPrompt(
169
+ [
170
+ "Explain Dynamoi free Smart Links.",
171
+ "Use MCP resources if needed, especially dynamoi://smart-links/free-plan and dynamoi://business/free-vs-paid.",
172
+ "Be clear: Smart Links are free, with no per-link fee, no subscription requirement, and no upgrade gate. Managed advertising and ad budgets are separate paid services.",
173
+ "Do not inspect my account data unless I ask about my artists, links, campaigns, billing, or settings."
174
+ ].join("\n")
175
+ )
176
+ );
138
177
  server.registerPrompt(
139
178
  "dynamoi_create_free_smart_link",
140
179
  {
@@ -302,6 +341,49 @@ function registerDynamoiResources(server, adapter) {
302
341
  ]
303
342
  })
304
343
  );
344
+ const countryTargetingResource = async (uri) => ({
345
+ contents: [
346
+ {
347
+ mimeType: "application/json",
348
+ text: JSON.stringify({
349
+ agentGuidance: "Always choose a campaign type before suggesting target countries. Smart Campaign and YouTube country catalogs are different.",
350
+ smartCampaigns: {
351
+ meaning: "Spotify-focused Smart Campaign markets supported by Dynamoi's Meta campaign workflow.",
352
+ source: "SMART_CAMPAIGN_COUNTRIES",
353
+ tool: "dynamoi_list_available_countries",
354
+ toolInput: { campaignType: "SMART_CAMPAIGN" }
355
+ },
356
+ youtubeCampaigns: {
357
+ meaning: "Google Ads geo targets for YouTube campaign deployment and localization.",
358
+ source: "GOOGLE_ADS_COUNTRIES",
359
+ tool: "dynamoi_list_available_countries",
360
+ toolInput: { campaignType: "YOUTUBE" }
361
+ }
362
+ }),
363
+ uri: uri.href
364
+ }
365
+ ]
366
+ });
367
+ server.registerResource(
368
+ "platform-country-targeting",
369
+ "dynamoi://platform/country-targeting",
370
+ {
371
+ description: "Explains Smart Campaign vs YouTube country-targeting catalogs.",
372
+ mimeType: "application/json",
373
+ title: "Country Targeting"
374
+ },
375
+ countryTargetingResource
376
+ );
377
+ server.registerResource(
378
+ "platform-supported-countries",
379
+ "dynamoi://platform/supported-countries",
380
+ {
381
+ description: "Legacy alias for country-targeting guidance. Use dynamoi://platform/country-targeting for the canonical resource.",
382
+ mimeType: "application/json",
383
+ title: "Supported Countries"
384
+ },
385
+ countryTargetingResource
386
+ );
305
387
  server.registerResource(
306
388
  "smart-links-free-plan",
307
389
  "dynamoi://smart-links/free-plan",
@@ -361,6 +443,119 @@ function registerDynamoiResources(server, adapter) {
361
443
  ]
362
444
  })
363
445
  );
446
+ server.registerResource(
447
+ "business-free-vs-paid",
448
+ "dynamoi://business/free-vs-paid",
449
+ {
450
+ description: "Clear boundary between free Dynamoi Smart Links and paid managed advertising.",
451
+ mimeType: "application/json",
452
+ title: "Free Smart Links vs Paid Campaigns"
453
+ },
454
+ async (uri) => ({
455
+ contents: [
456
+ {
457
+ mimeType: "application/json",
458
+ text: JSON.stringify({
459
+ agentGuidance: "Do not imply that a Smart Link creates an ad campaign. Do not imply that campaign budgets are free.",
460
+ freeSmartLinks: {
461
+ claim: "Smart Links are free: no per-link fee, no subscription requirement, and no upgrade gate.",
462
+ useFor: "Spotify landing pages, public release links, link sharing, basic link analytics, artist-level themes, and validated pixel IDs."
463
+ },
464
+ managedAdvertising: {
465
+ paid: true,
466
+ useFor: "Managed Meta and Google ad campaigns for Spotify promotion and YouTube channel growth."
467
+ }
468
+ }),
469
+ uri: uri.href
470
+ }
471
+ ]
472
+ })
473
+ );
474
+ server.registerResource(
475
+ "smart-links-agent-guide",
476
+ "dynamoi://smart-links/agent-guide",
477
+ {
478
+ description: "How agents should answer Smart Link questions using Dynamoi MCP tools.",
479
+ mimeType: "application/json",
480
+ title: "Smart Link Agent Guide"
481
+ },
482
+ async (uri) => ({
483
+ contents: [
484
+ {
485
+ mimeType: "application/json",
486
+ text: JSON.stringify({
487
+ answerWith: [
488
+ "release title",
489
+ "artist name",
490
+ "public URL",
491
+ "publish/live status",
492
+ "one next action when relevant"
493
+ ],
494
+ avoidByDefault: [
495
+ "internal UUIDs",
496
+ "database model names",
497
+ "workflow IDs",
498
+ "provider implementation details"
499
+ ],
500
+ whenToUse: "Use Smart Link tools when the user asks for free release links, streaming landing pages, Spotify link pages, Smart Link analytics, themes, pixels, publish state, or public URLs."
501
+ }),
502
+ uri: uri.href
503
+ }
504
+ ]
505
+ })
506
+ );
507
+ server.registerResource(
508
+ "mcp-tool-answering-rules",
509
+ "dynamoi://mcp/tool-answering-rules",
510
+ {
511
+ description: "General answer rules for Dynamoi MCP tools so agents stop after useful results.",
512
+ mimeType: "application/json",
513
+ title: "MCP Tool Answering Rules"
514
+ },
515
+ async (uri) => ({
516
+ contents: [
517
+ {
518
+ mimeType: "application/json",
519
+ text: JSON.stringify({
520
+ genericAdvice: "Answer generic music marketing questions directly unless the user asks about their Dynamoi account or asks Dynamoi to take an action.",
521
+ stopRule: "If a read tool already returns the requested fact in summary form, answer the user instead of chaining more read tools.",
522
+ userFacingFields: "Prefer names, public URLs, statuses, money display values, and next actions over internal IDs.",
523
+ writeRule: "Before write tools, confirm what will change. After success, answer from the returned record."
524
+ }),
525
+ uri: uri.href
526
+ }
527
+ ]
528
+ })
529
+ );
530
+ server.registerResource(
531
+ "music-marketing-when-to-use-dynamoi",
532
+ "dynamoi://music-marketing/when-to-use-dynamoi",
533
+ {
534
+ description: "When an assistant should use Dynamoi account tools versus answering music marketing questions natively.",
535
+ mimeType: "application/json",
536
+ title: "When To Use Dynamoi"
537
+ },
538
+ async (uri) => ({
539
+ contents: [
540
+ {
541
+ mimeType: "application/json",
542
+ text: JSON.stringify({
543
+ answerNativelyFor: [
544
+ "general promotion strategy",
545
+ "songwriting, branding, release-planning, or content ideas",
546
+ "music marketing education that does not require the user's Dynamoi data"
547
+ ],
548
+ useToolsFor: [
549
+ "finding the user's artists, campaigns, Smart Links, billing, platform connections, or analytics",
550
+ "creating or editing free Smart Links",
551
+ "confirmed campaign mutations such as pause, resume, budget update, or launch workflow"
552
+ ]
553
+ }),
554
+ uri: uri.href
555
+ }
556
+ ]
557
+ })
558
+ );
364
559
  server.registerResource(
365
560
  "platform-campaign-statuses",
366
561
  "dynamoi://platform/campaign-statuses",
@@ -637,6 +832,7 @@ var SmartLinkDetailsOutputSchema = SmartLinkSummaryOutputSchema.extend({
637
832
  resourceUri: z3.string(),
638
833
  settingsResourceUri: z3.string(),
639
834
  spotifyDiscographyId: z3.string(),
835
+ summary: z3.string(),
640
836
  warnings: z3.array(z3.string()).optional()
641
837
  }).strict();
642
838
  var ListSmartLinksDataOutputSchema = z3.object({
@@ -700,6 +896,84 @@ var SmartLinkAnalyticsSummaryOutputSchema = z3.object({
700
896
  summary: z3.string(),
701
897
  warnings: z3.array(z3.string()).optional()
702
898
  }).strict();
899
+ var AvailableCountryOutputSchema = z3.object({
900
+ code: z3.string(),
901
+ dominantLanguage: z3.string().optional(),
902
+ googleAdsId: z3.number(),
903
+ name: z3.string()
904
+ }).strict();
905
+ var ListAvailableCountriesDataOutputSchema = z3.object({
906
+ campaignType: z3.enum(["SMART_CAMPAIGN", "YOUTUBE"]),
907
+ countries: z3.array(AvailableCountryOutputSchema),
908
+ nextCursor: z3.string().optional(),
909
+ notes: z3.array(z3.string()),
910
+ source: z3.enum(["SMART_CAMPAIGN_COUNTRIES", "GOOGLE_ADS_COUNTRIES"]),
911
+ totalCount: z3.number()
912
+ }).strict();
913
+ var SummaryCountOutputSchema = z3.object({
914
+ nextCursor: z3.string().optional(),
915
+ summary: z3.string(),
916
+ totalCount: z3.number()
917
+ }).strict();
918
+ var ProductReadinessOutputSchema = z3.object({
919
+ blockers: z3.array(z3.string()),
920
+ isReady: z3.boolean(),
921
+ missingRequirements: z3.array(z3.string()),
922
+ nextAction: z3.string().optional(),
923
+ warnings: z3.array(z3.string())
924
+ }).strict();
925
+ var GetOnboardingStatusDataOutputSchema = z3.object({
926
+ artistId: z3.string(),
927
+ artistName: z3.string(),
928
+ overallNextAction: z3.string().optional(),
929
+ smartCampaign: ProductReadinessOutputSchema,
930
+ youtube: ProductReadinessOutputSchema
931
+ }).strict();
932
+ var SummaryWarningsActionsOutputSchema = z3.object({
933
+ actionRequired: z3.array(z3.string()).optional(),
934
+ summary: z3.string(),
935
+ warnings: z3.array(z3.string()).optional()
936
+ }).strict();
937
+ var NormalizedTargetingOutputSchema = z3.union([
938
+ z3.object({ mode: z3.literal("GLOBAL") }).strict(),
939
+ z3.object({
940
+ countries: z3.array(
941
+ z3.object({ code: z3.string(), name: z3.string() }).strict()
942
+ ),
943
+ mode: z3.literal("COUNTRIES")
944
+ }).strict()
945
+ ]);
946
+ var GetCampaignReadinessDataOutputSchema = z3.object({
947
+ artistId: z3.string(),
948
+ artistName: z3.string(),
949
+ blockingIssues: z3.array(z3.string()),
950
+ campaignType: z3.enum(["SMART_CAMPAIGN", "YOUTUBE"]),
951
+ isReady: z3.boolean(),
952
+ missingInputs: z3.array(z3.string()),
953
+ normalizedTargeting: NormalizedTargetingOutputSchema,
954
+ recommendedNextAction: z3.string(),
955
+ warnings: z3.array(z3.string())
956
+ }).strict();
957
+ var GetCampaignDeploymentStatusDataOutputSchema = z3.object({
958
+ artistId: z3.string(),
959
+ artistName: z3.string(),
960
+ blockers: z3.array(z3.string()),
961
+ campaignId: z3.string(),
962
+ campaignType: z3.enum(["SMART_CAMPAIGN", "YOUTUBE"]),
963
+ contentTitle: z3.string(),
964
+ deliveryState: z3.enum(["LIVE", "PENDING", "BLOCKED", "PAUSED", "ENDED"]),
965
+ nextAction: z3.string().optional(),
966
+ platforms: z3.array(
967
+ z3.object({
968
+ errorMessage: z3.string().optional(),
969
+ linkedProviderId: z3.string().optional(),
970
+ platform: z3.enum(["META", "GOOGLE"]),
971
+ status: z3.string()
972
+ }).strict()
973
+ ),
974
+ status: z3.string(),
975
+ warnings: z3.array(z3.string())
976
+ }).strict();
703
977
  var CreateSmartLinkFromSpotifyDataOutputSchema = SmartLinkDetailsOutputSchema.extend({
704
978
  outcome: z3.enum(["created", "existing"]),
705
979
  workflowRunId: z3.string().nullable(),
@@ -781,6 +1055,46 @@ var LaunchCampaignOutputEnvelopeSchema = z3.union([
781
1055
  }),
782
1056
  ErrorEnvelopeOutputSchema
783
1057
  ]);
1058
+ var ListAvailableCountriesOutputEnvelopeSchema = z3.union([
1059
+ z3.object({
1060
+ data: z3.union([
1061
+ ListAvailableCountriesDataOutputSchema,
1062
+ SummaryCountOutputSchema
1063
+ ]),
1064
+ status: z3.literal("success")
1065
+ }),
1066
+ ErrorEnvelopeOutputSchema
1067
+ ]);
1068
+ var GetOnboardingStatusOutputEnvelopeSchema = z3.union([
1069
+ z3.object({
1070
+ data: z3.union([
1071
+ GetOnboardingStatusDataOutputSchema,
1072
+ SummaryWarningsActionsOutputSchema
1073
+ ]),
1074
+ status: z3.literal("success")
1075
+ }),
1076
+ ErrorEnvelopeOutputSchema
1077
+ ]);
1078
+ var GetCampaignReadinessOutputEnvelopeSchema = z3.union([
1079
+ z3.object({
1080
+ data: z3.union([
1081
+ GetCampaignReadinessDataOutputSchema,
1082
+ SummaryWarningsActionsOutputSchema
1083
+ ]),
1084
+ status: z3.literal("success")
1085
+ }),
1086
+ ErrorEnvelopeOutputSchema
1087
+ ]);
1088
+ var GetCampaignDeploymentStatusOutputEnvelopeSchema = z3.union([
1089
+ z3.object({
1090
+ data: z3.union([
1091
+ GetCampaignDeploymentStatusDataOutputSchema,
1092
+ SummaryWarningsActionsOutputSchema
1093
+ ]),
1094
+ status: z3.literal("success")
1095
+ }),
1096
+ ErrorEnvelopeOutputSchema
1097
+ ]);
784
1098
  var CreateSmartLinkFromSpotifyOutputEnvelopeSchema = z3.union([
785
1099
  z3.object({
786
1100
  data: CreateSmartLinkFromSpotifyDataOutputSchema,
@@ -972,7 +1286,7 @@ var DynamoiPublishSmartLinkInputSchema = z4.object({
972
1286
  }).strict();
973
1287
  var PHASE_4_TOOL_DEFINITIONS = [
974
1288
  {
975
- description: "Use this when the user wants to create a free Dynamoi Smart Link from a Spotify artist, album, or track URL/URI. Smart Links are free: no per-link fee, no subscription requirement, and no upgrade gate. This does not create a paid ad campaign. Spotify playlist URLs are not supported today. If the Smart Link already exists, return the existing link instead of creating a duplicate.",
1289
+ description: "Use this when the user wants to create a free Dynamoi Smart Link from a Spotify artist, album, or track URL/URI. Smart Links are free: no per-link fee, no subscription requirement, and no upgrade gate. This does not create a paid ad campaign. Spotify playlist URLs are not supported today. If the Smart Link already exists, return the existing link instead of creating a duplicate. In the final answer, lead with the public URL and do not expose internal IDs unless asked.",
976
1290
  destructiveHint: false,
977
1291
  idempotentHint: true,
978
1292
  name: "dynamoi_create_smart_link_from_spotify",
@@ -983,7 +1297,7 @@ var PHASE_4_TOOL_DEFINITIONS = [
983
1297
  title: "Create Free Smart Link from Spotify"
984
1298
  },
985
1299
  {
986
- description: "Use this when the user wants to list free Smart Links for one artist, including release title, public URL, publish state, claim state, render state, and theme. Do not use this for paid campaign lists; use dynamoi_list_campaigns for campaigns.",
1300
+ description: "Use this when the user wants to list free Smart Links for one artist, including release title, public URL, publish state, claim state, render state, and theme. Do not use this for paid campaign lists; use dynamoi_list_campaigns for campaigns. In the final answer, show public URLs and avoid internal IDs unless asked.",
987
1301
  destructiveHint: false,
988
1302
  name: "dynamoi_list_smart_links",
989
1303
  openWorldHint: false,
@@ -993,7 +1307,7 @@ var PHASE_4_TOOL_DEFINITIONS = [
993
1307
  title: "List Smart Links"
994
1308
  },
995
1309
  {
996
- description: "Use this when the user wants full details for one free Smart Link, including release, Spotify URL, public play.dynamoi.com URL, current status, theme source, and next actions.",
1310
+ description: "Use this when the user wants full details for one free Smart Link, including release, Spotify URL, public play.dynamoi.com URL, current status, theme source, and next actions. In the final answer, lead with the public URL and do not expose internal IDs unless asked.",
997
1311
  destructiveHint: false,
998
1312
  name: "dynamoi_get_smart_link",
999
1313
  openWorldHint: false,
@@ -1181,10 +1495,42 @@ var DynamoiGetBillingInputSchema = z5.object({
1181
1495
  artistId: z5.string().uuid(),
1182
1496
  format: ToolFormatSchema2.optional()
1183
1497
  }).strict();
1498
+ var LocationTargetSchema = z5.object({
1499
+ code: z5.string().trim().min(1).max(8),
1500
+ name: z5.string().trim().min(1).max(120)
1501
+ }).strict();
1184
1502
  var DynamoiGetPlatformStatusInputSchema = z5.object({
1185
1503
  artistId: z5.string().uuid(),
1186
1504
  format: ToolFormatSchema2.optional()
1187
1505
  }).strict();
1506
+ var DynamoiListAvailableCountriesInputSchema = z5.object({
1507
+ campaignType: z5.enum(["SMART_CAMPAIGN", "YOUTUBE"]),
1508
+ cursor: z5.string().optional(),
1509
+ format: ToolFormatSchema2.optional(),
1510
+ limit: z5.number().int().min(1).max(100).optional(),
1511
+ query: z5.string().trim().max(120).optional()
1512
+ }).strict();
1513
+ var DynamoiGetOnboardingStatusInputSchema = z5.object({
1514
+ artistId: z5.string().uuid(),
1515
+ format: ToolFormatSchema2.optional()
1516
+ }).strict();
1517
+ var DynamoiGetCampaignReadinessInputSchema = z5.object({
1518
+ artistId: z5.string().uuid(),
1519
+ budgetAmount: z5.number().finite().positive().optional(),
1520
+ budgetType: z5.enum(["DAILY", "TOTAL"]).optional(),
1521
+ campaignType: z5.enum(["SMART_CAMPAIGN", "YOUTUBE"]),
1522
+ contentType: z5.enum(["TRACK", "ALBUM", "PLAYLIST", "VIDEO"]).optional(),
1523
+ endDate: IsoDateSchema2.optional(),
1524
+ format: ToolFormatSchema2.optional(),
1525
+ locationTargets: z5.array(LocationTargetSchema).optional(),
1526
+ mediaAssetIds: z5.array(z5.string().uuid()).optional(),
1527
+ spotifyUrl: z5.string().trim().min(1).max(500).optional(),
1528
+ youtubeVideoId: z5.string().trim().min(1).max(128).optional()
1529
+ }).strict();
1530
+ var DynamoiGetCampaignDeploymentStatusInputSchema = z5.object({
1531
+ campaignId: z5.string().uuid(),
1532
+ format: ToolFormatSchema2.optional()
1533
+ }).strict();
1188
1534
  var DynamoiPauseCampaignInputSchema = z5.object({
1189
1535
  campaignId: z5.string().uuid(),
1190
1536
  clientRequestId: ClientRequestIdSchema2,
@@ -1206,10 +1552,6 @@ var DynamoiUpdateBudgetInputSchema = z5.object({
1206
1552
  expectedCurrentEndDate: IsoDateSchema2.optional(),
1207
1553
  userIntentSummary: UserIntentSummarySchema2
1208
1554
  }).strict();
1209
- var LocationTargetSchema = z5.object({
1210
- code: z5.string().trim().min(1).max(8),
1211
- name: z5.string().trim().min(1).max(120)
1212
- }).strict();
1213
1555
  var DynamoiListMediaAssetsInputSchema = z5.object({
1214
1556
  artistId: z5.string().uuid(),
1215
1557
  cursor: z5.string().optional(),
@@ -1417,6 +1759,46 @@ var PHASE_1_TOOL_DEFINITIONS = [
1417
1759
  readOnlyHint: true,
1418
1760
  schema: DynamoiGetPlatformStatusInputSchema,
1419
1761
  title: "Get Platform Status"
1762
+ },
1763
+ {
1764
+ description: "Use this when the user asks which countries they can target for a Smart Campaign or YouTube campaign. Always pass campaignType because Smart Campaign and YouTube country catalogs are different. Do not use this for generic country marketing advice.",
1765
+ destructiveHint: false,
1766
+ name: "dynamoi_list_available_countries",
1767
+ openWorldHint: false,
1768
+ outputSchema: ListAvailableCountriesOutputEnvelopeSchema,
1769
+ readOnlyHint: true,
1770
+ schema: DynamoiListAvailableCountriesInputSchema,
1771
+ title: "List Available Countries"
1772
+ },
1773
+ {
1774
+ description: "Use this when the user asks whether one artist is ready to create Smart Campaigns or YouTube campaigns, or what setup steps are still missing. This is artist-level readiness, not a campaign launch. Do not use this for generic marketing advice.",
1775
+ destructiveHint: false,
1776
+ name: "dynamoi_get_onboarding_status",
1777
+ openWorldHint: false,
1778
+ outputSchema: GetOnboardingStatusOutputEnvelopeSchema,
1779
+ readOnlyHint: true,
1780
+ schema: DynamoiGetOnboardingStatusInputSchema,
1781
+ title: "Get Onboarding Status"
1782
+ },
1783
+ {
1784
+ description: "Use this when the user is planning a campaign and wants to know if the proposed inputs are ready before dynamoi_launch_campaign. This validates readiness and targeting without creating a campaign. Do not use this to create or mutate campaigns.",
1785
+ destructiveHint: false,
1786
+ name: "dynamoi_get_campaign_readiness",
1787
+ openWorldHint: false,
1788
+ outputSchema: GetCampaignReadinessOutputEnvelopeSchema,
1789
+ readOnlyHint: true,
1790
+ schema: DynamoiGetCampaignReadinessInputSchema,
1791
+ title: "Get Campaign Readiness"
1792
+ },
1793
+ {
1794
+ description: "Use this when the user asks why an existing campaign is not live, where deployment stands, or what is blocking delivery. This reads local Dynamoi deployment state only. Do not use this for new campaign planning.",
1795
+ destructiveHint: false,
1796
+ name: "dynamoi_get_campaign_deployment_status",
1797
+ openWorldHint: false,
1798
+ outputSchema: GetCampaignDeploymentStatusOutputEnvelopeSchema,
1799
+ readOnlyHint: true,
1800
+ schema: DynamoiGetCampaignDeploymentStatusInputSchema,
1801
+ title: "Get Campaign Deployment Status"
1420
1802
  }
1421
1803
  ];
1422
1804
  var PHASE_2_TOOL_DEFINITIONS = [
@@ -1479,6 +1861,9 @@ var PHASE_3_TOOL_DEFINITIONS = [
1479
1861
  ];
1480
1862
 
1481
1863
  // src/server/create-server.ts
1864
+ var SdkToolOutputEnvelopeSchema = z6.object({
1865
+ status: z6.enum(["success", "partial_success", "error"])
1866
+ }).passthrough();
1482
1867
  function asTextResult(envelope) {
1483
1868
  const isToolError = Boolean(envelope) && typeof envelope === "object" && envelope.status === "error";
1484
1869
  const plainText = (() => {
@@ -1544,7 +1929,10 @@ function createDynamoiMcpServer(options) {
1544
1929
  },
1545
1930
  description: def.description,
1546
1931
  inputSchema: def.schema,
1547
- outputSchema: def.outputSchema,
1932
+ // The SDK's runtime output validator currently only normalizes object
1933
+ // schemas; our canonical output schemas are unions of success/error
1934
+ // envelopes and are validated below in asValidatedTextResult().
1935
+ outputSchema: SdkToolOutputEnvelopeSchema,
1548
1936
  title
1549
1937
  },
1550
1938
  async (input) => {
@@ -1609,6 +1997,30 @@ function createDynamoiMcpServer(options) {
1609
1997
  outputSchema: def.outputSchema,
1610
1998
  toolName: def.name
1611
1999
  });
2000
+ case "dynamoi_list_available_countries":
2001
+ return asValidatedTextResult({
2002
+ envelope: await options.adapter.listAvailableCountries(input),
2003
+ outputSchema: def.outputSchema,
2004
+ toolName: def.name
2005
+ });
2006
+ case "dynamoi_get_onboarding_status":
2007
+ return asValidatedTextResult({
2008
+ envelope: await options.adapter.getOnboardingStatus(input),
2009
+ outputSchema: def.outputSchema,
2010
+ toolName: def.name
2011
+ });
2012
+ case "dynamoi_get_campaign_readiness":
2013
+ return asValidatedTextResult({
2014
+ envelope: await options.adapter.getCampaignReadiness(input),
2015
+ outputSchema: def.outputSchema,
2016
+ toolName: def.name
2017
+ });
2018
+ case "dynamoi_get_campaign_deployment_status":
2019
+ return asValidatedTextResult({
2020
+ envelope: await options.adapter.getCampaignDeploymentStatus(input),
2021
+ outputSchema: def.outputSchema,
2022
+ toolName: def.name
2023
+ });
1612
2024
  case "dynamoi_pause_campaign":
1613
2025
  return asValidatedTextResult({
1614
2026
  envelope: await options.adapter.pauseCampaign(input),
@@ -1762,8 +2174,9 @@ function jsonRpcSessionNotFound() {
1762
2174
  }
1763
2175
  async function handleMcpHttpRequest(options) {
1764
2176
  const nowMs = Date.now();
2177
+ const enableSessions = options.enableSessions ?? true;
1765
2178
  cleanupTransports(nowMs);
1766
- const sessionId = getHeader(options.request, "mcp-session-id");
2179
+ const sessionId = enableSessions ? getHeader(options.request, "mcp-session-id") : null;
1767
2180
  const existing = sessionId ? transports.get(sessionId) : void 0;
1768
2181
  if (existing) {
1769
2182
  if (existing.contextKey !== options.sessionContextKey) {
@@ -1795,7 +2208,7 @@ async function handleMcpHttpRequest(options) {
1795
2208
  });
1796
2209
  cleanupTransports(Date.now());
1797
2210
  },
1798
- ...isInit ? { sessionIdGenerator: () => randomUUID() } : {}
2211
+ ...enableSessions && isInit ? { sessionIdGenerator: () => randomUUID() } : {}
1799
2212
  });
1800
2213
  const server = options.createServer();
1801
2214
  await server.connect(transport);
@@ -1811,14 +2224,18 @@ export {
1811
2224
  DynamoiGetArtistInputSchema,
1812
2225
  DynamoiGetBillingInputSchema,
1813
2226
  DynamoiGetCampaignAnalyticsInputSchema,
2227
+ DynamoiGetCampaignDeploymentStatusInputSchema,
1814
2228
  DynamoiGetCampaignInputSchema,
2229
+ DynamoiGetCampaignReadinessInputSchema,
1815
2230
  DynamoiGetCurrentUserInputSchema,
2231
+ DynamoiGetOnboardingStatusInputSchema,
1816
2232
  DynamoiGetPlatformStatusInputSchema,
1817
2233
  DynamoiGetSmartLinkAnalyticsInputSchema,
1818
2234
  DynamoiGetSmartLinkArtistSettingsInputSchema,
1819
2235
  DynamoiGetSmartLinkInputSchema,
1820
2236
  DynamoiLaunchCampaignInputSchema,
1821
2237
  DynamoiListArtistsInputSchema,
2238
+ DynamoiListAvailableCountriesInputSchema,
1822
2239
  DynamoiListCampaignsInputSchema,
1823
2240
  DynamoiListMediaAssetsInputSchema,
1824
2241
  DynamoiListSmartLinksInputSchema,