@dynamoi/mcp 0.6.4 → 0.7.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.
Files changed (63) hide show
  1. package/CAPABILITY_PARITY.md +60 -0
  2. package/CHANGELOG.md +37 -1
  3. package/README.md +25 -7
  4. package/dist/auth/protected-resource.d.ts +34 -5
  5. package/dist/auth/protected-resource.d.ts.map +1 -0
  6. package/dist/auth/protected-resource.js +10 -4
  7. package/dist/auth/protected-resource.js.map +9 -1
  8. package/dist/auth/verify-token.d.ts +21 -0
  9. package/dist/auth/verify-token.d.ts.map +1 -0
  10. package/dist/chunk-2jm8hjsz.js +96 -0
  11. package/dist/chunk-2jm8hjsz.js.map +10 -0
  12. package/dist/chunk-kb3xpcrb.js +9 -0
  13. package/dist/chunk-kb3xpcrb.js.map +10 -0
  14. package/dist/consent.d.ts +4 -0
  15. package/dist/consent.d.ts.map +1 -0
  16. package/dist/consent.js +13 -0
  17. package/dist/consent.js.map +9 -0
  18. package/dist/flow-types.d.ts +160 -0
  19. package/dist/flow-types.d.ts.map +1 -0
  20. package/dist/index.d.ts +14 -2464
  21. package/dist/index.d.ts.map +1 -0
  22. package/dist/index.js +1592 -1408
  23. package/dist/index.js.map +26 -1
  24. package/dist/readiness-types.d.ts +88 -0
  25. package/dist/readiness-types.d.ts.map +1 -0
  26. package/dist/server/create-server.d.ts +84 -0
  27. package/dist/server/create-server.d.ts.map +1 -0
  28. package/dist/server/distribution-tools.d.ts +72 -0
  29. package/dist/server/distribution-tools.d.ts.map +1 -0
  30. package/dist/server/instructions.d.ts +3 -0
  31. package/dist/server/instructions.d.ts.map +1 -0
  32. package/dist/server/onboarding-tool-definitions.d.ts +56 -0
  33. package/dist/server/onboarding-tool-definitions.d.ts.map +1 -0
  34. package/dist/server/openai-tools.d.ts +88 -0
  35. package/dist/server/openai-tools.d.ts.map +1 -0
  36. package/dist/server/output-schemas.d.ts +122 -0
  37. package/dist/server/output-schemas.d.ts.map +1 -0
  38. package/dist/server/playbook-resources.d.ts +3 -0
  39. package/dist/server/playbook-resources.d.ts.map +1 -0
  40. package/dist/server/prompts.d.ts +3 -0
  41. package/dist/server/prompts.d.ts.map +1 -0
  42. package/dist/server/resources.d.ts +4 -0
  43. package/dist/server/resources.d.ts.map +1 -0
  44. package/dist/server/shared-schemas.d.ts +14 -0
  45. package/dist/server/shared-schemas.d.ts.map +1 -0
  46. package/dist/server/smart-link-theme-preview.d.ts +48 -0
  47. package/dist/server/smart-link-theme-preview.d.ts.map +1 -0
  48. package/dist/server/smart-link-tools.d.ts +346 -0
  49. package/dist/server/smart-link-tools.d.ts.map +1 -0
  50. package/dist/server/tools.d.ts +878 -0
  51. package/dist/server/tools.d.ts.map +1 -0
  52. package/dist/server/workflow-tools.d.ts +93 -0
  53. package/dist/server/workflow-tools.d.ts.map +1 -0
  54. package/dist/transport/http.d.ts +9 -0
  55. package/dist/transport/http.d.ts.map +1 -0
  56. package/dist/types.d.ts +469 -0
  57. package/dist/types.d.ts.map +1 -0
  58. package/dist/version.d.ts +2 -0
  59. package/dist/version.d.ts.map +1 -0
  60. package/package.json +19 -9
  61. package/server.json +3 -3
  62. package/dist/chunk-CHQUK72A.js +0 -35
  63. package/dist/chunk-CHQUK72A.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,12 +1,252 @@
1
1
  import {
2
+ DYNAMOI_BETTER_AUTH_MCP_SCOPES,
2
3
  DYNAMOI_MCP_SCOPES,
4
+ DYNAMOI_MCP_TOOL_SCOPES,
3
5
  buildProtectedResourceMetadata,
4
6
  buildWwwAuthenticateHeader
5
- } from "./chunk-CHQUK72A.js";
7
+ } from "./chunk-2jm8hjsz.js";
8
+ import {
9
+ PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY,
10
+ PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY_HASH,
11
+ PROSPECTIVE_BUDGET_FUNDING_CONSENT_VERSION
12
+ } from "./chunk-kb3xpcrb.js";
13
+
14
+ // src/server/distribution-tools.ts
15
+ import * as z2 from "zod/v4";
6
16
 
17
+ // src/server/output-schemas.ts
18
+ import * as z from "zod/v4";
19
+ var MoneyDisplayOutputSchema = z.object({
20
+ amountUsd: z.number(),
21
+ formatted: z.string()
22
+ }).strict();
23
+ function createOutputEnvelopeSchema(dataSchema, options) {
24
+ const statuses = options?.allowPartial ? ["success", "partial_success", "error"] : ["success", "error"];
25
+ return z.object({
26
+ data: dataSchema.optional(),
27
+ kind: z.enum(["validation", "business", "platform", "unknown"]).optional(),
28
+ message: z.string().optional(),
29
+ status: z.enum(statuses)
30
+ }).strict().superRefine((value, context) => {
31
+ if (value.status === "error" && !value.message) {
32
+ context.addIssue({
33
+ code: "custom",
34
+ message: "Error tool results require a message.",
35
+ path: ["message"]
36
+ });
37
+ }
38
+ if (value.status !== "error" && value.data === undefined) {
39
+ context.addIssue({
40
+ code: "custom",
41
+ message: "Successful tool results require data.",
42
+ path: ["data"]
43
+ });
44
+ }
45
+ });
46
+ }
47
+ var AnyToolDataOutputSchema = z.object({}).passthrough();
48
+ var MediaAssetSummaryOutputSchema = z.object({
49
+ aspectRatio: z.string().optional(),
50
+ createdAt: z.string(),
51
+ fileName: z.string().optional(),
52
+ fileType: z.string(),
53
+ height: z.number().optional(),
54
+ id: z.string(),
55
+ url: z.string().optional(),
56
+ urlExpiresAt: z.string().optional(),
57
+ width: z.number().optional()
58
+ }).strict();
59
+ var ListMediaAssetsDataOutputSchema = z.object({
60
+ assets: z.array(MediaAssetSummaryOutputSchema),
61
+ nextCursor: z.string().optional()
62
+ }).strict();
63
+ var ListMediaAssetsSummaryOutputSchema = z.object({
64
+ nextCursor: z.string().optional(),
65
+ summary: z.string(),
66
+ totalCount: z.number()
67
+ }).strict();
68
+ var SmartLinkStatusSchemas = {
69
+ claimStatus: z.enum([
70
+ "auto_approved",
71
+ "pending_ops_review",
72
+ "verification_deferred",
73
+ "approved_by_ops",
74
+ "rejected"
75
+ ]),
76
+ odesliStatus: z.enum(["pending", "resolved", "failed"]),
77
+ publishState: z.enum(["published", "unpublished"]),
78
+ renderState: z.enum(["queued", "rendering", "rendered", "failed"]),
79
+ takedownStatus: z.enum(["none", "active", "resolved"]),
80
+ theme: z.enum(["classic", "brutalist", "aurora", "cinematic"])
81
+ };
82
+ var SmartLinkSummaryOutputSchema = z.object({
83
+ artistHubUrl: z.string(),
84
+ artistId: z.string(),
85
+ artistName: z.string(),
86
+ claimStatus: SmartLinkStatusSchemas.claimStatus,
87
+ createdAt: z.string(),
88
+ id: z.string(),
89
+ isPublic: z.boolean(),
90
+ localizedPublicUrls: z.array(z.string()).optional(),
91
+ odesliStatus: SmartLinkStatusSchemas.odesliStatus,
92
+ publicUrl: z.string(),
93
+ publishState: SmartLinkStatusSchemas.publishState,
94
+ releaseSlug: z.string(),
95
+ releaseTitle: z.string(),
96
+ releaseType: z.string(),
97
+ renderState: SmartLinkStatusSchemas.renderState,
98
+ spotifyUrl: z.string().nullable(),
99
+ takedownStatus: SmartLinkStatusSchemas.takedownStatus,
100
+ theme: SmartLinkStatusSchemas.theme,
101
+ updatedAt: z.string()
102
+ }).strict();
103
+ var SmartLinkDetailsOutputSchema = SmartLinkSummaryOutputSchema.extend({
104
+ actionRequired: z.array(z.string()).optional(),
105
+ customDescription: z.string().nullable(),
106
+ nextActions: z.array(z.string()),
107
+ originalSpotifyUrl: z.string().nullable(),
108
+ summary: z.string(),
109
+ warnings: z.array(z.string()).optional()
110
+ }).strict();
111
+ var ListSmartLinksDataOutputSchema = z.object({
112
+ nextCursor: z.string().optional(),
113
+ smartLinks: z.array(SmartLinkSummaryOutputSchema)
114
+ }).strict();
115
+ var ListSmartLinksSummaryOutputSchema = z.object({
116
+ nextCursor: z.string().optional(),
117
+ summary: z.string(),
118
+ totalCount: z.number()
119
+ }).strict();
120
+ var AvailableCountryOutputSchema = z.object({
121
+ code: z.string(),
122
+ dominantLanguage: z.string().optional(),
123
+ googleAdsId: z.number(),
124
+ name: z.string()
125
+ }).strict();
126
+ var ListAvailableCountriesDataOutputSchema = z.object({
127
+ campaignType: z.enum(["SMART_CAMPAIGN", "YOUTUBE"]),
128
+ countries: z.array(AvailableCountryOutputSchema),
129
+ nextCursor: z.string().optional(),
130
+ notes: z.array(z.string()),
131
+ source: z.enum(["SMART_CAMPAIGN_COUNTRIES", "GOOGLE_ADS_COUNTRIES"]),
132
+ totalCount: z.number()
133
+ }).strict();
134
+ var SummaryCountOutputSchema = z.object({
135
+ nextCursor: z.string().optional(),
136
+ summary: z.string(),
137
+ totalCount: z.number()
138
+ }).strict();
139
+ var SummaryWarningsActionsOutputSchema = z.object({
140
+ actionRequired: z.array(z.string()).optional(),
141
+ summary: z.string(),
142
+ warnings: z.array(z.string()).optional()
143
+ }).strict();
144
+ var NormalizedTargetingOutputSchema = z.union([
145
+ z.object({ mode: z.literal("GLOBAL") }).strict(),
146
+ z.object({
147
+ countries: z.array(z.object({ code: z.string(), name: z.string() }).strict()),
148
+ mode: z.literal("COUNTRIES")
149
+ }).strict()
150
+ ]);
151
+ var GetCampaignReadinessDataOutputSchema = z.object({
152
+ artistId: z.string(),
153
+ artistName: z.string(),
154
+ blockingIssues: z.array(z.string()),
155
+ campaignType: z.enum(["SMART_CAMPAIGN", "YOUTUBE"]),
156
+ isReady: z.boolean(),
157
+ missingInputs: z.array(z.string()),
158
+ normalizedTargeting: NormalizedTargetingOutputSchema,
159
+ recommendedNextAction: z.string(),
160
+ warnings: z.array(z.string())
161
+ }).strict();
162
+ var CreateSmartLinkFromSpotifyDataOutputSchema = SmartLinkDetailsOutputSchema.extend({
163
+ outcome: z.enum(["created", "existing"]),
164
+ workflowWarning: z.string().nullable()
165
+ }).strict();
166
+ var CreateSmartLinksFromSpotifyArtistDataOutputSchema = z.object({
167
+ artistCreatedFromSpotify: z.boolean().optional(),
168
+ artistHubUrl: z.string(),
169
+ artistId: z.string(),
170
+ artistName: z.string(),
171
+ catalogImportStatus: z.enum(["started", "start_failed"]),
172
+ currentSmartLinkCount: z.number(),
173
+ existingCount: z.number(),
174
+ initialSmartLink: SmartLinkSummaryOutputSchema.nullable(),
175
+ newlyAvailableCount: z.number(),
176
+ nextActions: z.array(z.string()),
177
+ smartLinks: z.array(SmartLinkSummaryOutputSchema),
178
+ spotifyArtistUrl: z.string(),
179
+ summary: z.string(),
180
+ warnings: z.array(z.string()).optional()
181
+ }).strict();
182
+ var LaunchCampaignDataOutputSchema = z.object({
183
+ budget: MoneyDisplayOutputSchema,
184
+ budgetType: z.enum(["DAILY", "TOTAL"]),
185
+ campaignType: z.enum(["SMART_CAMPAIGN", "YOUTUBE"]),
186
+ contentTitle: z.string(),
187
+ deliveryState: z.enum(["ACTIVE", "PENDING_REVIEW", "CONTENT_VALIDATION"]),
188
+ id: z.string(),
189
+ isLive: z.boolean(),
190
+ nextSteps: z.array(z.string()),
191
+ platforms: z.array(z.string()),
192
+ status: z.string(),
193
+ summary: z.string(),
194
+ warnings: z.array(z.string()).optional()
195
+ }).strict();
196
+ var AnyOutputEnvelopeSchema = createOutputEnvelopeSchema(AnyToolDataOutputSchema, { allowPartial: true });
197
+ var ListMediaAssetsOutputEnvelopeSchema = createOutputEnvelopeSchema(z.union([
198
+ ListMediaAssetsDataOutputSchema,
199
+ ListMediaAssetsSummaryOutputSchema
200
+ ]));
201
+ var LaunchCampaignOutputEnvelopeSchema = createOutputEnvelopeSchema(LaunchCampaignDataOutputSchema);
202
+ var ListAvailableCountriesOutputEnvelopeSchema = createOutputEnvelopeSchema(z.union([ListAvailableCountriesDataOutputSchema, SummaryCountOutputSchema]));
203
+ var GetCampaignReadinessOutputEnvelopeSchema = createOutputEnvelopeSchema(z.union([
204
+ GetCampaignReadinessDataOutputSchema,
205
+ SummaryWarningsActionsOutputSchema
206
+ ]));
207
+ var CreateSmartLinkFromSpotifyOutputEnvelopeSchema = createOutputEnvelopeSchema(CreateSmartLinkFromSpotifyDataOutputSchema);
208
+ var CreateSmartLinksFromSpotifyArtistOutputEnvelopeSchema = createOutputEnvelopeSchema(CreateSmartLinksFromSpotifyArtistDataOutputSchema);
209
+ var ListSmartLinksOutputEnvelopeSchema = createOutputEnvelopeSchema(z.union([ListSmartLinksDataOutputSchema, ListSmartLinksSummaryOutputSchema]));
210
+
211
+ // src/server/distribution-tools.ts
212
+ var DynamoiGetDistributionApplicationInputSchema = z2.object({
213
+ artistId: z2.string().uuid()
214
+ }).strict();
215
+ var DynamoiApplyForDistributionInputSchema = z2.object({
216
+ adultSignerAttestation: z2.literal(true),
217
+ applicantCountry: z2.string().trim().length(2),
218
+ artistId: z2.string().uuid(),
219
+ confirmApplicationSubmission: z2.literal(true),
220
+ payoutCountry: z2.string().trim().length(2),
221
+ taxResidencyCountry: z2.string().trim().length(2),
222
+ userIntentSummary: z2.string().trim().min(1).max(500)
223
+ }).strict();
224
+ var DISTRIBUTION_TOOL_DEFINITIONS = [
225
+ {
226
+ description: "Use this when the user asks whether an artist qualifies for Dynamoi music distribution, wants the five application requirements, or wants the status of an existing distribution application. It checks Spotify connection, at least 1,000 Spotify followers, at least 10,000 verified Soundcharts monthly listeners, connected Facebook Page plus Instagram professional identity, and a connected YouTube channel. Meeting all five requirements permits an application but never guarantees approval. When the connection tools are available, use purpose=distribution_identity for missing Meta or YouTube identity; otherwise send the user to the distribution application in Dynamoi. Identity connections do not require advertising billing.",
227
+ destructiveHint: false,
228
+ name: "dynamoi_get_distribution_application",
229
+ openWorldHint: false,
230
+ outputSchema: AnyOutputEnvelopeSchema,
231
+ readOnlyHint: true,
232
+ schema: DynamoiGetDistributionApplicationInputSchema,
233
+ title: "Check Distribution Application"
234
+ },
235
+ {
236
+ 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 two-letter country codes, an adult signer attestation, confirmApplicationSubmission=true, and a concise userIntentSummary are required. Repeated submission is idempotent for an active application.",
237
+ destructiveHint: false,
238
+ idempotentHint: true,
239
+ name: "dynamoi_apply_for_distribution",
240
+ openWorldHint: false,
241
+ outputSchema: AnyOutputEnvelopeSchema,
242
+ readOnlyHint: false,
243
+ schema: DynamoiApplyForDistributionInputSchema,
244
+ title: "Apply for Music Distribution"
245
+ }
246
+ ];
7
247
  // src/auth/verify-token.ts
8
248
  import { createRemoteJWKSet, jwtVerify } from "jose";
9
- var jwksByUrl = /* @__PURE__ */ new Map();
249
+ var jwksByUrl = new Map;
10
250
  function getRemoteJwks(jwksUrl) {
11
251
  const existing = jwksByUrl.get(jwksUrl);
12
252
  if (existing) {
@@ -34,16 +274,14 @@ function extractScopes(payload) {
34
274
  }
35
275
  const scopes = payload["scopes"];
36
276
  if (Array.isArray(scopes)) {
37
- return scopes.filter(
38
- (scopeValue) => typeof scopeValue === "string" && scopeValue.trim().length > 0
39
- );
277
+ return scopes.filter((scopeValue) => typeof scopeValue === "string" && scopeValue.trim().length > 0);
40
278
  }
41
279
  return [];
42
280
  }
43
281
  async function verifyAccessToken(options) {
44
282
  const jwks = getRemoteJwks(options.jwksUrl);
45
283
  const verifyOptions = {
46
- algorithms: ["ES256", "RS256"],
284
+ algorithms: options.algorithms ?? ["ES256", "RS256"],
47
285
  audience: options.audienceAllowlist,
48
286
  issuer: options.issuer
49
287
  };
@@ -65,39 +303,42 @@ async function verifyAccessToken(options) {
65
303
  aud,
66
304
  clientId: extractClientId(payload),
67
305
  exp,
306
+ grantId: typeof payload["gid"] === "string" ? payload["gid"] : null,
68
307
  iss,
308
+ jti: typeof payload.jti === "string" ? payload.jti : null,
69
309
  scopes: extractScopes(payload),
310
+ sessionId: typeof payload.sid === "string" ? payload.sid : null,
70
311
  sub
71
312
  };
72
313
  }
73
-
74
314
  // src/server/create-server.ts
75
315
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
76
- import * as z8 from "zod/v4";
316
+ import * as z10 from "zod/v4";
77
317
 
78
318
  // src/version.ts
79
- var BUNDLED_DYNAMOI_MCP_VERSION = true ? "0.6.4" : "";
80
- var DYNAMOI_MCP_VERSION = BUNDLED_DYNAMOI_MCP_VERSION.length > 0 && !BUNDLED_DYNAMOI_MCP_VERSION.includes("__") ? BUNDLED_DYNAMOI_MCP_VERSION : "0.6.4";
319
+ var BUNDLED_DYNAMOI_MCP_VERSION = "0.7.0";
320
+ var DYNAMOI_MCP_VERSION = BUNDLED_DYNAMOI_MCP_VERSION.length > 0 && !BUNDLED_DYNAMOI_MCP_VERSION.includes("__") ? BUNDLED_DYNAMOI_MCP_VERSION : "0.7.0";
81
321
 
82
322
  // src/server/instructions.ts
83
323
  var DYNAMOI_MCP_INSTRUCTIONS = `
84
324
  You are operating Dynamoi's tools on behalf of the authenticated user. Dynamoi helps
85
- music artists promote on Spotify and YouTube creators grow channels through managed
86
- Meta and Google ad campaigns. Smart Links are free to create and manage. High-popularity
325
+ artists and labels create music-promotion campaigns, build Smart Links, review analytics,
326
+ and apply for music distribution. YouTube creators can grow channels through managed
327
+ Google ad campaigns. Smart Links are free to create and manage. High-popularity
87
328
  or unverifiable artist links may stay unpublished in verification hold until Dynamoi
88
329
  can verify the client relationship. Managed advertising and ad budgets are separate
89
330
  paid campaign services.
90
331
 
91
332
  === Session Start Routine ===
92
333
 
93
- When the user's first message in a Dynamoi session is account-relevant (artists, campaigns, smart links, billing, connections, launches, or "what should I do here"), call dynamoi_get_account_overview first to learn the user's state. The response includes a recommendedNextActions array and a state object \u2014 treat that array as authoritative guidance for what to ask or do next.
334
+ When the user's first message in a Dynamoi session is account-relevant (artists, campaigns, smart links, analytics, distribution, billing, connections, launches, or "what should I do here"), call dynamoi_get_account_overview first to learn the user's state. The response includes a recommendedNextActions array and a state object — treat that array as authoritative guidance for what to ask or do next.
94
335
 
95
336
  Route by state from dynamoi_get_account_overview:
96
337
 
97
338
  - state.hasAnyArtist === false: This is a brand-new user. Ask whether they are a Spotify artist, a YouTube creator, or a label/manager.
98
- - Spotify artist with a URL \u2192 call dynamoi_create_smart_links_from_spotify_artist immediately to create their free hub. Read dynamoi://playbooks/spotify-artist for scripted phrasing.
99
- - YouTube creator \u2192 read dynamoi://playbooks/youtube-creator and explain Dynamoi's revenue-per-view optimization advantage before asking whether they want to link the channel. If yes, call dynamoi_start_youtube_channel_link.
100
- - Label or manager with a roster \u2192 read dynamoi://playbooks/label-or-manager for the multi-artist setup walkthrough.
339
+ - Spotify artist with a URL → call dynamoi_create_smart_links_from_spotify_artist immediately to create their free hub. Read dynamoi://playbooks/spotify-artist for scripted phrasing.
340
+ - YouTube creator → read dynamoi://playbooks/youtube-creator and explain Dynamoi's revenue-per-view optimization advantage before asking whether they want to link the channel. If yes, call dynamoi_start_youtube_channel_link.
341
+ - Label or manager with a roster → read dynamoi://playbooks/label-or-manager for the multi-artist setup walkthrough.
101
342
 
102
343
  - state.hasAnyArtist === true && state.hasAnySmartLink === false: The fastest visible win is a free Smart Link. Offer dynamoi_create_smart_link_from_spotify (single release) or dynamoi_create_smart_links_from_spotify_artist (full catalog) before campaign tools.
103
344
 
@@ -109,7 +350,7 @@ Route by state from dynamoi_get_account_overview:
109
350
 
110
351
  - state.hasAnyArtist === true && state.hasAnyConnectedYoutube === false and the user wants YouTube growth: offer dynamoi_start_youtube_channel_link, then poll dynamoi_get_platform_status for the target artist with the returned onboardingAttemptId and onboardingFlow=youtube after the browser return page sends them back to chat. Treat the connection as complete when platforms.youtube.connected is true.
111
352
 
112
- Do NOT call dynamoi_list_artists or dynamoi_search as a first step for brand-new users \u2014 both will return empty for them and the conversation stalls. Always go through dynamoi_get_account_overview first.
353
+ Do NOT call dynamoi_list_artists or dynamoi_search as a first step for brand-new users — both will return empty for them and the conversation stalls. Always go through dynamoi_get_account_overview first.
113
354
 
114
355
  === End Session Start Routine ===
115
356
 
@@ -118,7 +359,7 @@ Principles:
118
359
  - Answer general knowledge or advice questions directly without Dynamoi tools unless the user is asking about their Dynamoi account, artists, campaigns, billing, connections, or launches.
119
360
  - Do not call Dynamoi tools just to "check context" before answering generic advice questions. If the question is about Instagram growth, lyrics, songwriting, promotion strategy, or general marketing education and does not require the user's account data, answer natively and do not mention inspecting Dynamoi.
120
361
  - Even when Dynamoi is attached, generic advice stays native. If the user asks something like "How do I get more followers on Instagram organically without running any ads?", answer directly with no Dynamoi tool calls.
121
- - \`dynamoi_get_account_overview\` is only for explicit account-overview questions. Do not use it as a zero-context scout before answering unrelated prompts.
362
+ - \`dynamoi_get_account_overview\` is the first call for account-relevant session starts and explicit account-overview questions. Do not use it as a zero-context scout before answering unrelated prompts.
122
363
  - Never claim you changed something unless the tool returned status "success" or
123
364
  "partial_success".
124
365
  - Prefer read tools first before write tools. For writes, confirm intent and restate
@@ -131,30 +372,34 @@ Principles:
131
372
  - 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_links_from_spotify_artist for Spotify artist URLs when the user wants the artist hub, full catalog, or all Smart Links. Use dynamoi_create_smart_link_from_spotify for a single album or track URL. Do not imply that creating a Smart Link creates a paid campaign.
132
373
  - When answering from Smart Link tools, lead with the artist hub URL when present, then public release URLs, 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.
133
374
  - Smart Link pixel tools accept validated pixel IDs only. Do not ask for arbitrary JavaScript, tag-manager snippets, or script code.
375
+ - When the user asks about music distribution, call dynamoi_get_distribution_application before making eligibility claims. Treat its five scored requirements as authoritative. Applicant country, tax-residency country, payout country, and the adult signer attestation are required submission fields, but they are not additional eligibility-score requirements.
376
+ - For missing Meta or YouTube distribution identity, use purpose=distribution_identity on the relevant connection tool when that tool is available. These least-privilege identity flows do not require advertising billing. Never substitute the advertising flow.
377
+ - Call dynamoi_apply_for_distribution only after the user explicitly asks to submit, confirms the application, provides all required country fields, and attests that the signer is an adult. Submission starts manual review; it never implies approval, agreement acceptance, release submission, rights clearance, store delivery, royalty setup, or payout readiness.
134
378
  - Money values are shown in USD as presented in Dynamoi.
135
- - Budget minimums: $10/day (daily), $100 total (Smart Campaign), $50 total (YouTube).
379
+ - Budget minimums: $10/day (daily), $50 total (Smart Campaign), $50 total (YouTube).
136
380
  - Product and pricing details are available as MCP resources. Keep runtime answers
137
381
  focused on the user's account data and requested action.
138
382
 
139
383
  Common workflows:
140
- - Discovery: dynamoi_list_artists \u2192 dynamoi_list_campaigns \u2192 dynamoi_get_campaign \u2192
384
+ - Discovery: dynamoi_list_artists → dynamoi_list_campaigns → dynamoi_get_campaign →
141
385
  dynamoi_get_campaign with includeAnalytics=true when needed
142
386
  - Artist performance summary: dynamoi_get_artist_analytics with granularity=DAILY when requested. If that response already includes the strongest campaign, do not call more analytics tools.
143
- - Diagnose stuck campaign: dynamoi_get_campaign \u2192 dynamoi_get_platform_status \u2192
387
+ - Diagnose stuck campaign: dynamoi_get_campaign → dynamoi_get_platform_status →
144
388
  propose next steps
145
- - Pause/resume: dynamoi_get_campaign (confirm) \u2192 dynamoi_update_campaign with action=pause or action=resume
146
- - Budget update: dynamoi_get_campaign (confirm) \u2192 dynamoi_update_campaign with action=update_budget
147
- - Launch: dynamoi_list_media_assets \u2192 dynamoi_launch_campaign
389
+ - Pause/resume: dynamoi_get_campaign (confirm) → dynamoi_update_campaign with action=pause or action=resume
390
+ - Budget update: dynamoi_get_campaign (confirm) → dynamoi_update_campaign with action=update_budget
391
+ - Launch: dynamoi_list_media_assets → dynamoi_launch_campaign
148
392
  - Free Smart Link artist catalog creation: dynamoi_create_smart_links_from_spotify_artist; omit artistId for a brand-new user with no Dynamoi artist yet
149
- - Free Smart Link single-release creation: dynamoi_list_artists \u2192 dynamoi_create_smart_link_from_spotify
150
- - Smart Link analytics/settings: dynamoi_list_smart_links \u2192 dynamoi_get_smart_link with includeAnalytics=true or includeArtistSettings=true
393
+ - Free Smart Link single-release creation: dynamoi_list_artists → dynamoi_create_smart_link_from_spotify
394
+ - Smart Link analytics/settings: dynamoi_list_smart_links → dynamoi_get_smart_link with includeAnalytics=true or includeArtistSettings=true
395
+ - Distribution: dynamoi_get_distribution_application → satisfy missing identity requirements with purpose=distribution_identity when available → collect required country fields and adult attestation → explicit confirmation → dynamoi_apply_for_distribution
151
396
  - Post-launch answer: if dynamoi_launch_campaign succeeds, answer from that result directly. Only call dynamoi_get_campaign when the user explicitly needs more detail than the launch result already returned, and prefer format=summary for that follow-up.
152
397
  - Review/demo Smart Campaign launch: if the user already gave artist, content title, budget, countries, and reusable media assets, you may call dynamoi_launch_campaign without spotifyUrl/endDate because Dynamoi can infer reviewer-safe defaults. Do not invent placeholder values for omitted fields; omit those keys entirely.
153
398
  `.trim();
154
399
  var DYNAMOI_CHATGPT_APP_INSTRUCTIONS = `
155
400
  You are operating Dynamoi's ChatGPT app tools on behalf of the authenticated user.
156
- Dynamoi helps artists and labels create free Spotify Smart Links and inspect existing
157
- music-promotion records from ChatGPT.
401
+ Dynamoi helps artists and labels create music-promotion assets, review campaign and
402
+ Smart Link analytics, and check or submit music-distribution applications from ChatGPT.
158
403
 
159
404
  This ChatGPT app surface is review-safe and does not start billing, external OAuth
160
405
  connections, campaign launches, campaign budget changes, or direct purchase flows.
@@ -172,6 +417,10 @@ Principles:
172
417
  - For artist rosters, use dynamoi_list_artists.
173
418
  - For existing campaigns, use dynamoi_list_campaigns, dynamoi_get_campaign, and
174
419
  dynamoi_get_artist_analytics. These tools are read-only.
420
+ - For music distribution, use dynamoi_get_distribution_application to explain the exact
421
+ five requirements and current application status. Use dynamoi_apply_for_distribution
422
+ only after explicit user confirmation and complete country/adult-attestation fields.
423
+ An application starts manual review and never guarantees approval or distributes a release.
175
424
  - For free Smart Links, use dynamoi_create_smart_link_from_spotify,
176
425
  dynamoi_create_smart_links_from_spotify_artist, dynamoi_list_smart_links,
177
426
  dynamoi_get_smart_link, and dynamoi_update_smart_link.
@@ -191,7 +440,7 @@ Principles:
191
440
  `.trim();
192
441
 
193
442
  // src/server/prompts.ts
194
- import * as z from "zod/v4";
443
+ import * as z3 from "zod/v4";
195
444
  function asTextPrompt(text) {
196
445
  return {
197
446
  messages: [
@@ -203,417 +452,357 @@ function asTextPrompt(text) {
203
452
  };
204
453
  }
205
454
  function registerDynamoiPrompts(server) {
206
- server.registerPrompt(
207
- "dynamoi_find_smart_link_url",
208
- {
209
- argsSchema: {
210
- artistId: z.string().uuid().optional(),
211
- query: z.string().trim().optional()
212
- },
213
- description: "Find a user's free Smart Link URL and answer with public URLs, titles, and statuses.",
214
- title: "Find Smart Link URL"
455
+ server.registerPrompt("dynamoi_find_smart_link_url", {
456
+ argsSchema: {
457
+ artistId: z3.string().uuid().optional(),
458
+ query: z3.string().trim().optional()
215
459
  },
216
- (args) => asTextPrompt(
217
- [
218
- "Find my Dynamoi Smart Link URL.",
219
- args.artistId ? `Artist ID: ${args.artistId}` : "If no artistId is provided, use dynamoi_search or dynamoi_list_artists to identify the artist first.",
220
- args.query ? `Search query: ${args.query}` : "",
221
- "",
222
- "Use dynamoi_list_smart_links or dynamoi_search with type=smartlink.",
223
- "In the final answer, show the release title, artist, public URL, and status. Do not show internal IDs unless I ask for them."
224
- ].filter(Boolean).join("\n")
225
- )
226
- );
227
- server.registerPrompt(
228
- "dynamoi_explain_free_smart_links",
229
- {
230
- argsSchema: {},
231
- description: "Explain Dynamoi free Smart Links and how they differ from paid managed advertising.",
232
- title: "Explain Free Smart Links"
233
- },
234
- () => asTextPrompt(
235
- [
236
- "Explain Dynamoi free Smart Links.",
237
- "Use MCP resources if needed, especially dynamoi://smart-links/free-plan and dynamoi://business/free-vs-paid.",
238
- "Be clear: Smart Links are free to create and manage. High-popularity or unverifiable artist links may require verification before public publishing. Managed advertising and ad budgets are separate paid services.",
239
- "Do not inspect my account data unless I ask about my artists, links, campaigns, billing, or settings."
240
- ].join("\n")
241
- )
242
- );
243
- server.registerPrompt(
244
- "dynamoi_create_free_smart_link",
245
- {
246
- argsSchema: {
247
- artistId: z.string().uuid().optional(),
248
- spotifyUrl: z.string().trim().optional()
249
- },
250
- description: "Create free Smart Links from a Spotify artist, album, or track URL.",
251
- title: "Create Free Smart Link"
460
+ description: "Find a user's free Smart Link URL and answer with public URLs, titles, and statuses.",
461
+ title: "Find Smart Link URL"
462
+ }, (args) => asTextPrompt([
463
+ "Find my Dynamoi Smart Link URL.",
464
+ args.artistId ? `Artist ID: ${args.artistId}` : "If no artistId is provided, use dynamoi_search or dynamoi_list_artists to identify the artist first.",
465
+ args.query ? `Search query: ${args.query}` : "",
466
+ "",
467
+ "Use dynamoi_list_smart_links or dynamoi_search with type=smartlink.",
468
+ "In the final answer, show the release title, artist, public URL, and status. Do not show internal IDs unless I ask for them."
469
+ ].filter(Boolean).join(`
470
+ `)));
471
+ server.registerPrompt("dynamoi_explain_free_smart_links", {
472
+ argsSchema: {},
473
+ description: "Explain Dynamoi free Smart Links and how they differ from paid managed advertising.",
474
+ title: "Explain Free Smart Links"
475
+ }, () => asTextPrompt([
476
+ "Explain Dynamoi free Smart Links.",
477
+ "Use MCP resources if needed, especially dynamoi://smart-links/free-plan and dynamoi://business/free-vs-paid.",
478
+ "Be clear: Smart Links are free to create and manage. High-popularity or unverifiable artist links may require verification before public publishing. Managed advertising and ad budgets are separate paid services.",
479
+ "Do not inspect my account data unless I ask about my artists, links, campaigns, billing, or settings."
480
+ ].join(`
481
+ `)));
482
+ server.registerPrompt("dynamoi_create_free_smart_link", {
483
+ argsSchema: {
484
+ artistId: z3.string().uuid().optional(),
485
+ spotifyUrl: z3.string().trim().optional()
252
486
  },
253
- (args) => asTextPrompt(
254
- [
255
- "Create a free Dynamoi Smart Link.",
256
- args.artistId ? `Artist ID: ${args.artistId}` : "If no artistId is provided, list artists first and ask me which artist owns the link.",
257
- args.spotifyUrl ? `Spotify URL: ${args.spotifyUrl}` : "Ask me for a Spotify artist, album, or track URL. Playlist URLs are not supported today.",
258
- "",
259
- "Smart Links are free to create and manage. High-popularity or unverifiable artist links may require verification before public publishing. This does not create a paid campaign.",
260
- "If the Spotify URL is an artist URL and I want my hub/catalog, use dynamoi_create_smart_links_from_spotify_artist. If it is an album or track URL, use dynamoi_create_smart_link_from_spotify."
261
- ].join("\n")
262
- )
263
- );
264
- server.registerPrompt(
265
- "dynamoi_audit_campaigns",
266
- {
267
- argsSchema: {
268
- artistId: z.string().uuid().optional()
269
- },
270
- description: "Audit an artist's campaigns and summarize what is working and what to fix next.",
271
- title: "Audit Campaigns"
487
+ description: "Create free Smart Links from a Spotify artist, album, or track URL.",
488
+ title: "Create Free Smart Link"
489
+ }, (args) => asTextPrompt([
490
+ "Create a free Dynamoi Smart Link.",
491
+ args.artistId ? `Artist ID: ${args.artistId}` : "If no artistId is provided, list artists first and ask me which artist owns the link.",
492
+ args.spotifyUrl ? `Spotify URL: ${args.spotifyUrl}` : "Ask me for a Spotify artist, album, or track URL. Playlist URLs are not supported today.",
493
+ "",
494
+ "Smart Links are free to create and manage. High-popularity or unverifiable artist links may require verification before public publishing. This does not create a paid campaign.",
495
+ "If the Spotify URL is an artist URL and I want my hub/catalog, use dynamoi_create_smart_links_from_spotify_artist. If it is an album or track URL, use dynamoi_create_smart_link_from_spotify."
496
+ ].join(`
497
+ `)));
498
+ server.registerPrompt("dynamoi_audit_campaigns", {
499
+ argsSchema: {
500
+ artistId: z3.string().uuid().optional()
272
501
  },
273
- (args) => asTextPrompt(
274
- [
275
- "Audit my campaigns in Dynamoi.",
276
- args.artistId ? `Artist ID: ${args.artistId}` : "If no artistId is provided, start by listing artists and ask me which one to audit.",
277
- "",
278
- "Steps:",
279
- "1. Use dynamoi_list_campaigns and dynamoi_get_campaign with includeAnalytics=true for the last 7-14 days when one campaign needs a deeper read.",
280
- "2. Identify any campaigns that are paused, failed, or stuck in a pre-active state and explain why using dynamoi_get_campaign and dynamoi_get_platform_status.",
281
- "3. Recommend 3-5 next actions with clear priorities."
282
- ].join("\n")
283
- )
284
- );
285
- server.registerPrompt(
286
- "dynamoi_release_launch_plan",
287
- {
288
- argsSchema: {
289
- artistId: z.string().uuid().optional(),
290
- contentTitle: z.string().trim().optional(),
291
- contentType: z.enum(["TRACK", "ALBUM", "PLAYLIST", "VIDEO"]).optional()
292
- },
293
- description: "Create a pragmatic release launch plan and propose a Dynamoi campaign setup.",
294
- title: "Release Launch Plan"
502
+ description: "Audit an artist's campaigns and summarize what is working and what to fix next.",
503
+ title: "Audit Campaigns"
504
+ }, (args) => asTextPrompt([
505
+ "Audit my campaigns in Dynamoi.",
506
+ args.artistId ? `Artist ID: ${args.artistId}` : "If no artistId is provided, start by listing artists and ask me which one to audit.",
507
+ "",
508
+ "Steps:",
509
+ "1. Use dynamoi_list_campaigns and dynamoi_get_campaign with includeAnalytics=true for the last 7-14 days when one campaign needs a deeper read.",
510
+ "2. Identify any campaigns that are paused, failed, or stuck in a pre-active state and explain why using dynamoi_get_campaign and dynamoi_get_platform_status.",
511
+ "3. Recommend 3-5 next actions with clear priorities."
512
+ ].join(`
513
+ `)));
514
+ server.registerPrompt("dynamoi_release_launch_plan", {
515
+ argsSchema: {
516
+ artistId: z3.string().uuid().optional(),
517
+ contentTitle: z3.string().trim().optional(),
518
+ contentType: z3.enum(["TRACK", "ALBUM", "PLAYLIST", "VIDEO"]).optional()
295
519
  },
296
- (args) => asTextPrompt(
297
- [
298
- "Help me plan a release launch using Dynamoi.",
299
- args.artistId ? `Artist ID: ${args.artistId}` : "If no artistId is provided, list artists first.",
300
- args.contentType ? `Content type: ${args.contentType}` : "",
301
- args.contentTitle ? `Title: ${args.contentTitle}` : "",
302
- "",
303
- "Ask any missing questions first (links, creative, budget, countries, dates).",
304
- "For review/demo Smart Campaign launches that already specify the artist, content title, budget, countries, and reusable media assets, you may proceed without asking for spotifyUrl or endDate.",
305
- "When those review/demo fields are omitted, do not invent placeholder spotifyUrl or endDate values; omit them and let Dynamoi infer them.",
306
- "Then propose the simplest campaign plan that fits today\u2019s supported platforms:",
307
- "- Smart Campaign (Meta) for Spotify/Apple Music releases",
308
- "- YouTube campaign for videos",
309
- "",
310
- "If we proceed to launch:",
311
- "- For Smart Campaign: use dynamoi_list_media_assets and then dynamoi_launch_campaign.",
312
- "- For YouTube: use dynamoi_launch_campaign with youtubeVideoId."
313
- ].filter(Boolean).join("\n")
314
- )
315
- );
316
- server.registerPrompt(
317
- "dynamoi_why_campaign_blocked",
318
- {
319
- argsSchema: {
320
- campaignId: z.string().uuid()
321
- },
322
- description: "Diagnose why a campaign is blocked/stuck and recommend the next fix.",
323
- title: "Why Is My Campaign Blocked?"
520
+ description: "Create a pragmatic release launch plan and propose a Dynamoi campaign setup.",
521
+ title: "Release Launch Plan"
522
+ }, (args) => asTextPrompt([
523
+ "Help me plan a release launch using Dynamoi.",
524
+ args.artistId ? `Artist ID: ${args.artistId}` : "If no artistId is provided, list artists first.",
525
+ args.contentType ? `Content type: ${args.contentType}` : "",
526
+ args.contentTitle ? `Title: ${args.contentTitle}` : "",
527
+ "",
528
+ "Ask any missing questions first (links, creative, budget, countries, dates).",
529
+ "For review/demo Smart Campaign launches that already specify the artist, content title, budget, countries, and reusable media assets, you may proceed without asking for spotifyUrl or endDate.",
530
+ "When those review/demo fields are omitted, do not invent placeholder spotifyUrl or endDate values; omit them and let Dynamoi infer them.",
531
+ "Then propose the simplest campaign plan that fits today’s supported platforms:",
532
+ "- Smart Campaign (Meta) for Spotify/Apple Music releases",
533
+ "- YouTube campaign for videos",
534
+ "",
535
+ "If we proceed to launch:",
536
+ "- For Smart Campaign: use dynamoi_list_media_assets and then dynamoi_launch_campaign.",
537
+ "- For YouTube: use dynamoi_launch_campaign with youtubeVideoId."
538
+ ].filter(Boolean).join(`
539
+ `)));
540
+ server.registerPrompt("dynamoi_why_campaign_blocked", {
541
+ argsSchema: {
542
+ campaignId: z3.string().uuid()
324
543
  },
325
- (args) => asTextPrompt(
326
- [
327
- "My campaign seems blocked or stuck. Diagnose it and tell me what to do next.",
328
- `Campaign ID: ${args.campaignId}`,
329
- "",
330
- "Steps:",
331
- "1. Use dynamoi_get_campaign with includeDeploymentStatus=true to inspect current status and blockers.",
332
- "2. Use dynamoi_get_platform_status for the artist to check Meta/Google connection state.",
333
- "3. If appropriate, suggest safe next actions and confirm before calling dynamoi_update_campaign."
334
- ].join("\n")
335
- )
336
- );
544
+ description: "Diagnose why a campaign is blocked/stuck and recommend the next fix.",
545
+ title: "Why Is My Campaign Blocked?"
546
+ }, (args) => asTextPrompt([
547
+ "My campaign seems blocked or stuck. Diagnose it and tell me what to do next.",
548
+ `Campaign ID: ${args.campaignId}`,
549
+ "",
550
+ "Steps:",
551
+ "1. Use dynamoi_get_campaign with includeDeploymentStatus=true to inspect current status and blockers.",
552
+ "2. Use dynamoi_get_platform_status for the artist to check Meta/Google connection state.",
553
+ "3. If appropriate, suggest safe next actions and confirm before calling dynamoi_update_campaign."
554
+ ].join(`
555
+ `)));
337
556
  }
338
557
 
339
558
  // src/server/resources.ts
340
559
  import {
341
560
  ResourceTemplate
342
561
  } from "@modelcontextprotocol/sdk/server/mcp.js";
343
- import * as z2 from "zod/v4";
562
+ import * as z4 from "zod/v4";
344
563
 
345
564
  // src/server/playbook-resources.ts
346
565
  function registerPlaybookResources(server) {
347
- server.registerResource(
348
- "playbook-spotify-artist",
349
- "dynamoi://playbooks/spotify-artist",
350
- {
351
- description: "Persona playbook: how to convert a Spotify artist user from auth-grant to first activated Smart Link.",
352
- mimeType: "application/json",
353
- title: "Playbook: Spotify Artist"
354
- },
355
- async (uri) => ({
356
- contents: [
357
- {
358
- mimeType: "application/json",
359
- text: JSON.stringify({
360
- fastestPath: "Ask the user for their Spotify artist URL, then call dynamoi_create_smart_links_from_spotify_artist with that URL. Return the artist hub URL plus the starter Smart Link URL. Catalog import continues in the background.",
361
- freePlanReminder: "Free Smart Links have no per-link fee for creation or management. High-popularity or unverifiable artist links may stay unpublished in verification hold until Dynamoi can verify the client relationship. Creating a Smart Link does not create a paid campaign or spend ad budget.",
362
- marginCopyGuard: "Never describe Dynamoi's pricing in terms that imply pass-through or zero overhead. Do not quote plan prices, campaign credits, daily campaign-spend billing, or checkout details in ChatGPT; billing setup belongs in the Dynamoi dashboard. The internal media-spend margin is not part of any client-facing copy.",
363
- persona: "Independent musician or small artist with at least one Spotify release. Goal: increase Spotify streams.",
364
- sampleScript: "Drop your Spotify artist link and I'll set up your free Dynamoi hub in about 30 seconds. We'll get all your releases on one shareable page, then we can talk about whether you want to promote any of them.",
365
- talkingPoints: {
366
- differentiatorComparison: {
367
- claim: "Linkfire, Feature.fm, and Hypeddit are primarily link and landing-page tools. Dynamoi starts with free Smart Links, then uses the same artist and link data to launch managed Meta campaigns from chat.",
368
- trigger: "User asks how Dynamoi differs from link-in-bio or Smart Link products."
369
- },
370
- hesitationReassurance: {
371
- claim: "Managed advertising billing is completed in the Dynamoi dashboard. In ChatGPT, keep the flow focused on Smart Links, readiness, platform connections, and campaign management after billing setup is complete.",
372
- trigger: "User hesitates about price, commitment, or whether the first month is enough to test."
373
- },
374
- postLaunchExpectations: {
375
- claim: "After launch, expect 7-14 days of learning while delivery shifts by country and creative. CPC and save-rate trends are usually more useful than same-day results.",
376
- trigger: "Immediately after a successful launch_campaign call or when the user asks when results should show."
377
- },
378
- smartLinkPixelSeed: {
379
- claim: "Publishing a Smart Link can create first-party click and pixel signals before ad spend begins, which gives future Meta and Google campaigns a cleaner starting signal.",
380
- trigger: "Smart Link user has no campaign yet or asks why a free Smart Link matters before ads."
381
- },
382
- socialSideEffect: {
383
- claim: "Smart Campaigns run on Meta, so campaigns optimized for Spotify saves can also create Instagram engagement such as profile visits, likes, and follows as a side effect.",
384
- trigger: "User mentions Instagram, social media growth, or followers while discussing Spotify promotion."
385
- }
566
+ server.registerResource("playbook-spotify-artist", "dynamoi://playbooks/spotify-artist", {
567
+ description: "Persona playbook: how to convert a Spotify artist user from auth-grant to first activated Smart Link.",
568
+ mimeType: "application/json",
569
+ title: "Playbook: Spotify Artist"
570
+ }, async (uri) => ({
571
+ contents: [
572
+ {
573
+ mimeType: "application/json",
574
+ text: JSON.stringify({
575
+ fastestPath: "Ask the user for their Spotify artist URL, then call dynamoi_create_smart_links_from_spotify_artist with that URL. Return the artist hub URL plus the starter Smart Link URL. Catalog import continues in the background.",
576
+ freePlanReminder: "Free Smart Links have no per-link fee for creation or management. High-popularity or unverifiable artist links may stay unpublished in verification hold until Dynamoi can verify the client relationship. Creating a Smart Link does not create a paid campaign or spend ad budget.",
577
+ marginCopyGuard: "Never describe Dynamoi's pricing in terms that imply pass-through or zero overhead. Do not quote plan prices, campaign credits, daily campaign-spend billing, or checkout details in ChatGPT; billing setup belongs in the Dynamoi dashboard. The internal media-spend margin is not part of any client-facing copy.",
578
+ persona: "Independent musician or small artist with at least one Spotify release. Goal: increase Spotify streams.",
579
+ sampleScript: "Drop your Spotify artist link and I'll set up your free Dynamoi hub in about 30 seconds. We'll get all your releases on one shareable page, then we can talk about whether you want to promote any of them.",
580
+ talkingPoints: {
581
+ differentiatorComparison: {
582
+ claim: "Linkfire, Feature.fm, and Hypeddit are primarily link and landing-page tools. Dynamoi starts with free Smart Links, then uses the same artist and link data to launch managed Meta campaigns from chat.",
583
+ trigger: "User asks how Dynamoi differs from link-in-bio or Smart Link products."
386
584
  },
387
- upsellAfterStarter: "Once they have a hub URL, the natural next ask is 'would you like to promote this release on Meta Ads?' which routes to dynamoi_get_campaign_readiness, dynamoi_start_meta_connection if Meta is missing, then dynamoi_launch_campaign for a Smart Campaign."
388
- }),
389
- uri: uri.href
390
- }
391
- ]
392
- })
393
- );
394
- server.registerResource(
395
- "playbook-youtube-creator",
396
- "dynamoi://playbooks/youtube-creator",
397
- {
398
- description: "Persona playbook: how to introduce a YouTube creator to Dynamoi's revenue-per-view optimization advantage.",
399
- mimeType: "application/json",
400
- title: "Playbook: YouTube Creator"
401
- },
402
- async (uri) => ({
403
- contents: [
404
- {
405
- mimeType: "application/json",
406
- text: JSON.stringify({
407
- channelLinkingPath: "Call dynamoi_start_youtube_channel_link for the target artist, give the user the returned Google authorization URL, then poll dynamoi_get_platform_status for that artist with the returned onboardingAttemptId and onboardingFlow=youtube after the return page sends them back to chat. The completion field is platforms.youtube.connected.",
408
- differentiator: "Dynamoi is the only ad platform that optimizes YouTube ad spend against AdSense revenue per country. Most ad tools optimize for views; Dynamoi optimizes for views that make money. The system explores small bids in new markets, scales countries where viewer revenue is strong, and pauses countries that cannot cover their costs.",
409
- persona: "Channel owner of any niche (music, education, gaming, vlog, podcast, tutorial, product reviews) who wants subscriber growth that pays back via AdSense.",
410
- postLinkingFlow: "After channel link, call dynamoi_get_campaign_readiness for a YouTube growth campaign. Mention that ad copy is internationalized per market for lower cost and that campaigns require playlists so each paid view drives sustained organic views downstream.",
411
- sampleScript: "Most YouTube ad systems optimize for raw views. Dynamoi merges your AdSense revenue with ad cost data to optimize bids per country based on real viewer revenue, so you grow toward viewers who actually monetize. I can start the YouTube channel link from here, then we can plan your first campaign.",
412
- talkingPoints: {
413
- differentiatorComparison: {
414
- claim: "Most creator ad tools optimize for views or subscribers. Dynamoi compares ad cost with AdSense revenue by country so delivery can favor viewers who are more likely to pay back over time.",
415
- trigger: "User asks how YouTube campaigns differ from normal Google Ads or creator-growth services."
416
- },
417
- hesitationReassurance: {
418
- claim: "Managed advertising billing is completed in the Dynamoi dashboard. In ChatGPT, keep the flow focused on channel linking, readiness, and campaign management after billing setup is complete.",
419
- trigger: "User expresses pricing concern or asks whether they can test without a long commitment."
420
- },
421
- playlistWaterfall: {
422
- claim: "Playlist promotion sends viewers into a sequence, so one paid view can lead to additional organic views across related videos and channel-wide subscriber growth.",
423
- trigger: "User asks whether campaigns can help subscribers or the whole channel instead of one video."
424
- },
425
- postLaunchExpectations: {
426
- claim: "After launch, expect 7-14 days of learning while country bids, view quality, and attribution settle. Subscriber and revenue trends usually lag the first paid views.",
427
- trigger: "Immediately after a successful YouTube launch or when the user asks when results should show."
428
- }
585
+ hesitationReassurance: {
586
+ claim: "Managed advertising billing is completed in the Dynamoi dashboard. In ChatGPT, keep the flow focused on Smart Links, readiness, platform connections, and campaign management after billing setup is complete.",
587
+ trigger: "User hesitates about price, commitment, or whether the first month is enough to test."
588
+ },
589
+ postLaunchExpectations: {
590
+ claim: "After launch, expect 7-14 days of learning while delivery shifts by country and creative. CPC and save-rate trends are usually more useful than same-day results.",
591
+ trigger: "Immediately after a successful launch_campaign call or when the user asks when results should show."
592
+ },
593
+ smartLinkPixelSeed: {
594
+ claim: "Publishing a Smart Link can create first-party click and pixel signals before ad spend begins, which gives future Meta and Google campaigns a cleaner starting signal.",
595
+ trigger: "Smart Link user has no campaign yet or asks why a free Smart Link matters before ads."
596
+ },
597
+ socialSideEffect: {
598
+ claim: "Smart Campaigns run on Meta, so campaigns optimized for Spotify saves can also create Instagram engagement such as profile visits, likes, and follows as a side effect.",
599
+ trigger: "User mentions Instagram, social media growth, or followers while discussing Spotify promotion."
429
600
  }
430
- }),
431
- uri: uri.href
432
- }
433
- ]
434
- })
435
- );
436
- server.registerResource(
437
- "playbook-label-or-manager",
438
- "dynamoi://playbooks/label-or-manager",
439
- {
440
- description: "Persona playbook: how to onboard a label, manager, or anyone running a roster of multiple artists.",
441
- mimeType: "application/json",
442
- title: "Playbook: Label or Manager"
443
- },
444
- async (uri) => ({
445
- contents: [
446
- {
447
- mimeType: "application/json",
448
- text: JSON.stringify({
449
- billingNote: "Consolidated billing across all artists in the organization. No per-seat charge, no per-artist fee.",
450
- persona: "Label owner, manager, or distributor handling more than one artist. Goal: oversee promotion across a roster from one account.",
451
- rolesNote: "Dynamoi supports admin, editor, and viewer roles at organization and artist level. Editors can mutate everything except admin management; viewers are read-only.",
452
- sampleScript: "Dynamoi handles rosters: organizations with admin/editor/viewer roles, consolidated billing, and per-artist permissions. To start, create your first artist with a Spotify URL, then invite your team. We can layer in more artists from the same organization once you have one running.",
453
- setupSequence: [
454
- "If they have one artist ready: route to dynamoi://playbooks/spotify-artist for that first artist.",
455
- "After the first artist is set up, mention team invites are managed in the dashboard at /dashboard/settings/organization (no MCP tool yet).",
456
- "Cross-artist analytics are available via dynamoi_get_artist_analytics per artist; a roster-wide rollup is dashboard-only."
457
- ],
458
- talkingPoints: {
459
- consolidatedRoster: {
460
- claim: "One organization can hold multiple artists with admin, editor, and viewer roles, while campaign launch and billing state stay visible per artist.",
461
- trigger: "User says they manage more than one artist or asks whether a label/manager workflow is supported."
462
- },
463
- differentiatorComparison: {
464
- claim: "Traditional Smart Link tools stop at links and analytics. Dynamoi keeps those free, then lets a roster operator move from link to managed campaign launch in the same assistant thread.",
465
- trigger: "User compares Dynamoi to Linkfire, Feature.fm, Hypeddit, or a label marketing stack."
466
- },
467
- hesitationReassurance: {
468
- claim: "Managed advertising billing is completed in the Dynamoi dashboard. In ChatGPT, keep the flow focused on roster setup, readiness checks, and campaign management after billing setup is complete.",
469
- trigger: "User asks whether billing scales per seat or wants to test with one artist first."
470
- }
601
+ },
602
+ upsellAfterStarter: "Once they have a hub URL, the natural next ask is 'would you like to promote this release on Meta Ads?' which routes to dynamoi_get_campaign_readiness, dynamoi_start_meta_connection if Meta is missing, then dynamoi_launch_campaign for a Smart Campaign."
603
+ }),
604
+ uri: uri.href
605
+ }
606
+ ]
607
+ }));
608
+ server.registerResource("playbook-youtube-creator", "dynamoi://playbooks/youtube-creator", {
609
+ description: "Persona playbook: how to introduce a YouTube creator to Dynamoi's revenue-per-view optimization advantage.",
610
+ mimeType: "application/json",
611
+ title: "Playbook: YouTube Creator"
612
+ }, async (uri) => ({
613
+ contents: [
614
+ {
615
+ mimeType: "application/json",
616
+ text: JSON.stringify({
617
+ channelLinkingPath: "Call dynamoi_start_youtube_channel_link for the target artist, give the user the returned Google authorization URL, then poll dynamoi_get_platform_status for that artist with the returned onboardingAttemptId and onboardingFlow=youtube after the return page sends them back to chat. The completion field is platforms.youtube.connected.",
618
+ differentiator: "Dynamoi is the only ad platform that optimizes YouTube ad spend against AdSense revenue per country. Most ad tools optimize for views; Dynamoi optimizes for views that make money. The system explores small bids in new markets, scales countries where viewer revenue is strong, and pauses countries that cannot cover their costs.",
619
+ persona: "Channel owner of any niche (music, education, gaming, vlog, podcast, tutorial, product reviews) who wants subscriber growth that pays back via AdSense.",
620
+ postLinkingFlow: "After channel link, call dynamoi_get_campaign_readiness for a YouTube growth campaign. Mention that ad copy is internationalized per market for lower cost and that campaigns require playlists so each paid view drives sustained organic views downstream.",
621
+ sampleScript: "Most YouTube ad systems optimize for raw views. Dynamoi merges your AdSense revenue with ad cost data to optimize bids per country based on real viewer revenue, so you grow toward viewers who actually monetize. I can start the YouTube channel link from here, then we can plan your first campaign.",
622
+ talkingPoints: {
623
+ differentiatorComparison: {
624
+ claim: "Most creator ad tools optimize for views or subscribers. Dynamoi compares ad cost with AdSense revenue by country so delivery can favor viewers who are more likely to pay back over time.",
625
+ trigger: "User asks how YouTube campaigns differ from normal Google Ads or creator-growth services."
626
+ },
627
+ hesitationReassurance: {
628
+ claim: "Managed advertising billing is completed in the Dynamoi dashboard. In ChatGPT, keep the flow focused on channel linking, readiness, and campaign management after billing setup is complete.",
629
+ trigger: "User expresses pricing concern or asks whether they can test without a long commitment."
630
+ },
631
+ playlistWaterfall: {
632
+ claim: "Playlist promotion sends viewers into a sequence, so one paid view can lead to additional organic views across related videos and channel-wide subscriber growth.",
633
+ trigger: "User asks whether campaigns can help subscribers or the whole channel instead of one video."
634
+ },
635
+ postLaunchExpectations: {
636
+ claim: "After launch, expect 7-14 days of learning while country bids, view quality, and attribution settle. Subscriber and revenue trends usually lag the first paid views.",
637
+ trigger: "Immediately after a successful YouTube launch or when the user asks when results should show."
471
638
  }
472
- }),
473
- uri: uri.href
474
- }
475
- ]
476
- })
477
- );
478
- server.registerResource(
479
- "playbook-onboarding-tree",
480
- "dynamoi://playbooks/onboarding-tree",
481
- {
482
- description: "Decision tree for routing a brand-new MCP user to the right persona playbook based on their first reply.",
483
- mimeType: "application/json",
484
- title: "Playbook: Onboarding Decision Tree"
485
- },
486
- async (uri) => ({
487
- contents: [
488
- {
489
- mimeType: "application/json",
490
- text: JSON.stringify({
491
- nodes: [
492
- {
493
- do: [
494
- {
495
- match: "Spotify artist",
496
- routeTo: "dynamoi://playbooks/spotify-artist"
497
- },
498
- {
499
- match: "YouTube creator",
500
- routeTo: "dynamoi://playbooks/youtube-creator"
501
- },
502
- {
503
- match: "Label / manager / multiple artists",
504
- routeTo: "dynamoi://playbooks/label-or-manager"
505
- }
506
- ],
507
- if: "state.hasAnyArtist === false",
508
- question: "Are you a Spotify artist, a YouTube creator, or running a label/managing a roster?"
509
- },
510
- {
511
- do: "Offer dynamoi_create_smart_link_from_spotify or dynamoi_create_smart_links_from_spotify_artist for the fastest visible win.",
512
- if: "state.hasAnyArtist === true && state.hasAnySmartLink === false"
513
- },
514
- {
515
- do: "Offer dynamoi_get_campaign_readiness to validate launch inputs before creating anything.",
516
- if: "state.hasAnyArtist === true && state.hasAnyActiveCampaign === false"
517
- },
518
- {
519
- do: "Tell the user managed-advertising billing setup must happen in the Dynamoi dashboard, not through a ChatGPT checkout link. After they start or restore billing there, poll dynamoi_get_billing for that artist to confirm billing is active.",
520
- if: "state.hasAnyArtist === true && billing is the launch blocker"
521
- },
522
- {
523
- do: "Offer dynamoi_start_meta_connection for the target artist, then poll dynamoi_get_platform_status for that artist with the returned onboardingAttemptId and onboardingFlow=meta after Meta returns them to chat. The completion field is platforms.meta.status.",
524
- if: "state.hasAnyArtist === true && user wants Spotify Smart Campaigns && state.hasAnyConnectedMeta === false"
525
- },
526
- {
527
- do: "Offer dynamoi_start_youtube_channel_link for the target artist, then poll dynamoi_get_platform_status for that artist with the returned onboardingAttemptId and onboardingFlow=youtube after Google returns them to chat. The completion field is platforms.youtube.connected.",
528
- if: "state.hasAnyArtist === true && user wants YouTube growth && state.hasAnyConnectedYoutube === false"
529
- },
530
- {
531
- do: "Ask whether they want a performance summary, a new campaign, or to update an existing campaign.",
532
- if: "state.hasAnyActiveCampaign === true"
533
- }
534
- ],
535
- source: "This tree mirrors dynamoi_get_account_overview.recommendedNextActions. Use either; the tree is for explaining the plan to the user, the array is for deciding the next tool call.",
536
- talkingPoints: {
537
- creatorFirstChoice: {
538
- claim: "Spotify artists should start from a Spotify artist URL; YouTube creators should start by linking a channel; labels and managers should pick one artist as the first setup path.",
539
- trigger: "Brand-new user has no artists and asks what to do first."
540
- },
541
- postLaunchExpectations: {
542
- claim: "Campaigns need 7-14 days of learning before judging performance. Early reads should focus on blockers, delivery status, spend, CPC, and whether attribution is flowing.",
543
- trigger: "User asks what happens after launch or whether a first-day result is good or bad."
544
- },
545
- smartLinkBeforeAds: {
546
- claim: "A free Smart Link is the fastest visible setup step because it produces a public asset, starts catalog context, and creates a natural handoff into campaign readiness.",
547
- trigger: "User has an artist but no Smart Link or asks why the assistant recommends links before ads."
548
- }
639
+ }
640
+ }),
641
+ uri: uri.href
642
+ }
643
+ ]
644
+ }));
645
+ server.registerResource("playbook-label-or-manager", "dynamoi://playbooks/label-or-manager", {
646
+ description: "Persona playbook: how to onboard a label, manager, or anyone running a roster of multiple artists.",
647
+ mimeType: "application/json",
648
+ title: "Playbook: Label or Manager"
649
+ }, async (uri) => ({
650
+ contents: [
651
+ {
652
+ mimeType: "application/json",
653
+ text: JSON.stringify({
654
+ billingNote: "Consolidated billing across all artists in the organization. No per-seat charge, no per-artist fee.",
655
+ persona: "Label owner, manager, or distributor handling more than one artist. Goal: oversee promotion across a roster from one account.",
656
+ rolesNote: "Dynamoi supports admin, editor, and viewer roles at organization and artist level. Editors can mutate everything except admin management; viewers are read-only.",
657
+ sampleScript: "Dynamoi handles rosters: organizations with admin/editor/viewer roles, consolidated billing, and per-artist permissions. To start, create your first artist with a Spotify URL, then invite your team. We can layer in more artists from the same organization once you have one running.",
658
+ setupSequence: [
659
+ "If they have one artist ready: route to dynamoi://playbooks/spotify-artist for that first artist.",
660
+ "After the first artist is set up, mention team invites are managed in the dashboard at /dashboard/settings/organization (no MCP tool yet).",
661
+ "Cross-artist analytics are available via dynamoi_get_artist_analytics per artist; a roster-wide rollup is dashboard-only."
662
+ ],
663
+ talkingPoints: {
664
+ consolidatedRoster: {
665
+ claim: "One organization can hold multiple artists with admin, editor, and viewer roles, while campaign launch and billing state stay visible per artist.",
666
+ trigger: "User says they manage more than one artist or asks whether a label/manager workflow is supported."
667
+ },
668
+ differentiatorComparison: {
669
+ claim: "Traditional Smart Link tools stop at links and analytics. Dynamoi keeps those free, then lets a roster operator move from link to managed campaign launch in the same assistant thread.",
670
+ trigger: "User compares Dynamoi to Linkfire, Feature.fm, Hypeddit, or a label marketing stack."
671
+ },
672
+ hesitationReassurance: {
673
+ claim: "Managed advertising billing is completed in the Dynamoi dashboard. In ChatGPT, keep the flow focused on roster setup, readiness checks, and campaign management after billing setup is complete.",
674
+ trigger: "User asks whether billing scales per seat or wants to test with one artist first."
549
675
  }
550
- }),
551
- uri: uri.href
552
- }
553
- ]
554
- })
555
- );
676
+ }
677
+ }),
678
+ uri: uri.href
679
+ }
680
+ ]
681
+ }));
682
+ server.registerResource("playbook-onboarding-tree", "dynamoi://playbooks/onboarding-tree", {
683
+ description: "Decision tree for routing a brand-new MCP user to the right persona playbook based on their first reply.",
684
+ mimeType: "application/json",
685
+ title: "Playbook: Onboarding Decision Tree"
686
+ }, async (uri) => ({
687
+ contents: [
688
+ {
689
+ mimeType: "application/json",
690
+ text: JSON.stringify({
691
+ nodes: [
692
+ {
693
+ do: [
694
+ {
695
+ match: "Spotify artist",
696
+ routeTo: "dynamoi://playbooks/spotify-artist"
697
+ },
698
+ {
699
+ match: "YouTube creator",
700
+ routeTo: "dynamoi://playbooks/youtube-creator"
701
+ },
702
+ {
703
+ match: "Label / manager / multiple artists",
704
+ routeTo: "dynamoi://playbooks/label-or-manager"
705
+ }
706
+ ],
707
+ if: "state.hasAnyArtist === false",
708
+ question: "Are you a Spotify artist, a YouTube creator, or running a label/managing a roster?"
709
+ },
710
+ {
711
+ do: "Offer dynamoi_create_smart_link_from_spotify or dynamoi_create_smart_links_from_spotify_artist for the fastest visible win.",
712
+ if: "state.hasAnyArtist === true && state.hasAnySmartLink === false"
713
+ },
714
+ {
715
+ do: "Offer dynamoi_get_campaign_readiness to validate launch inputs before creating anything.",
716
+ if: "state.hasAnyArtist === true && state.hasAnyActiveCampaign === false"
717
+ },
718
+ {
719
+ do: "Tell the user managed-advertising billing setup must happen in the Dynamoi dashboard, not through a ChatGPT checkout link. After they start or restore billing there, poll dynamoi_get_billing for that artist to confirm billing is active.",
720
+ if: "state.hasAnyArtist === true && billing is the launch blocker"
721
+ },
722
+ {
723
+ do: "Offer dynamoi_start_meta_connection for the target artist, then poll dynamoi_get_platform_status for that artist with the returned onboardingAttemptId and onboardingFlow=meta after Meta returns them to chat. The completion field is platforms.meta.status.",
724
+ if: "state.hasAnyArtist === true && user wants Spotify Smart Campaigns && state.hasAnyConnectedMeta === false"
725
+ },
726
+ {
727
+ do: "Offer dynamoi_start_youtube_channel_link for the target artist, then poll dynamoi_get_platform_status for that artist with the returned onboardingAttemptId and onboardingFlow=youtube after Google returns them to chat. The completion field is platforms.youtube.connected.",
728
+ if: "state.hasAnyArtist === true && user wants YouTube growth && state.hasAnyConnectedYoutube === false"
729
+ },
730
+ {
731
+ do: "Ask whether they want a performance summary, a new campaign, or to update an existing campaign.",
732
+ if: "state.hasAnyActiveCampaign === true"
733
+ }
734
+ ],
735
+ source: "This tree mirrors dynamoi_get_account_overview.recommendedNextActions. Use either; the tree is for explaining the plan to the user, the array is for deciding the next tool call.",
736
+ talkingPoints: {
737
+ creatorFirstChoice: {
738
+ claim: "Spotify artists should start from a Spotify artist URL; YouTube creators should start by linking a channel; labels and managers should pick one artist as the first setup path.",
739
+ trigger: "Brand-new user has no artists and asks what to do first."
740
+ },
741
+ postLaunchExpectations: {
742
+ claim: "Campaigns need 7-14 days of learning before judging performance. Early reads should focus on blockers, delivery status, spend, CPC, and whether attribution is flowing.",
743
+ trigger: "User asks what happens after launch or whether a first-day result is good or bad."
744
+ },
745
+ smartLinkBeforeAds: {
746
+ claim: "A free Smart Link is the fastest visible setup step because it produces a public asset, starts catalog context, and creates a natural handoff into campaign readiness.",
747
+ trigger: "User has an artist but no Smart Link or asks why the assistant recommends links before ads."
748
+ }
749
+ }
750
+ }),
751
+ uri: uri.href
752
+ }
753
+ ]
754
+ }));
556
755
  }
557
756
 
558
757
  // src/server/resources.ts
559
758
  function registerDynamoiResources(server, adapter) {
560
- server.registerResource(
561
- "platform-pricing",
562
- "dynamoi://platform/pricing",
563
- {
564
- description: "Dynamoi campaign setup guidance and campaign budget minimums.",
565
- mimeType: "application/json",
566
- title: "Pricing"
567
- },
568
- async (uri) => ({
569
- contents: [
570
- {
571
- mimeType: "application/json",
572
- text: JSON.stringify({
573
- budgetMinimums: {
574
- smartCampaign: {
575
- dailyUsd: 10,
576
- note: "Meta Ads for Spotify promotion",
577
- totalUsd: 100
578
- },
579
- youtube: {
580
- dailyUsd: 10,
581
- note: "Google Ads for YouTube channel growth",
582
- totalUsd: 50
583
- }
584
- },
585
- includes: "Free Smart Links, unlimited team seats, unlimited artists, white-glove support, and campaign landing-page support where available",
586
- managedAdvertising: {
587
- description: "Managed advertising subscription and payment setup happen in the Dynamoi dashboard, outside ChatGPT. This MCP server can check billing readiness after setup, but does not create checkout links or collect payment.",
588
- paymentSetupLocation: "Dynamoi dashboard"
589
- },
590
- noContracts: true
591
- }),
592
- uri: uri.href
593
- }
594
- ]
595
- })
596
- );
597
- server.registerResource(
598
- "platform-content-types",
599
- "dynamoi://platform/content-types",
600
- { mimeType: "application/json", title: "Content Types" },
601
- async (uri) => ({
602
- contents: [
603
- {
604
- mimeType: "application/json",
605
- text: JSON.stringify({
606
- campaignTypes: {
607
- SMART_CAMPAIGN: ["TRACK", "ALBUM", "PLAYLIST"],
608
- YOUTUBE: ["VIDEO"]
759
+ server.registerResource("platform-pricing", "dynamoi://platform/pricing", {
760
+ description: "Dynamoi campaign setup guidance and campaign budget minimums.",
761
+ mimeType: "application/json",
762
+ title: "Pricing"
763
+ }, async (uri) => ({
764
+ contents: [
765
+ {
766
+ mimeType: "application/json",
767
+ text: JSON.stringify({
768
+ budgetMinimums: {
769
+ smartCampaign: {
770
+ dailyUsd: 10,
771
+ note: "Meta Ads for Spotify promotion",
772
+ totalUsd: 50
609
773
  },
610
- contentTypes: ["TRACK", "ALBUM", "PLAYLIST", "VIDEO"]
611
- }),
612
- uri: uri.href
613
- }
614
- ]
615
- })
616
- );
774
+ youtube: {
775
+ dailyUsd: 10,
776
+ note: "Google Ads for YouTube channel growth",
777
+ totalUsd: 50
778
+ }
779
+ },
780
+ includes: "Free Smart Links, unlimited team seats, unlimited artists, white-glove support, and campaign landing-page support where available",
781
+ managedAdvertising: {
782
+ description: "Managed advertising subscription and payment setup happen in the Dynamoi dashboard, outside ChatGPT. This MCP server can check billing readiness after setup, but does not create checkout links or collect payment.",
783
+ paymentSetupLocation: "Dynamoi dashboard"
784
+ },
785
+ noContracts: true
786
+ }),
787
+ uri: uri.href
788
+ }
789
+ ]
790
+ }));
791
+ server.registerResource("platform-content-types", "dynamoi://platform/content-types", { mimeType: "application/json", title: "Content Types" }, async (uri) => ({
792
+ contents: [
793
+ {
794
+ mimeType: "application/json",
795
+ text: JSON.stringify({
796
+ campaignTypes: {
797
+ SMART_CAMPAIGN: ["TRACK", "ALBUM", "PLAYLIST"],
798
+ YOUTUBE: ["VIDEO"]
799
+ },
800
+ contentTypes: ["TRACK", "ALBUM", "PLAYLIST", "VIDEO"]
801
+ }),
802
+ uri: uri.href
803
+ }
804
+ ]
805
+ }));
617
806
  const countryTargetingResource = async (uri) => ({
618
807
  contents: [
619
808
  {
@@ -637,638 +826,596 @@ function registerDynamoiResources(server, adapter) {
637
826
  }
638
827
  ]
639
828
  });
640
- server.registerResource(
641
- "platform-country-targeting",
642
- "dynamoi://platform/country-targeting",
643
- {
644
- description: "Explains Smart Campaign vs YouTube country-targeting catalogs.",
645
- mimeType: "application/json",
646
- title: "Country Targeting"
647
- },
648
- countryTargetingResource
649
- );
650
- server.registerResource(
651
- "platform-supported-countries",
652
- "dynamoi://platform/supported-countries",
653
- {
654
- description: "Legacy alias for country-targeting guidance. Use dynamoi://platform/country-targeting for the canonical resource.",
655
- mimeType: "application/json",
656
- title: "Supported Countries"
657
- },
658
- countryTargetingResource
659
- );
660
- server.registerResource(
661
- "smart-links-free-plan",
662
- "dynamoi://smart-links/free-plan",
663
- {
664
- description: "Canonical explanation of Dynamoi's free Smart Links plan and how it differs from paid managed advertising.",
665
- mimeType: "application/json",
666
- title: "Free Smart Links"
667
- },
668
- async (uri) => ({
669
- contents: [
670
- {
671
- mimeType: "application/json",
672
- text: JSON.stringify({
673
- free: true,
674
- included: [
675
- "Unlimited free Smart Links for supported Spotify artist, album, and track URLs",
676
- "Artist hub pages for catalog-level Smart Links",
677
- "Smart Link analytics",
678
- "Artist-level themes",
679
- "Validated Meta, TikTok, and Google Ads pixel IDs",
680
- "Publish and unpublish controls"
681
- ],
682
- noCatch: "No per-link fee for Smart Link creation or management. High-popularity or unverifiable artist links may stay unpublished in verification hold until Dynamoi can verify the client relationship.",
683
- paidSeparately: "Managed advertising campaigns and ad budgets are separate paid products."
684
- }),
685
- uri: uri.href
686
- }
687
- ]
688
- })
689
- );
690
- server.registerResource(
691
- "smart-links-capabilities",
692
- "dynamoi://smart-links/capabilities",
693
- { mimeType: "application/json", title: "Smart Link Capabilities" },
694
- async (uri) => ({
695
- contents: [
696
- {
697
- mimeType: "application/json",
698
- text: JSON.stringify({
699
- artistCatalogWorkflow: "Use dynamoi_create_smart_links_from_spotify_artist for Spotify artist URLs when the user wants the artist hub, catalog import, or all links. The tool creates/returns a starter link immediately and starts the background catalog import so the user does not need the dashboard.",
700
- creationInputs: {
701
- supportedSpotifyKinds: ["artist", "album", "track"],
702
- unsupportedToday: ["playlist"]
703
- },
704
- mutableFields: {
705
- artistLevel: [
706
- "defaultTheme",
707
- "metaPixelId",
708
- "tiktokPixelId",
709
- "googleAdsConversionId"
710
- ],
711
- perLink: ["customDescription", "publishState"]
712
- },
713
- pixelPolicy: "Only validated pixel IDs are accepted. Arbitrary JavaScript, tag snippets, and script URLs are not supported.",
714
- themes: ["classic", "brutalist", "aurora", "cinematic"]
715
- }),
716
- uri: uri.href
717
- }
718
- ]
719
- })
720
- );
721
- server.registerResource(
722
- "business-free-vs-paid",
723
- "dynamoi://business/free-vs-paid",
724
- {
725
- description: "Clear boundary between free Dynamoi Smart Links and paid managed advertising.",
726
- mimeType: "application/json",
727
- title: "Free Smart Links vs Paid Campaigns"
728
- },
729
- async (uri) => ({
730
- contents: [
731
- {
732
- mimeType: "application/json",
733
- text: JSON.stringify({
734
- agentGuidance: "Do not imply that a Smart Link creates an ad campaign. Do not imply that campaign budgets are free.",
735
- freeSmartLinks: {
736
- claim: "Smart Links are free to create and manage. High-popularity or unverifiable artist links may require verification before public publishing.",
737
- useFor: "Spotify landing pages, public release links, link sharing, basic link analytics, artist-level themes, and validated pixel IDs."
738
- },
739
- managedAdvertising: {
740
- paid: true,
741
- pricing: "Billing and payment setup happen in the Dynamoi dashboard, outside ChatGPT.",
742
- useFor: "Managed Meta and Google ad campaigns for Spotify promotion and YouTube channel growth."
743
- }
744
- }),
745
- uri: uri.href
746
- }
747
- ]
748
- })
749
- );
750
- server.registerResource(
751
- "smart-links-agent-guide",
752
- "dynamoi://smart-links/agent-guide",
753
- {
754
- description: "How agents should answer Smart Link questions using Dynamoi MCP tools.",
755
- mimeType: "application/json",
756
- title: "Smart Link Agent Guide"
757
- },
758
- async (uri) => ({
759
- contents: [
760
- {
761
- mimeType: "application/json",
762
- text: JSON.stringify({
763
- answerWith: [
764
- "artist hub URL when present",
765
- "release title",
766
- "artist name",
767
- "public URL",
768
- "publish/live status",
769
- "one next action when relevant"
770
- ],
771
- avoidByDefault: [
772
- "internal UUIDs",
773
- "database model names",
774
- "workflow IDs",
775
- "provider implementation details"
829
+ server.registerResource("platform-country-targeting", "dynamoi://platform/country-targeting", {
830
+ description: "Explains Smart Campaign vs YouTube country-targeting catalogs.",
831
+ mimeType: "application/json",
832
+ title: "Country Targeting"
833
+ }, countryTargetingResource);
834
+ server.registerResource("platform-supported-countries", "dynamoi://platform/supported-countries", {
835
+ description: "Legacy alias for country-targeting guidance. Use dynamoi://platform/country-targeting for the canonical resource.",
836
+ mimeType: "application/json",
837
+ title: "Supported Countries"
838
+ }, countryTargetingResource);
839
+ server.registerResource("smart-links-free-plan", "dynamoi://smart-links/free-plan", {
840
+ description: "Canonical explanation of Dynamoi's free Smart Links plan and how it differs from paid managed advertising.",
841
+ mimeType: "application/json",
842
+ title: "Free Smart Links"
843
+ }, async (uri) => ({
844
+ contents: [
845
+ {
846
+ mimeType: "application/json",
847
+ text: JSON.stringify({
848
+ free: true,
849
+ included: [
850
+ "Unlimited free Smart Links for supported Spotify artist, album, and track URLs",
851
+ "Artist hub pages for catalog-level Smart Links",
852
+ "Smart Link analytics",
853
+ "Artist-level themes",
854
+ "Validated Meta, TikTok, and Google Ads pixel IDs",
855
+ "Artist-level public availability controls"
856
+ ],
857
+ noCatch: "No per-link fee for Smart Link creation or management. High-popularity or unverifiable artist links may stay unpublished in verification hold until Dynamoi can verify the client relationship.",
858
+ paidSeparately: "Managed advertising campaigns and ad budgets are separate paid products."
859
+ }),
860
+ uri: uri.href
861
+ }
862
+ ]
863
+ }));
864
+ server.registerResource("smart-links-capabilities", "dynamoi://smart-links/capabilities", { mimeType: "application/json", title: "Smart Link Capabilities" }, async (uri) => ({
865
+ contents: [
866
+ {
867
+ mimeType: "application/json",
868
+ text: JSON.stringify({
869
+ artistCatalogWorkflow: "Use dynamoi_create_smart_links_from_spotify_artist for Spotify artist URLs when the user wants the artist hub, catalog import, or all links. The tool creates/returns a starter link immediately and starts the background catalog import so the user does not need the dashboard.",
870
+ creationInputs: {
871
+ supportedSpotifyKinds: ["artist", "album", "track"],
872
+ unsupportedToday: ["playlist"]
873
+ },
874
+ mutableFields: {
875
+ artistLevel: [
876
+ "defaultTheme",
877
+ "metaPixelId",
878
+ "tiktokPixelId",
879
+ "googleAdsConversionId"
776
880
  ],
777
- whenToUse: "Use Smart Link tools when the user asks for free release links, artist hubs, full-catalog Spotify landing pages, streaming landing pages, Spotify link pages, Smart Link analytics, themes, pixels, publish state, or public URLs."
778
- }),
779
- uri: uri.href
780
- }
781
- ]
782
- })
783
- );
784
- server.registerResource(
785
- "mcp-tool-answering-rules",
786
- "dynamoi://mcp/tool-answering-rules",
787
- {
788
- description: "General answer rules for Dynamoi MCP tools so agents stop after useful results.",
789
- mimeType: "application/json",
790
- title: "MCP Tool Answering Rules"
791
- },
792
- async (uri) => ({
793
- contents: [
794
- {
795
- mimeType: "application/json",
796
- text: JSON.stringify({
797
- emptyStateRule: "Always call dynamoi_get_account_overview first for routing. If list_artists, list_campaigns, list_smart_links, or search return empty for a brand-new user, do not respond 'no records found' as a terminal answer; consult dynamoi_get_account_overview.recommendedNextActions or dynamoi://playbooks/onboarding-tree.",
798
- genericAdvice: "Answer generic music marketing questions directly unless the user asks about their Dynamoi account or asks Dynamoi to take an action.",
799
- stopRule: "If a read tool already returns the requested fact in summary form, answer the user instead of chaining more read tools.",
800
- userFacingFields: "Prefer names, public URLs, statuses, money display values, and next actions over internal IDs.",
801
- writeRule: "Before write tools, confirm what will change. After success, answer from the returned record."
802
- }),
803
- uri: uri.href
804
- }
805
- ]
806
- })
807
- );
881
+ perLink: ["customDescription"]
882
+ },
883
+ pixelPolicy: "Only validated pixel IDs are accepted. Arbitrary JavaScript, tag snippets, and script URLs are not supported.",
884
+ themes: ["classic", "brutalist", "aurora", "cinematic"]
885
+ }),
886
+ uri: uri.href
887
+ }
888
+ ]
889
+ }));
890
+ server.registerResource("business-free-vs-paid", "dynamoi://business/free-vs-paid", {
891
+ description: "Clear boundary between free Dynamoi Smart Links and paid managed advertising.",
892
+ mimeType: "application/json",
893
+ title: "Free Smart Links vs Paid Campaigns"
894
+ }, async (uri) => ({
895
+ contents: [
896
+ {
897
+ mimeType: "application/json",
898
+ text: JSON.stringify({
899
+ agentGuidance: "Do not imply that a Smart Link creates an ad campaign. Do not imply that campaign budgets are free.",
900
+ freeSmartLinks: {
901
+ claim: "Smart Links are free to create and manage. High-popularity or unverifiable artist links may require verification before public publishing.",
902
+ useFor: "Spotify landing pages, public release links, link sharing, basic link analytics, artist-level themes, and validated pixel IDs."
903
+ },
904
+ managedAdvertising: {
905
+ paid: true,
906
+ pricing: "Billing and payment setup happen in the Dynamoi dashboard, outside ChatGPT.",
907
+ useFor: "Managed Meta and Google ad campaigns for Spotify promotion and YouTube channel growth."
908
+ }
909
+ }),
910
+ uri: uri.href
911
+ }
912
+ ]
913
+ }));
914
+ server.registerResource("smart-links-agent-guide", "dynamoi://smart-links/agent-guide", {
915
+ description: "How agents should answer Smart Link questions using Dynamoi MCP tools.",
916
+ mimeType: "application/json",
917
+ title: "Smart Link Agent Guide"
918
+ }, async (uri) => ({
919
+ contents: [
920
+ {
921
+ mimeType: "application/json",
922
+ text: JSON.stringify({
923
+ answerWith: [
924
+ "artist hub URL when present",
925
+ "release title",
926
+ "artist name",
927
+ "public URL",
928
+ "public status",
929
+ "one next action when relevant"
930
+ ],
931
+ avoidByDefault: [
932
+ "internal UUIDs",
933
+ "database model names",
934
+ "workflow IDs",
935
+ "provider implementation details"
936
+ ],
937
+ whenToUse: "Use Smart Link tools when the user asks for free release links, artist hubs, full-catalog Spotify landing pages, streaming landing pages, Spotify link pages, Smart Link analytics, themes, pixels, public status, or public URLs."
938
+ }),
939
+ uri: uri.href
940
+ }
941
+ ]
942
+ }));
943
+ server.registerResource("mcp-tool-answering-rules", "dynamoi://mcp/tool-answering-rules", {
944
+ description: "General answer rules for Dynamoi MCP tools so agents stop after useful results.",
945
+ mimeType: "application/json",
946
+ title: "MCP Tool Answering Rules"
947
+ }, async (uri) => ({
948
+ contents: [
949
+ {
950
+ mimeType: "application/json",
951
+ text: JSON.stringify({
952
+ emptyStateRule: "Always call dynamoi_get_account_overview first for routing. If list_artists, list_campaigns, list_smart_links, or search return empty for a brand-new user, do not respond 'no records found' as a terminal answer; consult dynamoi_get_account_overview.recommendedNextActions or dynamoi://playbooks/onboarding-tree.",
953
+ genericAdvice: "Answer generic music marketing questions directly unless the user asks about their Dynamoi account or asks Dynamoi to take an action.",
954
+ stopRule: "If a read tool already returns the requested fact in summary form, answer the user instead of chaining more read tools.",
955
+ userFacingFields: "Prefer names, public URLs, statuses, money display values, and next actions over internal IDs.",
956
+ writeRule: "Before write tools, confirm what will change. After success, answer from the returned record."
957
+ }),
958
+ uri: uri.href
959
+ }
960
+ ]
961
+ }));
808
962
  registerPlaybookResources(server);
809
- server.registerResource(
810
- "music-marketing-when-to-use-dynamoi",
811
- "dynamoi://music-marketing/when-to-use-dynamoi",
812
- {
813
- description: "When an assistant should use Dynamoi account tools versus answering music marketing questions natively.",
814
- mimeType: "application/json",
815
- title: "When To Use Dynamoi"
816
- },
817
- async (uri) => ({
818
- contents: [
819
- {
820
- mimeType: "application/json",
821
- text: JSON.stringify({
822
- answerNativelyFor: [
823
- "general promotion strategy",
824
- "songwriting, branding, release-planning, or content ideas",
825
- "music marketing education that does not require the user's Dynamoi data"
826
- ],
827
- useToolsFor: [
828
- "finding the user's artists, campaigns, Smart Links, billing, platform connections, or analytics",
829
- "creating or editing free Smart Links",
830
- "confirmed campaign mutations such as pause, resume, budget update, or launch workflow"
831
- ]
832
- }),
833
- uri: uri.href
834
- }
835
- ]
836
- })
837
- );
838
- server.registerResource(
839
- "platform-campaign-statuses",
840
- "dynamoi://platform/campaign-statuses",
841
- { mimeType: "application/json", title: "Campaign Statuses" },
842
- async (uri) => ({
843
- contents: [
844
- {
845
- mimeType: "application/json",
846
- text: JSON.stringify({
847
- statuses: [
848
- "AWAITING_SMART_LINK",
849
- "CONTENT_VALIDATION",
850
- "DEPLOYING",
851
- "READY_FOR_REVIEW",
852
- "ACTIVE",
853
- "PAUSED",
854
- "SUBSCRIPTION_PAUSED",
855
- "FAILED",
856
- "ARCHIVED",
857
- "ENDED"
858
- ]
859
- }),
860
- uri: uri.href
861
- }
862
- ]
863
- })
864
- );
865
- server.registerResource(
866
- "artist-resource",
867
- new ResourceTemplate("dynamoi://artist/{artistId}", {
868
- list: async () => ({ resources: [] })
869
- }),
870
- { mimeType: "application/json", title: "Artist" },
871
- async (uri, variables) => {
872
- const artistId = variables["artistId"];
873
- const parsed = z2.string().uuid().safeParse(artistId);
874
- if (!parsed.success) {
875
- return {
876
- contents: [
877
- {
878
- mimeType: "application/json",
879
- text: JSON.stringify({
880
- message: "Invalid artistId",
881
- status: "error"
882
- }),
883
- uri: uri.href
884
- }
963
+ server.registerResource("music-marketing-when-to-use-dynamoi", "dynamoi://music-marketing/when-to-use-dynamoi", {
964
+ description: "When an assistant should use Dynamoi account tools versus answering music marketing questions natively.",
965
+ mimeType: "application/json",
966
+ title: "When To Use Dynamoi"
967
+ }, async (uri) => ({
968
+ contents: [
969
+ {
970
+ mimeType: "application/json",
971
+ text: JSON.stringify({
972
+ answerNativelyFor: [
973
+ "general promotion strategy",
974
+ "songwriting, branding, release-planning, or content ideas",
975
+ "music marketing education that does not require the user's Dynamoi data"
976
+ ],
977
+ useToolsFor: [
978
+ "finding the user's artists, campaigns, Smart Links, billing, platform connections, or analytics",
979
+ "creating or editing free Smart Links",
980
+ "confirmed campaign mutations such as pause, resume, budget update, or launch workflow"
885
981
  ]
886
- };
982
+ }),
983
+ uri: uri.href
887
984
  }
888
- const envelope = await adapter.getArtist({
889
- artistId: parsed.data
890
- });
985
+ ]
986
+ }));
987
+ server.registerResource("platform-campaign-statuses", "dynamoi://platform/campaign-statuses", { mimeType: "application/json", title: "Campaign Statuses" }, async (uri) => ({
988
+ contents: [
989
+ {
990
+ mimeType: "application/json",
991
+ text: JSON.stringify({
992
+ statuses: [
993
+ "AWAITING_SMART_LINK",
994
+ "CONTENT_VALIDATION",
995
+ "DEPLOYING",
996
+ "READY_FOR_REVIEW",
997
+ "ACTIVE",
998
+ "PAUSED",
999
+ "SUBSCRIPTION_PAUSED",
1000
+ "FAILED",
1001
+ "ARCHIVED",
1002
+ "ENDED"
1003
+ ]
1004
+ }),
1005
+ uri: uri.href
1006
+ }
1007
+ ]
1008
+ }));
1009
+ server.registerResource("artist-resource", new ResourceTemplate("dynamoi://artist/{artistId}", {
1010
+ list: async () => ({ resources: [] })
1011
+ }), { mimeType: "application/json", title: "Artist" }, async (uri, variables) => {
1012
+ const artistId = variables["artistId"];
1013
+ const parsed = z4.string().uuid().safeParse(artistId);
1014
+ if (!parsed.success) {
891
1015
  return {
892
1016
  contents: [
893
1017
  {
894
1018
  mimeType: "application/json",
895
- text: JSON.stringify(envelope),
1019
+ text: JSON.stringify({
1020
+ message: "Invalid artistId",
1021
+ status: "error"
1022
+ }),
896
1023
  uri: uri.href
897
1024
  }
898
1025
  ]
899
1026
  };
900
1027
  }
901
- );
902
- server.registerResource(
903
- "campaign-resource",
904
- new ResourceTemplate("dynamoi://campaign/{campaignId}", {
905
- list: async () => ({ resources: [] })
906
- }),
907
- { mimeType: "application/json", title: "Campaign" },
908
- async (uri, variables) => {
909
- const campaignId = variables["campaignId"];
910
- const parsed = z2.string().uuid().safeParse(campaignId);
911
- if (!parsed.success) {
912
- return {
913
- contents: [
914
- {
915
- mimeType: "application/json",
916
- text: JSON.stringify({
917
- message: "Invalid campaignId",
918
- status: "error"
919
- }),
920
- uri: uri.href
921
- }
922
- ]
923
- };
924
- }
925
- const envelope = await adapter.getCampaign({
926
- campaignId: parsed.data
927
- });
1028
+ const envelope = await adapter.getArtist({
1029
+ artistId: parsed.data
1030
+ });
1031
+ return {
1032
+ contents: [
1033
+ {
1034
+ mimeType: "application/json",
1035
+ text: JSON.stringify(envelope),
1036
+ uri: uri.href
1037
+ }
1038
+ ]
1039
+ };
1040
+ });
1041
+ server.registerResource("campaign-resource", new ResourceTemplate("dynamoi://campaign/{campaignId}", {
1042
+ list: async () => ({ resources: [] })
1043
+ }), { mimeType: "application/json", title: "Campaign" }, async (uri, variables) => {
1044
+ const campaignId = variables["campaignId"];
1045
+ const parsed = z4.string().uuid().safeParse(campaignId);
1046
+ if (!parsed.success) {
928
1047
  return {
929
1048
  contents: [
930
1049
  {
931
1050
  mimeType: "application/json",
932
- text: JSON.stringify(envelope),
1051
+ text: JSON.stringify({
1052
+ message: "Invalid campaignId",
1053
+ status: "error"
1054
+ }),
933
1055
  uri: uri.href
934
1056
  }
935
1057
  ]
936
1058
  };
937
1059
  }
938
- );
939
- server.registerResource(
940
- "smart-link-resource",
941
- new ResourceTemplate("dynamoi://smart-link/{playLinkId}", {
942
- list: async () => ({ resources: [] })
943
- }),
944
- { mimeType: "application/json", title: "Smart Link" },
945
- async (uri, variables) => {
946
- const playLinkId = variables["playLinkId"];
947
- const parsed = z2.string().uuid().safeParse(playLinkId);
948
- if (!parsed.success) {
949
- return {
950
- contents: [
951
- {
952
- mimeType: "application/json",
953
- text: JSON.stringify({
954
- message: "Invalid playLinkId",
955
- status: "error"
956
- }),
957
- uri: uri.href
958
- }
959
- ]
960
- };
961
- }
962
- const envelope = await adapter.getSmartLink({
963
- playLinkId: parsed.data
964
- });
1060
+ const envelope = await adapter.getCampaign({
1061
+ campaignId: parsed.data
1062
+ });
1063
+ return {
1064
+ contents: [
1065
+ {
1066
+ mimeType: "application/json",
1067
+ text: JSON.stringify(envelope),
1068
+ uri: uri.href
1069
+ }
1070
+ ]
1071
+ };
1072
+ });
1073
+ server.registerResource("smart-link-resource", new ResourceTemplate("dynamoi://smart-link/{playLinkId}", {
1074
+ list: async () => ({ resources: [] })
1075
+ }), { mimeType: "application/json", title: "Smart Link" }, async (uri, variables) => {
1076
+ const playLinkId = variables["playLinkId"];
1077
+ const parsed = z4.string().uuid().safeParse(playLinkId);
1078
+ if (!parsed.success) {
965
1079
  return {
966
1080
  contents: [
967
1081
  {
968
1082
  mimeType: "application/json",
969
- text: JSON.stringify(envelope),
1083
+ text: JSON.stringify({
1084
+ message: "Invalid playLinkId",
1085
+ status: "error"
1086
+ }),
970
1087
  uri: uri.href
971
1088
  }
972
1089
  ]
973
1090
  };
974
1091
  }
975
- );
976
- server.registerResource(
977
- "smart-link-artist-settings-resource",
978
- new ResourceTemplate("dynamoi://artist/{artistId}/smart-link-settings", {
979
- list: async () => ({ resources: [] })
980
- }),
981
- { mimeType: "application/json", title: "Smart Link Artist Settings" },
982
- async (uri, variables) => {
983
- const artistId = variables["artistId"];
984
- const parsed = z2.string().uuid().safeParse(artistId);
985
- if (!parsed.success) {
986
- return {
987
- contents: [
988
- {
989
- mimeType: "application/json",
990
- text: JSON.stringify({
991
- message: "Invalid artistId",
992
- status: "error"
993
- }),
994
- uri: uri.href
995
- }
996
- ]
997
- };
998
- }
999
- const envelope = await adapter.getSmartLinkArtistSettings({
1000
- artistId: parsed.data
1001
- });
1092
+ const envelope = await adapter.getSmartLink({
1093
+ playLinkId: parsed.data
1094
+ });
1095
+ return {
1096
+ contents: [
1097
+ {
1098
+ mimeType: "application/json",
1099
+ text: JSON.stringify(envelope),
1100
+ uri: uri.href
1101
+ }
1102
+ ]
1103
+ };
1104
+ });
1105
+ server.registerResource("smart-link-artist-settings-resource", new ResourceTemplate("dynamoi://artist/{artistId}/smart-link-settings", {
1106
+ list: async () => ({ resources: [] })
1107
+ }), { mimeType: "application/json", title: "Smart Link Artist Settings" }, async (uri, variables) => {
1108
+ const artistId = variables["artistId"];
1109
+ const parsed = z4.string().uuid().safeParse(artistId);
1110
+ if (!parsed.success) {
1002
1111
  return {
1003
1112
  contents: [
1004
1113
  {
1005
1114
  mimeType: "application/json",
1006
- text: JSON.stringify(envelope),
1115
+ text: JSON.stringify({
1116
+ message: "Invalid artistId",
1117
+ status: "error"
1118
+ }),
1007
1119
  uri: uri.href
1008
1120
  }
1009
1121
  ]
1010
1122
  };
1011
1123
  }
1012
- );
1124
+ const envelope = await adapter.getSmartLinkArtistSettings({
1125
+ artistId: parsed.data
1126
+ });
1127
+ return {
1128
+ contents: [
1129
+ {
1130
+ mimeType: "application/json",
1131
+ text: JSON.stringify(envelope),
1132
+ uri: uri.href
1133
+ }
1134
+ ]
1135
+ };
1136
+ });
1137
+ }
1138
+
1139
+ // src/server/smart-link-theme-preview.ts
1140
+ import * as z5 from "zod/v4";
1141
+ var SMART_LINK_THEME_PREVIEW_RESOURCE_URI = "ui://dynamoi/smart-link-theme-preview-v1.html";
1142
+ var SampleTextSchema = z5.string().trim().min(1).max(80);
1143
+ var DynamoiPreviewSmartLinkThemesInputSchema = z5.object({
1144
+ artistName: SampleTextSchema.optional(),
1145
+ releaseTitle: SampleTextSchema.optional()
1146
+ }).strict();
1147
+ var SMART_LINK_THEME_PREVIEW_TOOL_DEFINITION = {
1148
+ description: "Use this when the user asks what Dynamoi Smart Link pages can look like, wants to compare Smart Link themes, or asks to preview the available themes before creating or updating a free Smart Link. This is a read-only visual preview and does not create, publish, update, or promote a Smart Link.",
1149
+ destructiveHint: false,
1150
+ name: "dynamoi_preview_smart_link_themes",
1151
+ openWorldHint: false,
1152
+ outputSchema: AnyOutputEnvelopeSchema,
1153
+ readOnlyHint: true,
1154
+ schema: DynamoiPreviewSmartLinkThemesInputSchema,
1155
+ title: "Preview Smart Link Themes"
1156
+ };
1157
+ function previewSmartLinkThemes(rawInput) {
1158
+ const input = DynamoiPreviewSmartLinkThemesInputSchema.parse(rawInput ?? {});
1159
+ const artistName = input.artistName ?? "Dynamoi Artist";
1160
+ const releaseTitle = input.releaseTitle ?? "New Single";
1161
+ const themes = [
1162
+ {
1163
+ accentColor: "#2ef2a2",
1164
+ backgroundColor: "#f8f6ef",
1165
+ description: "Clean editorial layout for release pages that should feel calm and polished.",
1166
+ id: "classic",
1167
+ name: "Classic",
1168
+ textColor: "#171717"
1169
+ },
1170
+ {
1171
+ accentColor: "#ffe45c",
1172
+ backgroundColor: "#111111",
1173
+ description: "Bold, poster-like treatment for artists who want sharp contrast and direct calls to action.",
1174
+ id: "brutalist",
1175
+ name: "Brutalist",
1176
+ textColor: "#f5f5f5"
1177
+ },
1178
+ {
1179
+ accentColor: "#73f7ff",
1180
+ backgroundColor: "#12172f",
1181
+ description: "Color-rich gradient atmosphere for pop, electronic, and high-energy releases.",
1182
+ id: "aurora",
1183
+ name: "Aurora",
1184
+ textColor: "#f8fbff"
1185
+ },
1186
+ {
1187
+ accentColor: "#ffb36b",
1188
+ backgroundColor: "#191512",
1189
+ description: "Moody cover-forward layout for cinematic, intimate, or premium release moments.",
1190
+ id: "cinematic",
1191
+ name: "Cinematic",
1192
+ textColor: "#fff6eb"
1193
+ }
1194
+ ];
1195
+ return {
1196
+ data: {
1197
+ artistName,
1198
+ releaseTitle,
1199
+ summary: "Dynamoi Smart Links support four visual themes: Classic, Brutalist, Aurora, and Cinematic.",
1200
+ themes,
1201
+ widgetResourceUri: SMART_LINK_THEME_PREVIEW_RESOURCE_URI
1202
+ },
1203
+ status: "success"
1204
+ };
1205
+ }
1206
+ var SMART_LINK_THEME_PREVIEW_HTML = `
1207
+ <div class="shell">
1208
+ <header>
1209
+ <p class="eyebrow">Smart Link themes</p>
1210
+ <h1 id="title">New Single</h1>
1211
+ <p id="artist">Dynamoi Artist</p>
1212
+ </header>
1213
+ <section id="themes" class="themes" aria-label="Smart Link theme previews"></section>
1214
+ </div>
1215
+ <script>
1216
+ const fallback = {
1217
+ artistName: "Dynamoi Artist",
1218
+ releaseTitle: "New Single",
1219
+ themes: [
1220
+ { id: "classic", name: "Classic", description: "Clean editorial layout for release pages that should feel calm and polished.", backgroundColor: "#f8f6ef", textColor: "#171717", accentColor: "#2ef2a2" },
1221
+ { id: "brutalist", name: "Brutalist", description: "Bold, poster-like treatment for artists who want sharp contrast and direct calls to action.", backgroundColor: "#111111", textColor: "#f5f5f5", accentColor: "#ffe45c" },
1222
+ { id: "aurora", name: "Aurora", description: "Color-rich gradient atmosphere for pop, electronic, and high-energy releases.", backgroundColor: "#12172f", textColor: "#f8fbff", accentColor: "#73f7ff" },
1223
+ { id: "cinematic", name: "Cinematic", description: "Moody cover-forward layout for cinematic, intimate, or premium release moments.", backgroundColor: "#191512", textColor: "#fff6eb", accentColor: "#ffb36b" }
1224
+ ]
1225
+ };
1226
+ function normalize(output) {
1227
+ const candidate = output?.data ?? output?.structuredContent?.data ?? output?.structuredContent ?? output;
1228
+ return candidate?.themes ? candidate : fallback;
1229
+ }
1230
+ function render(output) {
1231
+ const data = normalize(output);
1232
+ document.getElementById("title").textContent = data.releaseTitle ?? fallback.releaseTitle;
1233
+ document.getElementById("artist").textContent = data.artistName ?? fallback.artistName;
1234
+ const themes = Array.isArray(data.themes) ? data.themes : fallback.themes;
1235
+ const allowedThemeIds = new Set(["classic", "brutalist", "aurora", "cinematic"]);
1236
+ document.getElementById("themes").replaceChildren(...themes.map((theme) => {
1237
+ const article = document.createElement("article");
1238
+ article.className = "theme";
1239
+ if (allowedThemeIds.has(theme.id)) article.classList.add("theme-" + theme.id);
1240
+ article.style.backgroundColor = theme.backgroundColor;
1241
+ article.style.color = theme.textColor;
1242
+
1243
+ const cover = document.createElement("div");
1244
+ cover.className = "cover";
1245
+ cover.style.backgroundColor = theme.accentColor;
1246
+ cover.append(document.createElement("span"));
1247
+
1248
+ const copy = document.createElement("div");
1249
+ copy.className = "theme-copy";
1250
+ const name = document.createElement("h2");
1251
+ name.textContent = theme.name;
1252
+ const description = document.createElement("p");
1253
+ description.textContent = theme.description;
1254
+ copy.append(name, description);
1255
+
1256
+ const cta = document.createElement("span");
1257
+ cta.className = "preview-cta";
1258
+ cta.style.borderColor = theme.accentColor;
1259
+ cta.style.color = theme.textColor;
1260
+ cta.textContent = "Listen on Spotify";
1261
+ article.append(cover, copy, cta);
1262
+ return article;
1263
+ }));
1264
+ }
1265
+ render(window.openai?.toolOutput);
1266
+ window.addEventListener("openai:set_globals", (event) => {
1267
+ render(event.detail?.globals?.toolOutput ?? window.openai?.toolOutput);
1268
+ }, { passive: true });
1269
+ </script>
1270
+ <style>
1271
+ :root {
1272
+ color-scheme: light dark;
1273
+ font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
1274
+ }
1275
+ * { box-sizing: border-box; }
1276
+ body { margin: 0; }
1277
+ .shell {
1278
+ background: #f4f1e8;
1279
+ color: #151515;
1280
+ min-height: 100vh;
1281
+ padding: 18px;
1282
+ }
1283
+ header {
1284
+ display: grid;
1285
+ gap: 3px;
1286
+ margin: 0 0 14px;
1287
+ }
1288
+ .eyebrow {
1289
+ color: #5f675f;
1290
+ font-size: 12px;
1291
+ font-weight: 700;
1292
+ letter-spacing: 0;
1293
+ margin: 0;
1294
+ text-transform: uppercase;
1295
+ }
1296
+ h1 {
1297
+ font-size: 28px;
1298
+ line-height: 1;
1299
+ margin: 0;
1300
+ }
1301
+ header p:last-child {
1302
+ color: #59605a;
1303
+ font-size: 14px;
1304
+ margin: 0;
1305
+ }
1306
+ .themes {
1307
+ display: grid;
1308
+ gap: 12px;
1309
+ grid-template-columns: repeat(2, minmax(0, 1fr));
1310
+ }
1311
+ .theme {
1312
+ border-radius: 8px;
1313
+ display: grid;
1314
+ gap: 10px;
1315
+ min-height: 232px;
1316
+ overflow: hidden;
1317
+ padding: 12px;
1318
+ }
1319
+ .cover {
1320
+ aspect-ratio: 1;
1321
+ border-radius: 6px;
1322
+ display: grid;
1323
+ overflow: hidden;
1324
+ place-items: center;
1325
+ }
1326
+ .cover span {
1327
+ background: rgba(255, 255, 255, 0.62);
1328
+ border: 1px solid rgba(0, 0, 0, 0.08);
1329
+ border-radius: 999px;
1330
+ display: block;
1331
+ height: 54%;
1332
+ width: 54%;
1333
+ }
1334
+ .theme-aurora .cover {
1335
+ background: linear-gradient(135deg, #73f7ff, #ff6bd6 58%, #f6ff87) !important;
1336
+ }
1337
+ .theme-cinematic .cover {
1338
+ background: radial-gradient(circle at 48% 32%, #ffb36b, #7b3f2b 52%, #191512 76%) !important;
1339
+ }
1340
+ .theme h2 {
1341
+ font-size: 18px;
1342
+ line-height: 1.1;
1343
+ margin: 0 0 4px;
1344
+ }
1345
+ .theme p {
1346
+ font-size: 12px;
1347
+ line-height: 1.35;
1348
+ margin: 0;
1349
+ opacity: 0.78;
1350
+ }
1351
+ .preview-cta {
1352
+ background: transparent;
1353
+ border: 1px solid currentColor;
1354
+ border-radius: 999px;
1355
+ font: inherit;
1356
+ font-size: 12px;
1357
+ font-weight: 700;
1358
+ min-height: 34px;
1359
+ padding: 6px 10px;
1360
+ width: 100%;
1361
+ }
1362
+ @media (max-width: 520px) {
1363
+ .shell { padding: 14px; }
1364
+ .themes { grid-template-columns: 1fr; }
1365
+ h1 { font-size: 24px; }
1366
+ .theme {
1367
+ grid-template-columns: 82px minmax(0, 1fr);
1368
+ min-height: 0;
1369
+ }
1370
+ .cover { grid-row: span 2; }
1371
+ .preview-cta { grid-column: 2; }
1372
+ }
1373
+ </style>
1374
+ `.trim();
1375
+ function registerSmartLinkThemePreviewResource(server) {
1376
+ server.registerResource("smart-link-theme-preview", SMART_LINK_THEME_PREVIEW_RESOURCE_URI, {
1377
+ description: "Visual preview for the four Dynamoi Smart Link page themes.",
1378
+ mimeType: "text/html;profile=mcp-app",
1379
+ title: "Smart Link Theme Preview"
1380
+ }, async () => ({
1381
+ contents: [
1382
+ {
1383
+ _meta: {
1384
+ ui: {
1385
+ csp: {
1386
+ connectDomains: [],
1387
+ resourceDomains: []
1388
+ },
1389
+ domain: "https://dynamoi.com",
1390
+ prefersBorder: true
1391
+ }
1392
+ },
1393
+ mimeType: "text/html;profile=mcp-app",
1394
+ text: SMART_LINK_THEME_PREVIEW_HTML,
1395
+ uri: SMART_LINK_THEME_PREVIEW_RESOURCE_URI
1396
+ }
1397
+ ]
1398
+ }));
1013
1399
  }
1014
1400
 
1015
1401
  // src/server/smart-link-tools.ts
1016
- import * as z5 from "zod/v4";
1017
-
1018
- // src/server/output-schemas.ts
1019
- import * as z3 from "zod/v4";
1020
- var MoneyDisplayOutputSchema = z3.object({
1021
- amountUsd: z3.number(),
1022
- formatted: z3.string()
1023
- }).strict();
1024
- var ErrorEnvelopeOutputSchema = z3.object({
1025
- kind: z3.enum(["validation", "business", "platform", "unknown"]).optional(),
1026
- message: z3.string(),
1027
- status: z3.literal("error")
1028
- }).strict();
1029
- var AnyToolDataOutputSchema = z3.object({}).passthrough();
1030
- var MediaAssetSummaryOutputSchema = z3.object({
1031
- aspectRatio: z3.string().optional(),
1032
- createdAt: z3.string(),
1033
- fileName: z3.string().optional(),
1034
- fileType: z3.string(),
1035
- height: z3.number().optional(),
1036
- id: z3.string(),
1037
- url: z3.string().optional(),
1038
- urlExpiresAt: z3.string().optional(),
1039
- width: z3.number().optional()
1040
- }).strict();
1041
- var ListMediaAssetsDataOutputSchema = z3.object({
1042
- assets: z3.array(MediaAssetSummaryOutputSchema),
1043
- nextCursor: z3.string().optional()
1044
- }).strict();
1045
- var ListMediaAssetsSummaryOutputSchema = z3.object({
1046
- nextCursor: z3.string().optional(),
1047
- summary: z3.string(),
1048
- totalCount: z3.number()
1049
- }).strict();
1050
- var SmartLinkStatusSchemas = {
1051
- claimStatus: z3.enum([
1052
- "auto_approved",
1053
- "pending_ops_review",
1054
- "verification_deferred",
1055
- "approved_by_ops",
1056
- "rejected"
1057
- ]),
1058
- odesliStatus: z3.enum(["pending", "resolved", "failed"]),
1059
- publishState: z3.enum(["published", "unpublished"]),
1060
- renderState: z3.enum(["queued", "rendering", "rendered", "failed"]),
1061
- takedownStatus: z3.enum(["none", "active", "resolved"]),
1062
- theme: z3.enum(["classic", "brutalist", "aurora", "cinematic"])
1063
- };
1064
- var SmartLinkSummaryOutputSchema = z3.object({
1065
- artistHubUrl: z3.string(),
1066
- artistId: z3.string(),
1067
- artistName: z3.string(),
1068
- claimStatus: SmartLinkStatusSchemas.claimStatus,
1069
- createdAt: z3.string(),
1070
- id: z3.string(),
1071
- isPublic: z3.boolean(),
1072
- localizedPublicUrls: z3.array(z3.string()).optional(),
1073
- odesliStatus: SmartLinkStatusSchemas.odesliStatus,
1074
- publicUrl: z3.string(),
1075
- publishState: SmartLinkStatusSchemas.publishState,
1076
- releaseSlug: z3.string(),
1077
- releaseTitle: z3.string(),
1078
- releaseType: z3.string(),
1079
- renderState: SmartLinkStatusSchemas.renderState,
1080
- spotifyUrl: z3.string().nullable(),
1081
- takedownStatus: SmartLinkStatusSchemas.takedownStatus,
1082
- theme: SmartLinkStatusSchemas.theme,
1083
- updatedAt: z3.string()
1084
- }).strict();
1085
- var SmartLinkDetailsOutputSchema = SmartLinkSummaryOutputSchema.extend({
1086
- actionRequired: z3.array(z3.string()).optional(),
1087
- customDescription: z3.string().nullable(),
1088
- nextActions: z3.array(z3.string()),
1089
- originalSpotifyUrl: z3.string().nullable(),
1090
- resourceUri: z3.string(),
1091
- settingsResourceUri: z3.string(),
1092
- spotifyDiscographyId: z3.string(),
1093
- summary: z3.string(),
1094
- warnings: z3.array(z3.string()).optional()
1095
- }).strict();
1096
- var ListSmartLinksDataOutputSchema = z3.object({
1097
- nextCursor: z3.string().optional(),
1098
- smartLinks: z3.array(SmartLinkSummaryOutputSchema)
1099
- }).strict();
1100
- var ListSmartLinksSummaryOutputSchema = z3.object({
1101
- nextCursor: z3.string().optional(),
1102
- summary: z3.string(),
1103
- totalCount: z3.number()
1104
- }).strict();
1105
- var AvailableCountryOutputSchema = z3.object({
1106
- code: z3.string(),
1107
- dominantLanguage: z3.string().optional(),
1108
- googleAdsId: z3.number(),
1109
- name: z3.string()
1110
- }).strict();
1111
- var ListAvailableCountriesDataOutputSchema = z3.object({
1112
- campaignType: z3.enum(["SMART_CAMPAIGN", "YOUTUBE"]),
1113
- countries: z3.array(AvailableCountryOutputSchema),
1114
- nextCursor: z3.string().optional(),
1115
- notes: z3.array(z3.string()),
1116
- source: z3.enum(["SMART_CAMPAIGN_COUNTRIES", "GOOGLE_ADS_COUNTRIES"]),
1117
- totalCount: z3.number()
1118
- }).strict();
1119
- var SummaryCountOutputSchema = z3.object({
1120
- nextCursor: z3.string().optional(),
1121
- summary: z3.string(),
1122
- totalCount: z3.number()
1123
- }).strict();
1124
- var SummaryWarningsActionsOutputSchema = z3.object({
1125
- actionRequired: z3.array(z3.string()).optional(),
1126
- summary: z3.string(),
1127
- warnings: z3.array(z3.string()).optional()
1128
- }).strict();
1129
- var NormalizedTargetingOutputSchema = z3.union([
1130
- z3.object({ mode: z3.literal("GLOBAL") }).strict(),
1131
- z3.object({
1132
- countries: z3.array(
1133
- z3.object({ code: z3.string(), name: z3.string() }).strict()
1134
- ),
1135
- mode: z3.literal("COUNTRIES")
1136
- }).strict()
1137
- ]);
1138
- var GetCampaignReadinessDataOutputSchema = z3.object({
1139
- artistId: z3.string(),
1140
- artistName: z3.string(),
1141
- blockingIssues: z3.array(z3.string()),
1142
- campaignType: z3.enum(["SMART_CAMPAIGN", "YOUTUBE"]),
1143
- isReady: z3.boolean(),
1144
- missingInputs: z3.array(z3.string()),
1145
- normalizedTargeting: NormalizedTargetingOutputSchema,
1146
- recommendedNextAction: z3.string(),
1147
- warnings: z3.array(z3.string())
1148
- }).strict();
1149
- var CreateSmartLinkFromSpotifyDataOutputSchema = SmartLinkDetailsOutputSchema.extend({
1150
- outcome: z3.enum(["created", "existing"]),
1151
- workflowRunId: z3.string().nullable(),
1152
- workflowWarning: z3.string().nullable()
1153
- }).strict();
1154
- var CreateSmartLinksFromSpotifyArtistDataOutputSchema = z3.object({
1155
- artistCreatedFromSpotify: z3.boolean().optional(),
1156
- artistHubUrl: z3.string(),
1157
- artistId: z3.string(),
1158
- artistName: z3.string(),
1159
- catalogImportStatus: z3.enum(["started", "start_failed"]),
1160
- catalogWorkflowRunId: z3.string().nullable(),
1161
- currentSmartLinkCount: z3.number(),
1162
- existingCount: z3.number(),
1163
- initialRenderRunId: z3.string().nullable(),
1164
- initialSmartLink: SmartLinkSummaryOutputSchema.nullable(),
1165
- newlyAvailableCount: z3.number(),
1166
- nextActions: z3.array(z3.string()),
1167
- smartLinks: z3.array(SmartLinkSummaryOutputSchema),
1168
- spotifyArtistUrl: z3.string(),
1169
- summary: z3.string(),
1170
- warnings: z3.array(z3.string()).optional()
1171
- }).strict();
1172
- var LaunchCampaignDataOutputSchema = z3.object({
1173
- budget: MoneyDisplayOutputSchema,
1174
- budgetType: z3.enum(["DAILY", "TOTAL"]),
1175
- campaignType: z3.enum(["SMART_CAMPAIGN", "YOUTUBE"]),
1176
- contentTitle: z3.string(),
1177
- deliveryState: z3.enum(["ACTIVE", "PENDING_REVIEW", "CONTENT_VALIDATION"]),
1178
- id: z3.string(),
1179
- isLive: z3.boolean(),
1180
- nextSteps: z3.array(z3.string()),
1181
- platforms: z3.array(z3.string()),
1182
- status: z3.string(),
1183
- summary: z3.string(),
1184
- warnings: z3.array(z3.string()).optional()
1185
- }).strict();
1186
- var AnyOutputEnvelopeSchema = z3.union([
1187
- z3.object({ data: AnyToolDataOutputSchema, status: z3.literal("success") }),
1188
- z3.object({
1189
- data: AnyToolDataOutputSchema,
1190
- message: z3.string(),
1191
- status: z3.literal("partial_success")
1192
- }),
1193
- ErrorEnvelopeOutputSchema
1194
- ]);
1195
- var ListMediaAssetsOutputEnvelopeSchema = z3.union([
1196
- z3.object({
1197
- data: z3.union([
1198
- ListMediaAssetsDataOutputSchema,
1199
- ListMediaAssetsSummaryOutputSchema
1200
- ]),
1201
- status: z3.literal("success")
1202
- }),
1203
- ErrorEnvelopeOutputSchema
1204
- ]);
1205
- var LaunchCampaignOutputEnvelopeSchema = z3.union([
1206
- z3.object({
1207
- data: LaunchCampaignDataOutputSchema,
1208
- status: z3.literal("success")
1209
- }),
1210
- ErrorEnvelopeOutputSchema
1211
- ]);
1212
- var ListAvailableCountriesOutputEnvelopeSchema = z3.union([
1213
- z3.object({
1214
- data: z3.union([
1215
- ListAvailableCountriesDataOutputSchema,
1216
- SummaryCountOutputSchema
1217
- ]),
1218
- status: z3.literal("success")
1219
- }),
1220
- ErrorEnvelopeOutputSchema
1221
- ]);
1222
- var GetCampaignReadinessOutputEnvelopeSchema = z3.union([
1223
- z3.object({
1224
- data: z3.union([
1225
- GetCampaignReadinessDataOutputSchema,
1226
- SummaryWarningsActionsOutputSchema
1227
- ]),
1228
- status: z3.literal("success")
1229
- }),
1230
- ErrorEnvelopeOutputSchema
1231
- ]);
1232
- var CreateSmartLinkFromSpotifyOutputEnvelopeSchema = z3.union([
1233
- z3.object({
1234
- data: CreateSmartLinkFromSpotifyDataOutputSchema,
1235
- status: z3.literal("success")
1236
- }),
1237
- ErrorEnvelopeOutputSchema
1238
- ]);
1239
- var CreateSmartLinksFromSpotifyArtistOutputEnvelopeSchema = z3.union([
1240
- z3.object({
1241
- data: CreateSmartLinksFromSpotifyArtistDataOutputSchema,
1242
- status: z3.literal("success")
1243
- }),
1244
- ErrorEnvelopeOutputSchema
1245
- ]);
1246
- var ListSmartLinksOutputEnvelopeSchema = z3.union([
1247
- z3.object({
1248
- data: z3.union([
1249
- ListSmartLinksDataOutputSchema,
1250
- ListSmartLinksSummaryOutputSchema
1251
- ]),
1252
- status: z3.literal("success")
1253
- }),
1254
- ErrorEnvelopeOutputSchema
1255
- ]);
1402
+ import * as z7 from "zod/v4";
1256
1403
 
1257
1404
  // src/server/shared-schemas.ts
1258
- import * as z4 from "zod/v4";
1259
- var ToolFormatSchema = z4.enum(["json", "summary"]);
1260
- var IsoDateSchema = z4.string().regex(/^\d{4}-\d{2}-\d{2}$/);
1261
- var UserIntentSummarySchema = z4.string().trim().max(500).optional();
1262
- var ClientRequestIdSchema = z4.string().uuid().optional();
1263
- var RequiredClientRequestIdSchema = z4.string().uuid();
1405
+ import * as z6 from "zod/v4";
1406
+ var ToolFormatSchema = z6.enum(["json", "summary"]);
1407
+ var IsoDateSchema = z6.string().regex(/^\d{4}-\d{2}-\d{2}$/);
1408
+ var UserIntentSummarySchema = z6.string().trim().max(500).optional();
1409
+ var ClientRequestIdSchema = z6.string().uuid().optional();
1410
+ var RequiredClientRequestIdSchema = z6.string().uuid();
1264
1411
  function isValidCalendarDate(value) {
1265
- const date = /* @__PURE__ */ new Date(`${value}T00:00:00.000Z`);
1412
+ const date = new Date(`${value}T00:00:00.000Z`);
1266
1413
  return Number.isFinite(date.getTime()) && date.toISOString().slice(0, 10) === value;
1267
1414
  }
1268
1415
  var IsoCalendarDateSchema = IsoDateSchema.refine(isValidCalendarDate, {
1269
1416
  message: "must be a valid calendar date"
1270
1417
  });
1271
- var DateRangeSchema = z4.object({
1418
+ var DateRangeSchema = z6.object({
1272
1419
  end: IsoDateSchema,
1273
1420
  start: IsoDateSchema
1274
1421
  }).strict().superRefine((data, ctx) => {
@@ -1297,25 +1444,23 @@ var DateRangeSchema = z4.object({
1297
1444
 
1298
1445
  // src/server/smart-link-tools.ts
1299
1446
  var SmartLinkStatusFiltersSchema = {
1300
- claimStatus: z5.enum([
1447
+ claimStatus: z7.enum([
1301
1448
  "auto_approved",
1302
1449
  "pending_ops_review",
1303
1450
  "verification_deferred",
1304
1451
  "approved_by_ops",
1305
1452
  "rejected"
1306
1453
  ]).optional(),
1307
- publishState: z5.enum(["published", "unpublished"]).optional(),
1308
- renderState: z5.enum(["queued", "rendering", "rendered", "failed"]).optional()
1454
+ publishState: z7.enum(["published", "unpublished"]).optional(),
1455
+ renderState: z7.enum(["queued", "rendering", "rendered", "failed"]).optional()
1309
1456
  };
1310
- var SmartLinkThemeSchema = z5.enum([
1457
+ var SmartLinkThemeSchema = z7.enum([
1311
1458
  "classic",
1312
1459
  "brutalist",
1313
1460
  "aurora",
1314
1461
  "cinematic"
1315
1462
  ]);
1316
- var LegacySmartLinkIncludeSchema = z5.array(
1317
- z5.enum(["analytics", "artist_settings"])
1318
- );
1463
+ var LegacySmartLinkIncludeSchema = z7.array(z7.enum(["analytics", "artist_settings"]));
1319
1464
  function normalizeLegacySmartLinkInclude(rawInput) {
1320
1465
  if (!rawInput || typeof rawInput !== "object" || Array.isArray(rawInput)) {
1321
1466
  return rawInput;
@@ -1324,54 +1469,52 @@ function normalizeLegacySmartLinkInclude(rawInput) {
1324
1469
  if (!Object.hasOwn(input, "include")) {
1325
1470
  return rawInput;
1326
1471
  }
1327
- const legacyInclude = LegacySmartLinkIncludeSchema.safeParse(
1328
- input["include"]
1329
- );
1472
+ const legacyInclude = LegacySmartLinkIncludeSchema.safeParse(input["include"]);
1330
1473
  if (!legacyInclude.success) {
1331
1474
  return rawInput;
1332
1475
  }
1333
1476
  const { include: _include, ...normalized } = input;
1334
- if (normalized["includeAnalytics"] === void 0 && legacyInclude.data.includes("analytics")) {
1477
+ if (normalized["includeAnalytics"] === undefined && legacyInclude.data.includes("analytics")) {
1335
1478
  normalized["includeAnalytics"] = true;
1336
1479
  }
1337
- if (normalized["includeArtistSettings"] === void 0 && legacyInclude.data.includes("artist_settings")) {
1480
+ if (normalized["includeArtistSettings"] === undefined && legacyInclude.data.includes("artist_settings")) {
1338
1481
  normalized["includeArtistSettings"] = true;
1339
1482
  }
1340
1483
  return normalized;
1341
1484
  }
1342
- var DynamoiCreateSmartLinkFromSpotifyInputSchema = z5.object({
1343
- artistId: z5.string().uuid(),
1485
+ var DynamoiCreateSmartLinkFromSpotifyInputSchema = z7.object({
1486
+ artistId: z7.string().uuid(),
1344
1487
  clientRequestId: RequiredClientRequestIdSchema.optional(),
1345
- customDescription: z5.string().trim().max(500).optional(),
1488
+ customDescription: z7.string().trim().max(500).optional(),
1346
1489
  format: ToolFormatSchema.optional(),
1347
- spotifyUrl: z5.string().trim().min(1).max(500),
1490
+ spotifyUrl: z7.string().trim().min(1).max(500),
1348
1491
  userIntentSummary: UserIntentSummarySchema
1349
1492
  }).strict();
1350
- var DynamoiCreateSmartLinksFromSpotifyArtistInputSchema = z5.object({
1351
- artistId: z5.string().uuid().optional(),
1493
+ var DynamoiCreateSmartLinksFromSpotifyArtistInputSchema = z7.object({
1494
+ artistId: z7.string().uuid().optional(),
1352
1495
  clientRequestId: RequiredClientRequestIdSchema.optional(),
1353
1496
  format: ToolFormatSchema.optional(),
1354
- spotifyArtistUrl: z5.string().trim().min(1).max(500),
1497
+ spotifyArtistUrl: z7.string().trim().min(1).max(500),
1355
1498
  userIntentSummary: UserIntentSummarySchema
1356
1499
  }).strict();
1357
- var DynamoiListSmartLinksInputSchema = z5.object({
1358
- artistId: z5.string().uuid(),
1359
- cursor: z5.string().optional(),
1500
+ var DynamoiListSmartLinksInputSchema = z7.object({
1501
+ artistId: z7.string().uuid(),
1502
+ cursor: z7.string().optional(),
1360
1503
  format: ToolFormatSchema.optional(),
1361
- limit: z5.number().int().min(1).max(50).optional(),
1362
- query: z5.string().trim().max(120).optional(),
1504
+ limit: z7.number().int().min(1).max(50).optional(),
1505
+ query: z7.string().trim().max(120).optional(),
1363
1506
  ...SmartLinkStatusFiltersSchema
1364
1507
  }).strict();
1365
1508
  var DynamoiGetSmartLinkInputShape = {
1366
- artistId: z5.string().uuid().optional(),
1509
+ artistId: z7.string().uuid().optional(),
1367
1510
  dateRange: DateRangeSchema.optional(),
1368
1511
  format: ToolFormatSchema.optional(),
1369
- granularity: z5.enum(["TOTAL", "DAILY"]).optional(),
1370
- includeAnalytics: z5.boolean().optional(),
1371
- includeArtistSettings: z5.boolean().optional(),
1372
- includeBreakdowns: z5.boolean().optional(),
1373
- playLinkId: z5.string().uuid().optional(),
1374
- spotifyUrl: z5.string().trim().min(1).max(500).optional()
1512
+ granularity: z7.enum(["TOTAL", "DAILY"]).optional(),
1513
+ includeAnalytics: z7.boolean().optional(),
1514
+ includeArtistSettings: z7.boolean().optional(),
1515
+ includeBreakdowns: z7.boolean().optional(),
1516
+ playLinkId: z7.string().uuid().optional(),
1517
+ spotifyUrl: z7.string().trim().min(1).max(500).optional()
1375
1518
  };
1376
1519
  function validateDynamoiGetSmartLinkInput(data, ctx) {
1377
1520
  const settingsOnly = data.includeArtistSettings === true && !data.playLinkId && !data.spotifyUrl && Boolean(data.artistId);
@@ -1390,44 +1533,36 @@ function validateDynamoiGetSmartLinkInput(data, ctx) {
1390
1533
  });
1391
1534
  }
1392
1535
  }
1393
- var StrictDynamoiGetSmartLinkInputSchema = z5.object(DynamoiGetSmartLinkInputShape).strict().superRefine(validateDynamoiGetSmartLinkInput);
1536
+ var StrictDynamoiGetSmartLinkInputSchema = z7.object(DynamoiGetSmartLinkInputShape).strict().superRefine(validateDynamoiGetSmartLinkInput);
1394
1537
  var DynamoiGetSmartLinkInputSchema = StrictDynamoiGetSmartLinkInputSchema;
1395
1538
  function parseDynamoiGetSmartLinkInput(rawInput) {
1396
- return StrictDynamoiGetSmartLinkInputSchema.parse(
1397
- normalizeLegacySmartLinkInclude(rawInput)
1398
- );
1539
+ return StrictDynamoiGetSmartLinkInputSchema.parse(normalizeLegacySmartLinkInclude(rawInput));
1399
1540
  }
1400
- var DynamoiGetSmartLinkAnalyticsInputSchema = z5.object({
1541
+ var DynamoiGetSmartLinkAnalyticsInputSchema = z7.object({
1401
1542
  dateRange: DateRangeSchema.optional(),
1402
1543
  format: ToolFormatSchema.optional(),
1403
- granularity: z5.enum(["TOTAL", "DAILY"]).optional(),
1404
- includeBreakdowns: z5.boolean().optional(),
1405
- playLinkId: z5.string().uuid()
1544
+ granularity: z7.enum(["TOTAL", "DAILY"]).optional(),
1545
+ includeBreakdowns: z7.boolean().optional(),
1546
+ playLinkId: z7.string().uuid()
1406
1547
  }).strict();
1407
- var DynamoiGetSmartLinkArtistSettingsInputSchema = z5.object({
1408
- artistId: z5.string().uuid(),
1548
+ var DynamoiGetSmartLinkArtistSettingsInputSchema = z7.object({
1549
+ artistId: z7.string().uuid(),
1409
1550
  format: ToolFormatSchema.optional()
1410
1551
  }).strict();
1411
- var DynamoiUpdateSmartLinkInputSchema = z5.object({
1412
- action: z5.enum([
1413
- "update_description",
1414
- "update_artist_settings",
1415
- "publish",
1416
- "unpublish"
1417
- ]),
1418
- artistId: z5.string().uuid().optional(),
1552
+ var DynamoiUpdateSmartLinkInputSchema = z7.object({
1553
+ action: z7.enum(["update_description", "update_artist_settings"]),
1554
+ artistId: z7.string().uuid().optional(),
1419
1555
  clientRequestId: ClientRequestIdSchema,
1420
- customDescription: z5.string().max(500).nullable().optional(),
1421
- expectedPublishState: z5.enum(["published", "unpublished"]).optional(),
1422
- expectedUpdatedAt: z5.string().datetime().optional(),
1423
- googleAdsConversionId: z5.string().trim().max(32).nullable().optional(),
1424
- metaPixelId: z5.string().trim().max(32).nullable().optional(),
1425
- playLinkId: z5.string().uuid().optional(),
1556
+ customDescription: z7.string().max(500).nullable().optional(),
1557
+ expectedUpdatedAt: z7.string().datetime().optional(),
1558
+ googleAdsConversionId: z7.string().trim().max(32).nullable().optional(),
1559
+ metaPixelId: z7.string().trim().max(32).nullable().optional(),
1560
+ playLinkId: z7.string().uuid().optional(),
1426
1561
  theme: SmartLinkThemeSchema.optional(),
1427
- tiktokPixelId: z5.string().trim().max(32).nullable().optional(),
1562
+ tiktokPixelId: z7.string().trim().max(32).nullable().optional(),
1428
1563
  userIntentSummary: UserIntentSummarySchema
1429
1564
  }).strict().superRefine((data, ctx) => {
1430
- if (data.action === "update_description" && data.customDescription === void 0) {
1565
+ if (data.action === "update_description" && data.customDescription === undefined) {
1431
1566
  ctx.addIssue({
1432
1567
  code: "custom",
1433
1568
  message: "customDescription is required when action is update_description",
@@ -1437,7 +1572,7 @@ var DynamoiUpdateSmartLinkInputSchema = z5.object({
1437
1572
  if (data.action !== "update_artist_settings" && !data.playLinkId) {
1438
1573
  ctx.addIssue({
1439
1574
  code: "custom",
1440
- message: "playLinkId is required when action is update_description, publish, or unpublish",
1575
+ message: "playLinkId is required when action is update_description",
1441
1576
  path: ["playLinkId"]
1442
1577
  });
1443
1578
  }
@@ -1449,7 +1584,7 @@ var DynamoiUpdateSmartLinkInputSchema = z5.object({
1449
1584
  path: ["artistId"]
1450
1585
  });
1451
1586
  }
1452
- if (data.theme === void 0 && data.metaPixelId === void 0 && data.tiktokPixelId === void 0 && data.googleAdsConversionId === void 0) {
1587
+ if (data.theme === undefined && data.metaPixelId === undefined && data.tiktokPixelId === undefined && data.googleAdsConversionId === undefined) {
1453
1588
  ctx.addIssue({
1454
1589
  code: "custom",
1455
1590
  message: "Provide at least one setting to update",
@@ -1457,13 +1592,6 @@ var DynamoiUpdateSmartLinkInputSchema = z5.object({
1457
1592
  });
1458
1593
  }
1459
1594
  }
1460
- if ((data.action === "publish" || data.action === "unpublish") && data.customDescription !== void 0) {
1461
- ctx.addIssue({
1462
- code: "custom",
1463
- message: "customDescription is only valid for update_description",
1464
- path: ["customDescription"]
1465
- });
1466
- }
1467
1595
  if (data.action !== "update_artist_settings") {
1468
1596
  for (const field of [
1469
1597
  "artistId",
@@ -1472,7 +1600,7 @@ var DynamoiUpdateSmartLinkInputSchema = z5.object({
1472
1600
  "theme",
1473
1601
  "tiktokPixelId"
1474
1602
  ]) {
1475
- if (data[field] !== void 0) {
1603
+ if (data[field] !== undefined) {
1476
1604
  ctx.addIssue({
1477
1605
  code: "custom",
1478
1606
  message: `${field} is only valid for update_artist_settings`,
@@ -1481,24 +1609,17 @@ var DynamoiUpdateSmartLinkInputSchema = z5.object({
1481
1609
  }
1482
1610
  }
1483
1611
  }
1484
- if (data.action !== "publish" && data.action !== "unpublish" && data.expectedPublishState !== void 0) {
1485
- ctx.addIssue({
1486
- code: "custom",
1487
- message: "expectedPublishState is only valid for publish or unpublish",
1488
- path: ["expectedPublishState"]
1489
- });
1490
- }
1491
1612
  });
1492
- var DynamoiUpdateSmartLinkArtistSettingsInputSchema = z5.object({
1493
- artistId: z5.string().uuid(),
1613
+ var DynamoiUpdateSmartLinkArtistSettingsInputSchema = z7.object({
1614
+ artistId: z7.string().uuid(),
1494
1615
  clientRequestId: ClientRequestIdSchema,
1495
- googleAdsConversionId: z5.string().trim().max(32).nullable().optional(),
1496
- metaPixelId: z5.string().trim().max(32).nullable().optional(),
1616
+ googleAdsConversionId: z7.string().trim().max(32).nullable().optional(),
1617
+ metaPixelId: z7.string().trim().max(32).nullable().optional(),
1497
1618
  theme: SmartLinkThemeSchema.optional(),
1498
- tiktokPixelId: z5.string().trim().max(32).nullable().optional(),
1619
+ tiktokPixelId: z7.string().trim().max(32).nullable().optional(),
1499
1620
  userIntentSummary: UserIntentSummarySchema
1500
1621
  }).strict().superRefine((data, ctx) => {
1501
- if (data.theme === void 0 && data.metaPixelId === void 0 && data.tiktokPixelId === void 0 && data.googleAdsConversionId === void 0) {
1622
+ if (data.theme === undefined && data.metaPixelId === undefined && data.tiktokPixelId === undefined && data.googleAdsConversionId === undefined) {
1502
1623
  ctx.addIssue({
1503
1624
  code: "custom",
1504
1625
  message: "Provide at least one setting to update",
@@ -1506,12 +1627,6 @@ var DynamoiUpdateSmartLinkArtistSettingsInputSchema = z5.object({
1506
1627
  });
1507
1628
  }
1508
1629
  });
1509
- var DynamoiPublishSmartLinkInputSchema = z5.object({
1510
- clientRequestId: ClientRequestIdSchema,
1511
- expectedPublishState: z5.enum(["published", "unpublished"]).optional(),
1512
- playLinkId: z5.string().uuid(),
1513
- userIntentSummary: UserIntentSummarySchema
1514
- }).strict();
1515
1630
  var PHASE_4_TOOL_DEFINITIONS = [
1516
1631
  {
1517
1632
  description: "Use this when the user wants to create one free Dynamoi Smart Link from a Spotify album or track URL/URI, or a single starter release from a Spotify artist URL. For full-catalog artist imports or artist hub requests, prefer dynamoi_create_smart_links_from_spotify_artist. Smart Links are free to create and manage. High-popularity or unverifiable artist links may stay unpublished in verification hold until Dynamoi can verify the client relationship. 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; if customDescription is provided, update that Smart Link's public description. In the final answer, lead with the public URL and do not expose internal IDs unless asked.",
@@ -1556,7 +1671,7 @@ var PHASE_4_TOOL_DEFINITIONS = [
1556
1671
  title: "Get Smart Link"
1557
1672
  },
1558
1673
  {
1559
- description: "Use this when the user wants to change one Smart Link's public description, publish/unpublish the public landing page, or update artist-level Smart Link theme/pixel settings. Set action to update_description, publish, unpublish, or update_artist_settings. This updates public landing-page behavior and may queue background rendering.",
1674
+ description: "Use this when the user wants to change one Smart Link's public description or update artist-level Smart Link theme/pixel settings. Set action to update_description or update_artist_settings. Public availability is artist-wide in the dashboard; this tool does not publish or unpublish individual links. Theme-only updates switch instantly; description or pixel changes may queue background rendering.",
1560
1675
  destructiveHint: true,
1561
1676
  idempotentHint: true,
1562
1677
  name: "dynamoi_update_smart_link",
@@ -1569,13 +1684,13 @@ var PHASE_4_TOOL_DEFINITIONS = [
1569
1684
  ];
1570
1685
 
1571
1686
  // src/server/tools.ts
1572
- import * as z7 from "zod/v4";
1687
+ import * as z9 from "zod/v4";
1573
1688
 
1574
1689
  // src/server/onboarding-tool-definitions.ts
1575
1690
  function createPhaseOnboardingToolDefinitions(schemas) {
1576
1691
  return [
1577
1692
  {
1578
- description: "Use this when the user is ready to link a YouTube channel to one Dynamoi artist from chat. This returns a Google OAuth URL bound to the signed-in user and artist. Google returns to a Dynamoi page that tells the user to come back to the AI assistant; after that, poll dynamoi_get_platform_status with the returned onboardingAttemptId and onboardingFlow=youtube until platforms.youtube.connected is true.",
1693
+ description: "Use this when the user is ready to link a YouTube 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.",
1579
1694
  destructiveHint: false,
1580
1695
  idempotentHint: true,
1581
1696
  name: "dynamoi_start_youtube_channel_link",
@@ -1586,7 +1701,7 @@ function createPhaseOnboardingToolDefinitions(schemas) {
1586
1701
  title: "Start YouTube Channel Link"
1587
1702
  },
1588
1703
  {
1589
- description: "Use this when billing is active and the user is ready to connect Meta for Spotify Smart Campaigns from chat. This returns a signed Meta OAuth URL and may send the user through a Page/Instagram selection step before the chat-first return page. If billing is not active, it returns billing_required instead of an OAuth URL. If billing cannot be verified due to a transient snapshot/API issue, it returns billing_check_unavailable and should be retried shortly. After the user returns, poll dynamoi_get_platform_status with the returned onboardingAttemptId and onboardingFlow=meta until platforms.meta.status is oauth_complete, partnership_pending, or partnership_active.",
1704
+ 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.",
1590
1705
  destructiveHint: false,
1591
1706
  idempotentHint: true,
1592
1707
  name: "dynamoi_start_meta_connection",
@@ -1600,20 +1715,15 @@ function createPhaseOnboardingToolDefinitions(schemas) {
1600
1715
  }
1601
1716
 
1602
1717
  // src/server/openai-tools.ts
1603
- import * as z6 from "zod/v4";
1604
- var DynamoiOpenAiSearchInputSchema = z6.object({
1605
- query: z6.string().trim().min(1).max(500)
1718
+ import * as z8 from "zod/v4";
1719
+ var DynamoiOpenAiSearchInputSchema = z8.object({
1720
+ query: z8.string().trim().min(1).max(500)
1606
1721
  }).strict();
1607
- var DynamoiOpenAiFetchInputSchema = z6.object({
1608
- id: z6.string().trim().min(1).max(200)
1722
+ var DynamoiOpenAiFetchInputSchema = z8.object({
1723
+ id: z8.string().trim().min(1).max(200)
1609
1724
  }).strict();
1610
1725
  var OPENAI_TOOL_DEFINITIONS = [
1611
1726
  {
1612
- // OpenAI ChatGPT Connectors / Deep Research expects a tool literally
1613
- // named `search` returning {results: [{id, title, text?, url?}]}. This
1614
- // is the same data dynamoi_search returns, reshaped for OpenAI Deep
1615
- // Research citation flows. ChatGPT will not call this tool directly in
1616
- // regular chat — it picks dynamoi_search by description.
1617
1727
  description: "OpenAI ChatGPT Deep Research / Connectors search contract. Returns matching Dynamoi artists, campaigns, and Smart Links so they can be cited in a deep-research session. For regular ChatGPT chat use dynamoi_search instead.",
1618
1728
  destructiveHint: false,
1619
1729
  name: "search",
@@ -1624,8 +1734,6 @@ var OPENAI_TOOL_DEFINITIONS = [
1624
1734
  title: "Search (OpenAI Connectors)"
1625
1735
  },
1626
1736
  {
1627
- // OpenAI Deep Research follow-up tool: given an id returned by `search`,
1628
- // returns the full record so it can be cited.
1629
1737
  description: "OpenAI ChatGPT Deep Research / Connectors fetch contract. Given an id returned by `search` (formatted as 'artist:<uuid>', 'campaign:<uuid>', or 'smartlink:<uuid>'), returns the full record for citation.",
1630
1738
  destructiveHint: false,
1631
1739
  name: "fetch",
@@ -1640,8 +1748,8 @@ var OPENAI_TOOL_DEFINITIONS = [
1640
1748
  // src/server/tools.ts
1641
1749
  var DateRangeSchema2 = DateRangeSchema;
1642
1750
  var ToolFormatSchema2 = ToolFormatSchema;
1643
- var OnboardingAttemptIdSchema = z7.string().trim().min(1).max(120).optional();
1644
- var ExpectedCampaignStatusEnum = z7.enum([
1751
+ var OnboardingAttemptIdSchema = z9.string().trim().min(1).max(120).optional();
1752
+ var ExpectedCampaignStatusEnum = z9.enum([
1645
1753
  "AWAITING_SMART_LINK",
1646
1754
  "ACTIVE",
1647
1755
  "ARCHIVED",
@@ -1657,20 +1765,20 @@ var ExpectedCampaignStatusSchema = ExpectedCampaignStatusEnum.optional();
1657
1765
  var CampaignStatusFilterSchema = ExpectedCampaignStatusEnum.exclude([
1658
1766
  "ENDED"
1659
1767
  ]).optional();
1660
- var DynamoiListArtistsInputSchema = z7.object({
1661
- artistId: z7.string().uuid().optional(),
1662
- cursor: z7.string().optional(),
1768
+ var DynamoiListArtistsInputSchema = z9.object({
1769
+ artistId: z9.string().uuid().optional(),
1770
+ cursor: z9.string().optional(),
1663
1771
  format: ToolFormatSchema2.optional(),
1664
- limit: z7.number().int().min(1).max(50).optional()
1772
+ limit: z9.number().int().min(1).max(50).optional()
1665
1773
  }).strict();
1666
- var DynamoiSearchInputSchema = z7.object({
1667
- artistId: z7.string().uuid().optional(),
1668
- cursor: z7.string().optional(),
1774
+ var DynamoiSearchInputSchema = z9.object({
1775
+ artistId: z9.string().uuid().optional(),
1776
+ cursor: z9.string().optional(),
1669
1777
  format: ToolFormatSchema2.optional(),
1670
- includeArchived: z7.boolean().optional(),
1671
- limit: z7.number().int().min(1).max(50).optional(),
1672
- query: z7.string().trim().max(120).optional(),
1673
- type: z7.enum(["artist", "campaign", "smartlink"]).optional()
1778
+ includeArchived: z9.boolean().optional(),
1779
+ limit: z9.number().int().min(1).max(50).optional(),
1780
+ query: z9.string().trim().max(120).optional(),
1781
+ type: z9.enum(["artist", "campaign", "smartlink"]).optional()
1674
1782
  }).strict().superRefine((data, ctx) => {
1675
1783
  if (!(data.type || data.query)) {
1676
1784
  ctx.addIssue({
@@ -1680,135 +1788,151 @@ var DynamoiSearchInputSchema = z7.object({
1680
1788
  });
1681
1789
  }
1682
1790
  });
1683
- var DynamoiGetCurrentUserIntentSchema = z7.enum([
1791
+ var DynamoiGetCurrentUserIntentSchema = z9.enum([
1684
1792
  "account_overview",
1685
1793
  "artist_access_check",
1686
1794
  "organization_access_check",
1687
1795
  "platform_connection_check"
1688
1796
  ]);
1689
- var DynamoiGetCurrentUserInputSchema = z7.object({
1797
+ var DynamoiGetCurrentUserInputSchema = z9.object({
1690
1798
  format: ToolFormatSchema2.optional(),
1691
1799
  intent: DynamoiGetCurrentUserIntentSchema
1692
1800
  }).strict();
1693
- var DynamoiGetArtistInputSchema = z7.object({
1694
- artistId: z7.string().uuid(),
1801
+ var DynamoiGetArtistInputSchema = z9.object({
1802
+ artistId: z9.string().uuid(),
1695
1803
  format: ToolFormatSchema2.optional()
1696
1804
  }).strict();
1697
- var DynamoiListCampaignsInputSchema = z7.object({
1698
- artistId: z7.string().uuid(),
1699
- campaignType: z7.enum(["SMART_CAMPAIGN", "YOUTUBE"]).optional(),
1700
- cursor: z7.string().optional(),
1805
+ var DynamoiListCampaignsInputSchema = z9.object({
1806
+ artistId: z9.string().uuid(),
1807
+ campaignType: z9.enum(["SMART_CAMPAIGN", "YOUTUBE"]).optional(),
1808
+ cursor: z9.string().optional(),
1701
1809
  format: ToolFormatSchema2.optional(),
1702
- limit: z7.number().int().min(1).max(50).optional(),
1810
+ limit: z9.number().int().min(1).max(50).optional(),
1703
1811
  status: CampaignStatusFilterSchema
1704
1812
  }).strict();
1705
- var DynamoiGetCampaignInputSchema = z7.object({
1813
+ var DynamoiGetCampaignInputSchema = z9.object({
1706
1814
  analyticsDateRange: DateRangeSchema2.optional(),
1707
- analyticsGranularity: z7.enum(["TOTAL", "DAILY"]).optional(),
1708
- campaignId: z7.string().uuid(),
1815
+ analyticsGranularity: z9.enum(["TOTAL", "DAILY"]).optional(),
1816
+ campaignId: z9.string().uuid(),
1709
1817
  format: ToolFormatSchema2.optional(),
1710
- includeAnalytics: z7.boolean().optional(),
1711
- includeCountries: z7.boolean().optional(),
1712
- includeDeploymentStatus: z7.boolean().optional()
1818
+ includeAnalytics: z9.boolean().optional(),
1819
+ includeCountries: z9.boolean().optional(),
1820
+ includeDeploymentStatus: z9.boolean().optional()
1713
1821
  }).strict();
1714
- var DynamoiGetCampaignAnalyticsInputSchema = z7.object({
1715
- campaignId: z7.string().uuid(),
1822
+ var DynamoiGetCampaignAnalyticsInputSchema = z9.object({
1823
+ campaignId: z9.string().uuid(),
1716
1824
  dateRange: DateRangeSchema2.optional(),
1717
1825
  format: ToolFormatSchema2.optional(),
1718
- granularity: z7.enum(["TOTAL", "DAILY"]).optional()
1826
+ granularity: z9.enum(["TOTAL", "DAILY"]).optional()
1719
1827
  }).strict();
1720
- var DynamoiGetArtistAnalyticsInputSchema = z7.object({
1721
- artistId: z7.string().uuid(),
1828
+ var DynamoiGetArtistAnalyticsInputSchema = z9.object({
1829
+ artistId: z9.string().uuid(),
1722
1830
  dateRange: DateRangeSchema2.optional(),
1723
1831
  format: ToolFormatSchema2.optional(),
1724
- granularity: z7.enum(["TOTAL", "DAILY"]).optional()
1832
+ granularity: z9.enum(["TOTAL", "DAILY"]).optional()
1725
1833
  }).strict();
1726
- var DynamoiGetBillingInputSchema = z7.object({
1727
- artistId: z7.string().uuid(),
1834
+ var DynamoiGetBillingInputSchema = z9.object({
1835
+ artistId: z9.string().uuid(),
1728
1836
  format: ToolFormatSchema2.optional(),
1729
1837
  onboardingAttemptId: OnboardingAttemptIdSchema
1730
1838
  }).strict();
1731
- var LocationTargetSchema = z7.object({
1732
- code: z7.string().trim().min(1).max(8),
1733
- name: z7.string().trim().min(1).max(120)
1839
+ var LocationTargetSchema = z9.object({
1840
+ code: z9.string().trim().min(1).max(8),
1841
+ name: z9.string().trim().min(1).max(120)
1734
1842
  }).strict();
1735
- var DynamoiGetPlatformStatusInputSchema = z7.object({
1736
- artistId: z7.string().uuid(),
1843
+ var DynamoiGetPlatformStatusInputSchema = z9.object({
1844
+ artistId: z9.string().uuid(),
1737
1845
  format: ToolFormatSchema2.optional(),
1738
1846
  onboardingAttemptId: OnboardingAttemptIdSchema,
1739
- onboardingFlow: z7.enum(["meta", "youtube"]).optional()
1847
+ onboardingFlow: z9.enum(["meta", "youtube"]).optional()
1740
1848
  }).strict();
1741
- var DynamoiStartYoutubeChannelLinkInputSchema = z7.object({
1742
- artistId: z7.string().uuid(),
1849
+ var DynamoiStartYoutubeChannelLinkInputSchema = z9.object({
1850
+ artistId: z9.string().uuid(),
1743
1851
  format: ToolFormatSchema2.optional(),
1852
+ purpose: z9.enum(["advertising", "distribution_identity"]).optional(),
1744
1853
  userIntentSummary: UserIntentSummarySchema
1745
1854
  }).strict();
1746
- var DynamoiStartMetaConnectionInputSchema = z7.object({
1747
- artistId: z7.string().uuid(),
1855
+ var DynamoiStartMetaConnectionInputSchema = z9.object({
1856
+ artistId: z9.string().uuid(),
1748
1857
  format: ToolFormatSchema2.optional(),
1858
+ purpose: z9.enum(["advertising", "distribution_identity"]).optional(),
1749
1859
  userIntentSummary: UserIntentSummarySchema
1750
1860
  }).strict();
1751
- var DynamoiListAvailableCountriesInputSchema = z7.object({
1752
- campaignType: z7.enum(["SMART_CAMPAIGN", "YOUTUBE"]),
1753
- cursor: z7.string().optional(),
1861
+ var DynamoiListAvailableCountriesInputSchema = z9.object({
1862
+ campaignType: z9.enum(["SMART_CAMPAIGN", "YOUTUBE"]),
1863
+ cursor: z9.string().optional(),
1754
1864
  format: ToolFormatSchema2.optional(),
1755
- limit: z7.number().int().min(1).max(100).optional(),
1756
- query: z7.string().trim().max(120).optional()
1865
+ limit: z9.number().int().min(1).max(100).optional(),
1866
+ query: z9.string().trim().max(120).optional()
1757
1867
  }).strict();
1758
- var DynamoiGetOnboardingStatusInputSchema = z7.object({
1759
- artistId: z7.string().uuid(),
1868
+ var DynamoiGetOnboardingStatusInputSchema = z9.object({
1869
+ artistId: z9.string().uuid(),
1760
1870
  format: ToolFormatSchema2.optional()
1761
1871
  }).strict();
1762
- var DynamoiGetCampaignReadinessInputSchema = z7.object({
1763
- artistId: z7.string().uuid(),
1764
- budgetAmount: z7.number().finite().positive().optional(),
1765
- budgetType: z7.enum(["DAILY", "TOTAL"]).optional(),
1766
- campaignType: z7.enum(["SMART_CAMPAIGN", "YOUTUBE"]),
1767
- contentType: z7.enum(["TRACK", "ALBUM", "PLAYLIST", "VIDEO"]).optional(),
1872
+ var DynamoiGetCampaignReadinessInputSchema = z9.object({
1873
+ artistId: z9.string().uuid(),
1874
+ budgetAmount: z9.number().finite().positive().optional(),
1875
+ budgetType: z9.enum(["DAILY", "TOTAL"]).optional(),
1876
+ campaignType: z9.enum(["SMART_CAMPAIGN", "YOUTUBE"]),
1877
+ contentType: z9.enum(["TRACK", "ALBUM", "PLAYLIST", "VIDEO"]).optional(),
1768
1878
  endDate: IsoCalendarDateSchema.optional(),
1769
1879
  format: ToolFormatSchema2.optional(),
1770
- locationTargets: z7.array(LocationTargetSchema).optional(),
1771
- mediaAssetIds: z7.array(z7.string().uuid()).optional(),
1772
- spotifyUrl: z7.string().trim().min(1).max(500).optional(),
1773
- youtubeVideoId: z7.string().trim().min(1).max(128).optional()
1880
+ locationTargets: z9.array(LocationTargetSchema).optional(),
1881
+ mediaAssetIds: z9.array(z9.string().uuid()).optional(),
1882
+ spotifyUrl: z9.string().trim().min(1).max(500).optional(),
1883
+ youtubeVideoId: z9.string().trim().min(1).max(128).optional()
1774
1884
  }).strict();
1775
- var DynamoiGetCampaignDeploymentStatusInputSchema = z7.object({
1776
- campaignId: z7.string().uuid(),
1885
+ var DynamoiGetCampaignDeploymentStatusInputSchema = z9.object({
1886
+ campaignId: z9.string().uuid(),
1777
1887
  format: ToolFormatSchema2.optional()
1778
1888
  }).strict();
1779
- var DynamoiPauseCampaignInputSchema = z7.object({
1780
- campaignId: z7.string().uuid(),
1889
+ var DynamoiPauseCampaignInputSchema = z9.object({
1890
+ campaignId: z9.string().uuid(),
1781
1891
  clientRequestId: ClientRequestIdSchema,
1782
1892
  expectedCurrentStatus: ExpectedCampaignStatusSchema,
1783
1893
  userIntentSummary: UserIntentSummarySchema
1784
1894
  }).strict();
1785
- var DynamoiResumeCampaignInputSchema = z7.object({
1786
- campaignId: z7.string().uuid(),
1895
+ var DynamoiResumeCampaignInputSchema = z9.object({
1896
+ campaignId: z9.string().uuid(),
1787
1897
  clientRequestId: ClientRequestIdSchema,
1788
1898
  expectedCurrentStatus: ExpectedCampaignStatusSchema,
1789
1899
  userIntentSummary: UserIntentSummarySchema
1790
1900
  }).strict();
1791
- var DynamoiUpdateBudgetInputSchema = z7.object({
1792
- budgetAmount: z7.number().finite().positive(),
1793
- campaignId: z7.string().uuid(),
1901
+ var DynamoiUpdateBudgetInputSchema = z9.object({
1902
+ acceptedConsentCopyHash: z9.literal(PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY_HASH).optional(),
1903
+ acceptedConsentVersion: z9.literal(PROSPECTIVE_BUDGET_FUNDING_CONSENT_VERSION).optional(),
1904
+ authorizeAutomaticDailyFunding: z9.literal(true).describe(`Set only after the client explicitly accepts: “${PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY}”`).optional(),
1905
+ budgetAmount: z9.number().finite().positive(),
1906
+ campaignId: z9.string().uuid(),
1794
1907
  clientRequestId: ClientRequestIdSchema,
1795
1908
  endDate: IsoCalendarDateSchema.optional(),
1796
- expectedCurrentBudgetAmount: z7.number().finite().positive().optional(),
1909
+ expectedCurrentBudgetAmount: z9.number().finite().positive().optional(),
1797
1910
  expectedCurrentEndDate: IsoCalendarDateSchema.optional(),
1798
1911
  userIntentSummary: UserIntentSummarySchema
1799
- }).strict();
1800
- var DynamoiUpdateCampaignInputSchema = z7.object({
1801
- action: z7.enum(["pause", "resume", "update_budget"]),
1802
- budgetAmount: z7.number().finite().positive().optional(),
1803
- campaignId: z7.string().uuid(),
1912
+ }).strict().superRefine((data, ctx) => {
1913
+ if (data.authorizeAutomaticDailyFunding && !(data.acceptedConsentCopyHash && data.acceptedConsentVersion && data.clientRequestId)) {
1914
+ ctx.addIssue({
1915
+ code: "custom",
1916
+ message: "acceptedConsentCopyHash, acceptedConsentVersion, and clientRequestId are required with automatic daily funding authorization",
1917
+ path: ["authorizeAutomaticDailyFunding"]
1918
+ });
1919
+ }
1920
+ });
1921
+ var DynamoiUpdateCampaignInputSchema = z9.object({
1922
+ action: z9.enum(["pause", "resume", "update_budget"]),
1923
+ acceptedConsentCopyHash: z9.literal(PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY_HASH).optional(),
1924
+ acceptedConsentVersion: z9.literal(PROSPECTIVE_BUDGET_FUNDING_CONSENT_VERSION).optional(),
1925
+ authorizeAutomaticDailyFunding: z9.literal(true).describe(`Set only after the client explicitly accepts: “${PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY}”`).optional(),
1926
+ budgetAmount: z9.number().finite().positive().optional(),
1927
+ campaignId: z9.string().uuid(),
1804
1928
  clientRequestId: ClientRequestIdSchema,
1805
1929
  endDate: IsoCalendarDateSchema.optional(),
1806
- expectedCurrentBudgetAmount: z7.number().finite().positive().optional(),
1930
+ expectedCurrentBudgetAmount: z9.number().finite().positive().optional(),
1807
1931
  expectedCurrentEndDate: IsoCalendarDateSchema.optional(),
1808
1932
  expectedCurrentStatus: ExpectedCampaignStatusSchema,
1809
1933
  userIntentSummary: UserIntentSummarySchema
1810
1934
  }).strict().superRefine((data, ctx) => {
1811
- if (data.action === "update_budget" && data.budgetAmount === void 0) {
1935
+ if (data.action === "update_budget" && data.budgetAmount === undefined) {
1812
1936
  ctx.addIssue({
1813
1937
  code: "custom",
1814
1938
  message: "budgetAmount is required when action is update_budget",
@@ -1817,12 +1941,15 @@ var DynamoiUpdateCampaignInputSchema = z7.object({
1817
1941
  }
1818
1942
  if (data.action !== "update_budget") {
1819
1943
  for (const field of [
1944
+ "acceptedConsentCopyHash",
1945
+ "acceptedConsentVersion",
1820
1946
  "budgetAmount",
1947
+ "authorizeAutomaticDailyFunding",
1821
1948
  "endDate",
1822
1949
  "expectedCurrentBudgetAmount",
1823
1950
  "expectedCurrentEndDate"
1824
1951
  ]) {
1825
- if (data[field] !== void 0) {
1952
+ if (data[field] !== undefined) {
1826
1953
  ctx.addIssue({
1827
1954
  code: "custom",
1828
1955
  message: `${field} is only valid when action is update_budget`,
@@ -1831,46 +1958,41 @@ var DynamoiUpdateCampaignInputSchema = z7.object({
1831
1958
  }
1832
1959
  }
1833
1960
  }
1961
+ if (data.authorizeAutomaticDailyFunding && !(data.acceptedConsentCopyHash && data.acceptedConsentVersion && data.clientRequestId)) {
1962
+ ctx.addIssue({
1963
+ code: "custom",
1964
+ message: "acceptedConsentCopyHash, acceptedConsentVersion, and clientRequestId are required with automatic daily funding authorization",
1965
+ path: ["authorizeAutomaticDailyFunding"]
1966
+ });
1967
+ }
1834
1968
  });
1835
- var DynamoiListMediaAssetsInputSchema = z7.object({
1836
- artistId: z7.string().uuid(),
1837
- cursor: z7.string().optional(),
1969
+ var DynamoiListMediaAssetsInputSchema = z9.object({
1970
+ artistId: z9.string().uuid(),
1971
+ cursor: z9.string().optional(),
1838
1972
  format: ToolFormatSchema2.optional(),
1839
- includeUrls: z7.boolean().optional(),
1840
- limit: z7.number().int().min(1).max(50).optional()
1973
+ includeUrls: z9.boolean().optional(),
1974
+ limit: z9.number().int().min(1).max(50).optional()
1841
1975
  }).strict();
1842
- var DynamoiLaunchCampaignInputSchema = z7.object({
1843
- // Creative
1844
- adCopy: z7.string().trim().max(500).optional(),
1845
- appleMusicUrl: z7.string().trim().min(1).max(500).optional(),
1846
- artistId: z7.string().uuid(),
1847
- // Budget
1848
- budgetAmount: z7.number().finite().positive(),
1849
- budgetSplits: z7.record(
1850
- z7.enum(["META", "GOOGLE"]),
1851
- z7.number().int().min(0).max(100)
1852
- ),
1853
- budgetType: z7.enum(["DAILY", "TOTAL"]),
1854
- campaignType: z7.enum(["SMART_CAMPAIGN", "YOUTUBE"]),
1855
- // Idempotency (client-generated UUID)
1856
- clientRequestId: z7.string().uuid(),
1857
- // Content
1858
- contentTitle: z7.string().trim().min(1).max(160),
1859
- contentType: z7.enum(["TRACK", "ALBUM", "PLAYLIST", "VIDEO"]),
1976
+ var DynamoiLaunchCampaignInputSchema = z9.object({
1977
+ adCopy: z9.string().trim().max(500).optional(),
1978
+ appleMusicUrl: z9.string().trim().min(1).max(500).optional(),
1979
+ artistId: z9.string().uuid(),
1980
+ budgetAmount: z9.number().finite().positive(),
1981
+ budgetSplits: z9.record(z9.enum(["META", "GOOGLE"]), z9.number().int().min(0).max(100)),
1982
+ budgetType: z9.enum(["DAILY", "TOTAL"]),
1983
+ campaignType: z9.enum(["SMART_CAMPAIGN", "YOUTUBE"]),
1984
+ clientRequestId: z9.string().uuid(),
1985
+ contentTitle: z9.string().trim().min(1).max(160),
1986
+ contentType: z9.enum(["TRACK", "ALBUM", "PLAYLIST", "VIDEO"]),
1860
1987
  endDate: IsoCalendarDateSchema.optional(),
1861
- // Targeting
1862
- locationTargets: z7.array(LocationTargetSchema).optional(),
1863
- // Smart Campaign creative selection (existing assets only in Phase 3)
1864
- mediaAssetIds: z7.array(z7.string().uuid()).optional(),
1865
- spotifyUrl: z7.string().trim().min(1).max(500).optional(),
1866
- useAiGeneratedCopy: z7.boolean().optional(),
1988
+ locationTargets: z9.array(LocationTargetSchema).optional(),
1989
+ mediaAssetIds: z9.array(z9.string().uuid()).optional(),
1990
+ spotifyUrl: z9.string().trim().min(1).max(500).optional(),
1991
+ useAiGeneratedCopy: z9.boolean().optional(),
1867
1992
  userIntentSummary: UserIntentSummarySchema,
1868
- youtubeVideoId: z7.string().trim().min(1).max(128).optional()
1993
+ youtubeVideoId: z9.string().trim().min(1).max(128).optional()
1869
1994
  }).strict().superRefine((data, ctx) => {
1870
- const sum = Object.values(data.budgetSplits ?? {}).reduce(
1871
- (acc, v) => acc + (Number.isFinite(v) ? v : 0),
1872
- 0
1873
- );
1995
+ const sum = Object.values(data.budgetSplits ?? {}).reduce((acc, v) => acc + (Number.isFinite(v) ? v : 0), 0);
1874
1996
  if (!(sum > 0)) {
1875
1997
  ctx.addIssue({
1876
1998
  code: "custom",
@@ -1951,7 +2073,7 @@ var PHASE_1_TOOL_DEFINITIONS = [
1951
2073
  title: "Get Account Overview"
1952
2074
  },
1953
2075
  {
1954
- description: "Use this when the user wants to see which artists or YouTube channels they manage, along with billing status, active campaign count, and their role. Pass artistId when you need the full profile/readiness details for one artist instead of a roster page. Do not use this for campaign details; use dynamoi_list_campaigns or dynamoi_get_campaign. Never use this for generic social-media or marketing advice, including Instagram follower-growth questions, unless the user explicitly asked about their Dynamoi roster. If the result is empty, the user is brand-new \u2014 do not stop with 'no records found'; route through dynamoi_get_account_overview.recommendedNextActions.",
2076
+ description: "Use this when the user wants to see which artists or YouTube channels they manage, along with billing status, active campaign count, and their role. Pass artistId when you need the full profile/readiness details for one artist instead of a roster page. Do not use this for campaign details; use dynamoi_list_campaigns or dynamoi_get_campaign. Never use this for generic social-media or marketing advice, including Instagram follower-growth questions, unless the user explicitly asked about their Dynamoi roster. If the result is empty, the user is brand-new — do not stop with 'no records found'; route through dynamoi_get_account_overview.recommendedNextActions.",
1955
2077
  destructiveHint: false,
1956
2078
  name: "dynamoi_list_artists",
1957
2079
  openWorldHint: false,
@@ -1961,7 +2083,7 @@ var PHASE_1_TOOL_DEFINITIONS = [
1961
2083
  title: "List Artists"
1962
2084
  },
1963
2085
  {
1964
- description: "Use this when the user mentions an artist, release, campaign, or smart link but you do not yet know the exact record to inspect. Do not use this for analytics summaries or billing questions once you already know the target record. If the result is empty for a brand-new user (no artists yet), do not respond 'no records found' as a terminal answer \u2014 instead suggest creating their first artist hub via dynamoi_create_smart_links_from_spotify_artist.",
2086
+ description: "Use this when the user mentions an artist, release, campaign, or smart link but you do not yet know the exact record to inspect. Do not use this for analytics summaries or billing questions once you already know the target record. If the result is empty for a brand-new user (no artists yet), do not respond 'no records found' as a terminal answer — instead suggest creating their first artist hub via dynamoi_create_smart_links_from_spotify_artist.",
1965
2087
  destructiveHint: false,
1966
2088
  name: "dynamoi_search",
1967
2089
  openWorldHint: false,
@@ -1972,7 +2094,7 @@ var PHASE_1_TOOL_DEFINITIONS = [
1972
2094
  },
1973
2095
  ...OPENAI_TOOL_DEFINITIONS,
1974
2096
  {
1975
- description: "Use this when the user wants to browse campaigns for one artist, optionally filtered by type or status. Do not use this for a single campaign deep dive; use dynamoi_get_campaign for that. Never use this to personalize generic marketing advice. If the user has no artists yet, do not call this \u2014 route via dynamoi_get_account_overview first.",
2097
+ description: "Use this when the user wants to browse campaigns for one artist, optionally filtered by type or status. Do not use this for a single campaign deep dive; use dynamoi_get_campaign for that. Never use this to personalize generic marketing advice. If the user has no artists yet, do not call this — route via dynamoi_get_account_overview first.",
1976
2098
  destructiveHint: false,
1977
2099
  name: "dynamoi_list_campaigns",
1978
2100
  openWorldHint: false,
@@ -2086,20 +2208,123 @@ var PHASE_3_TOOL_DEFINITIONS = [
2086
2208
  ];
2087
2209
 
2088
2210
  // src/server/create-server.ts
2089
- var SdkToolOutputEnvelopeSchema = z8.object({
2090
- status: z8.enum(["success", "partial_success", "error"])
2211
+ function buildDynamoiToolSecuritySchemes(scopes) {
2212
+ return [{ scopes: [...scopes], type: "oauth2" }];
2213
+ }
2214
+ var DescriptiveEntitySchema = z10.object({
2215
+ id: z10.string().optional(),
2216
+ name: z10.string().optional(),
2217
+ publicUrl: z10.string().optional(),
2218
+ summary: z10.string().optional()
2091
2219
  }).passthrough();
2092
- function buildDynamoiToolSecuritySchemes() {
2093
- return [{ scopes: [...DYNAMOI_MCP_SCOPES], type: "oauth2" }];
2220
+ var CHATGPT_DESCRIPTIVE_DATA_SCHEMAS = {
2221
+ dynamoi_get_account_overview: z10.object({
2222
+ artistCount: z10.number().optional(),
2223
+ artists: z10.object({
2224
+ count: z10.number(),
2225
+ summaries: z10.array(DescriptiveEntitySchema)
2226
+ }).optional(),
2227
+ organizationCount: z10.number().optional(),
2228
+ recommendedNextActions: z10.array(z10.string()).optional(),
2229
+ state: z10.object({}).passthrough().optional(),
2230
+ summary: z10.string().optional(),
2231
+ user: z10.object({ name: z10.string().optional() }).optional()
2232
+ }).passthrough(),
2233
+ dynamoi_get_artist_analytics: z10.object({
2234
+ artistId: z10.string().optional(),
2235
+ artistName: z10.string().optional(),
2236
+ dateRange: z10.object({ end: z10.string(), start: z10.string() }).optional(),
2237
+ summary: z10.string().optional()
2238
+ }).passthrough(),
2239
+ dynamoi_get_campaign: DescriptiveEntitySchema.extend({
2240
+ artistId: z10.string().optional(),
2241
+ contentTitle: z10.string().optional(),
2242
+ nextActions: z10.array(z10.string()).optional(),
2243
+ status: z10.string().optional()
2244
+ }).passthrough(),
2245
+ dynamoi_get_platform_status: z10.object({
2246
+ artistId: z10.string().optional(),
2247
+ artistName: z10.string().optional(),
2248
+ platforms: z10.object({}).passthrough().optional(),
2249
+ summary: z10.string().optional()
2250
+ }).passthrough(),
2251
+ dynamoi_get_smart_link: DescriptiveEntitySchema.extend({
2252
+ artistId: z10.string().optional(),
2253
+ artistName: z10.string().optional(),
2254
+ nextActions: z10.array(z10.string()).optional(),
2255
+ publishState: z10.string().optional(),
2256
+ releaseTitle: z10.string().optional(),
2257
+ theme: z10.string().optional()
2258
+ }).passthrough(),
2259
+ dynamoi_list_artists: z10.object({
2260
+ artists: z10.array(DescriptiveEntitySchema).optional(),
2261
+ nextCursor: z10.string().optional(),
2262
+ summary: z10.string().optional(),
2263
+ totalCount: z10.number().optional()
2264
+ }).passthrough(),
2265
+ dynamoi_list_campaigns: z10.object({
2266
+ campaigns: z10.array(DescriptiveEntitySchema).optional(),
2267
+ nextCursor: z10.string().optional(),
2268
+ summary: z10.string().optional(),
2269
+ totalCount: z10.number().optional()
2270
+ }).passthrough(),
2271
+ dynamoi_preview_smart_link_themes: z10.object({
2272
+ artistName: z10.string(),
2273
+ releaseTitle: z10.string(),
2274
+ themes: z10.array(DescriptiveEntitySchema)
2275
+ }).passthrough(),
2276
+ dynamoi_search: z10.object({
2277
+ nextCursor: z10.string().optional(),
2278
+ results: z10.array(DescriptiveEntitySchema).optional(),
2279
+ summary: z10.string().optional(),
2280
+ totalCount: z10.number().optional()
2281
+ }).passthrough(),
2282
+ dynamoi_update_smart_link: DescriptiveEntitySchema.extend({
2283
+ artistId: z10.string().optional(),
2284
+ artistName: z10.string().optional(),
2285
+ defaultTheme: z10.string().optional(),
2286
+ renderQueuedCount: z10.number().optional(),
2287
+ renderWarning: z10.string().nullable().optional()
2288
+ }).passthrough(),
2289
+ fetch: DescriptiveEntitySchema,
2290
+ search: z10.object({ results: z10.array(DescriptiveEntitySchema).optional() }).passthrough()
2291
+ };
2292
+ function getAdvertisedToolOutputSchema(options) {
2293
+ if (options.toolProfile !== "chatgpt-app") {
2294
+ return options.canonical;
2295
+ }
2296
+ const dataSchema = CHATGPT_DESCRIPTIVE_DATA_SCHEMAS[options.toolName];
2297
+ if (!dataSchema) {
2298
+ return options.canonical;
2299
+ }
2300
+ return z10.object({
2301
+ data: dataSchema.optional(),
2302
+ kind: z10.string().optional(),
2303
+ message: z10.string().optional(),
2304
+ status: z10.enum(["success", "partial_success", "error"])
2305
+ }).passthrough();
2306
+ }
2307
+ function getDynamoiToolOAuthScopes(toolName, providerScopes) {
2308
+ const requiredScopes = DYNAMOI_MCP_TOOL_SCOPES[toolName];
2309
+ if (!providerScopes.some((scope) => scope.startsWith("dynamoi:"))) {
2310
+ return providerScopes;
2311
+ }
2312
+ const missingScopes = requiredScopes.filter((scope) => !providerScopes.includes(scope));
2313
+ if (missingScopes.length > 0) {
2314
+ throw new Error(`MCP provider does not support ${toolName} scopes: ${missingScopes.join(", ")}`);
2315
+ }
2316
+ return requiredScopes;
2094
2317
  }
2095
2318
  var DYNAMOI_TOOL_DEFINITIONS = [
2096
2319
  ...PHASE_1_TOOL_DEFINITIONS,
2097
2320
  ...PHASE_ONBOARDING_TOOL_DEFINITIONS,
2098
2321
  ...PHASE_2_TOOL_DEFINITIONS,
2099
2322
  ...PHASE_3_TOOL_DEFINITIONS,
2323
+ ...DISTRIBUTION_TOOL_DEFINITIONS,
2324
+ SMART_LINK_THEME_PREVIEW_TOOL_DEFINITION,
2100
2325
  ...PHASE_4_TOOL_DEFINITIONS
2101
2326
  ];
2102
- var CHATGPT_APP_EXCLUDED_TOOL_NAMES = /* @__PURE__ */ new Set([
2327
+ var CHATGPT_APP_EXCLUDED_TOOL_NAMES = new Set([
2103
2328
  "dynamoi_get_billing",
2104
2329
  "dynamoi_get_campaign_readiness",
2105
2330
  "dynamoi_launch_campaign",
@@ -2114,11 +2339,10 @@ function getDynamoiToolDefinitions(options) {
2114
2339
  if ((options?.toolProfile ?? "full") !== "chatgpt-app") {
2115
2340
  return definitions;
2116
2341
  }
2117
- return definitions.filter(
2118
- (definition) => !CHATGPT_APP_EXCLUDED_TOOL_NAMES.has(definition.name)
2119
- );
2342
+ return definitions.filter((definition) => !CHATGPT_APP_EXCLUDED_TOOL_NAMES.has(definition.name));
2120
2343
  }
2121
2344
  var DYNAMOI_TOOL_DISPATCHERS = {
2345
+ dynamoi_apply_for_distribution: (adapter, input) => adapter.applyForDistribution(input),
2122
2346
  dynamoi_create_smart_link_from_spotify: (adapter, input) => adapter.createSmartLinkFromSpotify(input),
2123
2347
  dynamoi_create_smart_links_from_spotify_artist: (adapter, input) => adapter.createSmartLinksFromSpotifyArtist(input),
2124
2348
  dynamoi_get_account_overview: (adapter, input) => adapter.getCurrentUser(input),
@@ -2126,6 +2350,7 @@ var DYNAMOI_TOOL_DISPATCHERS = {
2126
2350
  dynamoi_get_billing: (adapter, input) => adapter.getBilling(input),
2127
2351
  dynamoi_get_campaign: (adapter, input) => adapter.getCampaign(input),
2128
2352
  dynamoi_get_campaign_readiness: (adapter, input) => adapter.getCampaignReadiness(input),
2353
+ dynamoi_get_distribution_application: (adapter, input) => adapter.getDistributionApplication(input),
2129
2354
  dynamoi_get_platform_status: (adapter, input) => adapter.getPlatformStatus(input),
2130
2355
  dynamoi_get_smart_link: (adapter, input) => adapter.getSmartLink(input),
2131
2356
  dynamoi_launch_campaign: (adapter, input) => adapter.launchCampaign(input),
@@ -2134,6 +2359,7 @@ var DYNAMOI_TOOL_DISPATCHERS = {
2134
2359
  dynamoi_list_campaigns: (adapter, input) => adapter.listCampaigns(input),
2135
2360
  dynamoi_list_media_assets: (adapter, input) => adapter.listMediaAssets(input),
2136
2361
  dynamoi_list_smart_links: (adapter, input) => adapter.listSmartLinks(input),
2362
+ dynamoi_preview_smart_link_themes: (_adapter, input) => Promise.resolve(previewSmartLinkThemes(input)),
2137
2363
  dynamoi_search: (adapter, input) => adapter.search(input),
2138
2364
  dynamoi_start_meta_connection: (adapter, input) => adapter.startMetaConnection(input),
2139
2365
  dynamoi_start_youtube_channel_link: (adapter, input) => adapter.startYoutubeChannelLink(input),
@@ -2162,11 +2388,14 @@ function asTextResult(envelope) {
2162
2388
  }
2163
2389
  return JSON.stringify(envelope);
2164
2390
  })();
2165
- return {
2391
+ const result = {
2166
2392
  content: [{ text: plainText, type: "text" }],
2167
- structuredContent: envelope,
2168
- ...isToolError ? { isError: true } : {}
2393
+ structuredContent: envelope
2169
2394
  };
2395
+ if (isToolError) {
2396
+ result.isError = true;
2397
+ }
2398
+ return result;
2170
2399
  }
2171
2400
  function asValidatedTextResult(options) {
2172
2401
  const parsed = options.outputSchema.safeParse(options.envelope);
@@ -2181,115 +2410,86 @@ function asValidatedTextResult(options) {
2181
2410
  }
2182
2411
  function createDynamoiMcpServer(options) {
2183
2412
  const toolProfile = options.toolProfile ?? "full";
2184
- const server = new McpServer(
2185
- {
2186
- name: "dynamoi",
2187
- version: DYNAMOI_MCP_VERSION,
2188
- websiteUrl: options.websiteUrl ?? "https://dynamoi.com"
2189
- },
2190
- {
2191
- instructions: toolProfile === "chatgpt-app" ? DYNAMOI_CHATGPT_APP_INSTRUCTIONS : DYNAMOI_MCP_INSTRUCTIONS
2192
- }
2193
- );
2413
+ const server = new McpServer({
2414
+ name: "dynamoi",
2415
+ version: DYNAMOI_MCP_VERSION,
2416
+ websiteUrl: options.websiteUrl ?? "https://dynamoi.com"
2417
+ }, {
2418
+ instructions: toolProfile === "chatgpt-app" ? DYNAMOI_CHATGPT_APP_INSTRUCTIONS : DYNAMOI_MCP_INSTRUCTIONS
2419
+ });
2194
2420
  for (const def of getDynamoiToolDefinitions({ toolProfile })) {
2195
2421
  const title = def.title;
2196
2422
  const dispatcher = DYNAMOI_TOOL_DISPATCHERS[def.name];
2197
- const idempotentHint = "idempotentHint" in def && typeof def.idempotentHint === "boolean" ? def.idempotentHint : void 0;
2198
- server.registerTool(
2199
- def.name,
2200
- {
2201
- _meta: {
2202
- securitySchemes: buildDynamoiToolSecuritySchemes()
2203
- },
2204
- annotations: {
2205
- destructiveHint: def.destructiveHint,
2206
- ...typeof idempotentHint === "boolean" ? { idempotentHint } : {},
2207
- openWorldHint: def.openWorldHint,
2208
- readOnlyHint: def.readOnlyHint
2209
- },
2210
- description: def.description,
2211
- inputSchema: def.schema,
2212
- // The SDK's runtime output validator currently only normalizes object
2213
- // schemas; our canonical output schemas are unions of success/error
2214
- // envelopes and are validated below in asValidatedTextResult().
2215
- outputSchema: SdkToolOutputEnvelopeSchema,
2216
- title
2217
- },
2218
- async (input) => asValidatedTextResult({
2219
- envelope: await dispatcher(options.adapter, input),
2220
- outputSchema: def.outputSchema,
2221
- toolName: def.name
2222
- })
2223
- );
2423
+ const idempotentHint = "idempotentHint" in def && typeof def.idempotentHint === "boolean" ? def.idempotentHint : undefined;
2424
+ const meta = {
2425
+ securitySchemes: buildDynamoiToolSecuritySchemes(getDynamoiToolOAuthScopes(def.name, options.oauthScopes ?? DYNAMOI_BETTER_AUTH_MCP_SCOPES))
2426
+ };
2427
+ if (def.name === "dynamoi_preview_smart_link_themes") {
2428
+ meta["openai/outputTemplate"] = SMART_LINK_THEME_PREVIEW_RESOURCE_URI;
2429
+ meta["ui"] = { resourceUri: SMART_LINK_THEME_PREVIEW_RESOURCE_URI };
2430
+ }
2431
+ const annotations = {
2432
+ destructiveHint: def.destructiveHint,
2433
+ openWorldHint: def.openWorldHint,
2434
+ readOnlyHint: def.readOnlyHint
2435
+ };
2436
+ if (typeof idempotentHint === "boolean") {
2437
+ annotations["idempotentHint"] = idempotentHint;
2438
+ }
2439
+ server.registerTool(def.name, {
2440
+ _meta: meta,
2441
+ annotations,
2442
+ description: def.description,
2443
+ inputSchema: def.schema,
2444
+ outputSchema: getAdvertisedToolOutputSchema({
2445
+ canonical: def.outputSchema,
2446
+ toolName: def.name,
2447
+ toolProfile
2448
+ }),
2449
+ title
2450
+ }, async (input) => {
2451
+ const startedAt = Date.now();
2452
+ try {
2453
+ const envelope = await dispatcher(options.adapter, input);
2454
+ try {
2455
+ await options.onToolCall?.({
2456
+ durationMs: Date.now() - startedAt,
2457
+ result: envelope,
2458
+ toolName: def.name
2459
+ });
2460
+ } catch {}
2461
+ return asValidatedTextResult({
2462
+ envelope,
2463
+ outputSchema: def.outputSchema,
2464
+ toolName: def.name
2465
+ });
2466
+ } catch (error) {
2467
+ try {
2468
+ await options.onToolCall?.({
2469
+ durationMs: Date.now() - startedAt,
2470
+ error,
2471
+ toolName: def.name
2472
+ });
2473
+ } catch {}
2474
+ throw error;
2475
+ }
2476
+ });
2224
2477
  }
2478
+ registerSmartLinkThemePreviewResource(server);
2225
2479
  if (toolProfile === "full") {
2226
2480
  registerDynamoiPrompts(server);
2227
2481
  registerDynamoiResources(server, options.adapter);
2228
2482
  }
2229
2483
  return server;
2230
2484
  }
2231
-
2232
2485
  // src/transport/http.ts
2233
- import { randomUUID } from "crypto";
2234
2486
  import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";
2235
- import { isInitializeRequest } from "@modelcontextprotocol/sdk/types.js";
2236
- var transports = /* @__PURE__ */ new Map();
2237
- var SESSION_TTL_MS = 30 * 60 * 1e3;
2238
- var MAX_SESSIONS = 250;
2239
- function closeTransportBestEffort(entry) {
2240
- void entry.transport.close().catch(() => {
2241
- });
2242
- }
2243
- function cleanupTransports(nowMs) {
2244
- for (const [sid, entry] of transports.entries()) {
2245
- const expired = nowMs - entry.lastUsedAtMs > SESSION_TTL_MS;
2246
- if (expired) {
2247
- closeTransportBestEffort(entry);
2248
- transports.delete(sid);
2249
- }
2250
- }
2251
- if (transports.size > MAX_SESSIONS) {
2252
- const entries = Array.from(transports.entries()).sort(
2253
- (a, b) => a[1].lastUsedAtMs - b[1].lastUsedAtMs
2254
- );
2255
- const over = transports.size - MAX_SESSIONS;
2256
- for (let i = 0; i < over; i += 1) {
2257
- const sid = entries[i]?.[0];
2258
- if (sid) {
2259
- const entry = entries[i]?.[1];
2260
- if (entry) {
2261
- closeTransportBestEffort(entry);
2262
- }
2263
- transports.delete(sid);
2264
- }
2265
- }
2266
- }
2267
- }
2268
- function getHeader(request, name) {
2269
- const value = request.headers.get(name);
2270
- return value && value.trim().length > 0 ? value : null;
2271
- }
2272
- function jsonRpcSessionNotFound() {
2273
- return new Response(
2274
- JSON.stringify({
2275
- error: { code: -32001, message: "Session not found" },
2276
- id: null,
2277
- jsonrpc: "2.0"
2278
- }),
2279
- {
2280
- headers: { "content-type": "application/json" },
2281
- status: 404
2282
- }
2283
- );
2284
- }
2285
2487
  function isRecord(value) {
2286
2488
  return typeof value === "object" && value !== null && !Array.isArray(value);
2287
2489
  }
2288
2490
  function normalizeLegacyDynamoiToolCallArguments(parsedBody) {
2289
2491
  if (Array.isArray(parsedBody)) {
2290
- return parsedBody.map(
2291
- (message) => normalizeLegacyDynamoiToolCallArguments(message)
2292
- );
2492
+ return parsedBody.map((message) => normalizeLegacyDynamoiToolCallArguments(message));
2293
2493
  }
2294
2494
  if (!isRecord(parsedBody) || parsedBody.method !== "tools/call") {
2295
2495
  return parsedBody;
@@ -2311,46 +2511,21 @@ function normalizeLegacyDynamoiToolCallArguments(parsedBody) {
2311
2511
  };
2312
2512
  }
2313
2513
  async function handleMcpHttpRequest(options) {
2314
- const nowMs = Date.now();
2315
- const enableSessions = options.enableSessions ?? true;
2316
- const parsedBody = normalizeLegacyDynamoiToolCallArguments(
2317
- options.parsedBody
2318
- );
2319
- cleanupTransports(nowMs);
2320
- const sessionId = enableSessions ? getHeader(options.request, "mcp-session-id") : null;
2321
- const existing = sessionId ? transports.get(sessionId) : void 0;
2322
- if (existing) {
2323
- if (existing.contextKey !== options.sessionContextKey) {
2324
- closeTransportBestEffort(existing);
2325
- transports.delete(sessionId);
2326
- return jsonRpcSessionNotFound();
2327
- }
2328
- existing.lastUsedAtMs = nowMs;
2329
- const response = await existing.transport.handleRequest(options.request, {
2330
- parsedBody
2514
+ if (options.request.method.toUpperCase() !== "POST") {
2515
+ return new Response(JSON.stringify({
2516
+ error: { code: -32000, message: "Method not allowed." },
2517
+ id: null,
2518
+ jsonrpc: "2.0"
2519
+ }), {
2520
+ headers: {
2521
+ Allow: "POST",
2522
+ "content-type": "application/json"
2523
+ },
2524
+ status: 405
2331
2525
  });
2332
- if (options.request.method.toUpperCase() === "DELETE" && sessionId) {
2333
- closeTransportBestEffort(existing);
2334
- transports.delete(sessionId);
2335
- }
2336
- return response;
2337
- }
2338
- if (sessionId && !isInitializeRequest(parsedBody)) {
2339
- return jsonRpcSessionNotFound();
2340
2526
  }
2341
- const isInit = isInitializeRequest(parsedBody);
2342
- const transport = new WebStandardStreamableHTTPServerTransport({
2343
- onsessioninitialized: (sid) => {
2344
- transports.set(sid, {
2345
- contextKey: options.sessionContextKey,
2346
- createdAtMs: nowMs,
2347
- lastUsedAtMs: nowMs,
2348
- transport
2349
- });
2350
- cleanupTransports(Date.now());
2351
- },
2352
- ...enableSessions && isInit ? { sessionIdGenerator: () => randomUUID() } : {}
2353
- });
2527
+ const parsedBody = normalizeLegacyDynamoiToolCallArguments(options.parsedBody);
2528
+ const transport = new WebStandardStreamableHTTPServerTransport;
2354
2529
  const server = options.createServer();
2355
2530
  await server.connect(transport);
2356
2531
  return transport.handleRequest(options.request, {
@@ -2358,54 +2533,63 @@ async function handleMcpHttpRequest(options) {
2358
2533
  });
2359
2534
  }
2360
2535
  export {
2361
- DYNAMOI_MCP_SCOPES,
2362
- DYNAMOI_MCP_VERSION,
2363
- DateRangeSchema2 as DateRangeSchema,
2364
- DynamoiCreateSmartLinkFromSpotifyInputSchema,
2365
- DynamoiCreateSmartLinksFromSpotifyArtistInputSchema,
2366
- DynamoiGetArtistAnalyticsInputSchema,
2367
- DynamoiGetArtistInputSchema,
2368
- DynamoiGetBillingInputSchema,
2369
- DynamoiGetCampaignAnalyticsInputSchema,
2370
- DynamoiGetCampaignDeploymentStatusInputSchema,
2371
- DynamoiGetCampaignInputSchema,
2372
- DynamoiGetCampaignReadinessInputSchema,
2373
- DynamoiGetCurrentUserInputSchema,
2374
- DynamoiGetOnboardingStatusInputSchema,
2375
- DynamoiGetPlatformStatusInputSchema,
2376
- DynamoiGetSmartLinkAnalyticsInputSchema,
2377
- DynamoiGetSmartLinkArtistSettingsInputSchema,
2378
- DynamoiGetSmartLinkInputSchema,
2379
- DynamoiLaunchCampaignInputSchema,
2380
- DynamoiListArtistsInputSchema,
2381
- DynamoiListAvailableCountriesInputSchema,
2382
- DynamoiListCampaignsInputSchema,
2383
- DynamoiListMediaAssetsInputSchema,
2384
- DynamoiListSmartLinksInputSchema,
2385
- DynamoiOpenAiFetchInputSchema,
2386
- DynamoiOpenAiSearchInputSchema,
2387
- DynamoiPauseCampaignInputSchema,
2388
- DynamoiPublishSmartLinkInputSchema,
2389
- DynamoiResumeCampaignInputSchema,
2390
- DynamoiSearchInputSchema,
2391
- DynamoiStartMetaConnectionInputSchema,
2392
- DynamoiStartYoutubeChannelLinkInputSchema,
2393
- DynamoiUpdateBudgetInputSchema,
2394
- DynamoiUpdateCampaignInputSchema,
2395
- DynamoiUpdateSmartLinkArtistSettingsInputSchema,
2396
- DynamoiUpdateSmartLinkInputSchema,
2397
- PHASE_1_TOOL_DEFINITIONS,
2398
- PHASE_2_TOOL_DEFINITIONS,
2399
- PHASE_3_TOOL_DEFINITIONS,
2400
- PHASE_4_TOOL_DEFINITIONS,
2401
- PHASE_ONBOARDING_TOOL_DEFINITIONS,
2402
- ToolFormatSchema2 as ToolFormatSchema,
2403
- buildProtectedResourceMetadata,
2404
- buildWwwAuthenticateHeader,
2405
- createDynamoiMcpServer,
2406
- getDynamoiToolDefinitions,
2407
- handleMcpHttpRequest,
2536
+ verifyAccessToken,
2408
2537
  parseDynamoiGetSmartLinkInput,
2409
- verifyAccessToken
2538
+ handleMcpHttpRequest,
2539
+ getDynamoiToolDefinitions,
2540
+ createDynamoiMcpServer,
2541
+ buildWwwAuthenticateHeader,
2542
+ buildProtectedResourceMetadata,
2543
+ ToolFormatSchema2 as ToolFormatSchema,
2544
+ PROSPECTIVE_BUDGET_FUNDING_CONSENT_VERSION,
2545
+ PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY_HASH,
2546
+ PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY,
2547
+ PHASE_ONBOARDING_TOOL_DEFINITIONS,
2548
+ PHASE_4_TOOL_DEFINITIONS,
2549
+ PHASE_3_TOOL_DEFINITIONS,
2550
+ PHASE_2_TOOL_DEFINITIONS,
2551
+ PHASE_1_TOOL_DEFINITIONS,
2552
+ DynamoiUpdateSmartLinkInputSchema,
2553
+ DynamoiUpdateSmartLinkArtistSettingsInputSchema,
2554
+ DynamoiUpdateCampaignInputSchema,
2555
+ DynamoiUpdateBudgetInputSchema,
2556
+ DynamoiStartYoutubeChannelLinkInputSchema,
2557
+ DynamoiStartMetaConnectionInputSchema,
2558
+ DynamoiSearchInputSchema,
2559
+ DynamoiResumeCampaignInputSchema,
2560
+ DynamoiPauseCampaignInputSchema,
2561
+ DynamoiOpenAiSearchInputSchema,
2562
+ DynamoiOpenAiFetchInputSchema,
2563
+ DynamoiListSmartLinksInputSchema,
2564
+ DynamoiListMediaAssetsInputSchema,
2565
+ DynamoiListCampaignsInputSchema,
2566
+ DynamoiListAvailableCountriesInputSchema,
2567
+ DynamoiListArtistsInputSchema,
2568
+ DynamoiLaunchCampaignInputSchema,
2569
+ DynamoiGetSmartLinkInputSchema,
2570
+ DynamoiGetSmartLinkArtistSettingsInputSchema,
2571
+ DynamoiGetSmartLinkAnalyticsInputSchema,
2572
+ DynamoiGetPlatformStatusInputSchema,
2573
+ DynamoiGetOnboardingStatusInputSchema,
2574
+ DynamoiGetDistributionApplicationInputSchema,
2575
+ DynamoiGetCurrentUserInputSchema,
2576
+ DynamoiGetCampaignReadinessInputSchema,
2577
+ DynamoiGetCampaignInputSchema,
2578
+ DynamoiGetCampaignDeploymentStatusInputSchema,
2579
+ DynamoiGetCampaignAnalyticsInputSchema,
2580
+ DynamoiGetBillingInputSchema,
2581
+ DynamoiGetArtistInputSchema,
2582
+ DynamoiGetArtistAnalyticsInputSchema,
2583
+ DynamoiCreateSmartLinksFromSpotifyArtistInputSchema,
2584
+ DynamoiCreateSmartLinkFromSpotifyInputSchema,
2585
+ DynamoiApplyForDistributionInputSchema,
2586
+ DateRangeSchema2 as DateRangeSchema,
2587
+ DYNAMOI_MCP_VERSION,
2588
+ DYNAMOI_MCP_TOOL_SCOPES,
2589
+ DYNAMOI_MCP_SCOPES,
2590
+ DYNAMOI_BETTER_AUTH_MCP_SCOPES,
2591
+ DISTRIBUTION_TOOL_DEFINITIONS
2410
2592
  };
2411
- //# sourceMappingURL=index.js.map
2593
+
2594
+ //# debugId=8DE392B1E37B09EC64756E2164756E21
2595
+ //# sourceMappingURL=index.js.map