@dynamoi/mcp 0.6.0 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -1
- package/README.md +125 -0
- package/dist/auth/protected-resource.d.ts +1 -1
- package/dist/auth/protected-resource.js +1 -1
- package/dist/{chunk-6SBJ7DZU.js → chunk-53YNLVA3.js} +12 -2
- package/dist/chunk-53YNLVA3.js.map +1 -0
- package/dist/index.d.ts +658 -937
- package/dist/index.js +677 -535
- package/dist/index.js.map +1 -1
- package/package.json +9 -8
- package/server.json +3 -3
- package/dist/chunk-6SBJ7DZU.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
DYNAMOI_MCP_SCOPES,
|
|
3
3
|
buildProtectedResourceMetadata,
|
|
4
4
|
buildWwwAuthenticateHeader
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-53YNLVA3.js";
|
|
6
6
|
|
|
7
7
|
// src/auth/verify-token.ts
|
|
8
8
|
import { createRemoteJWKSet, jwtVerify } from "jose";
|
|
@@ -73,7 +73,7 @@ async function verifyAccessToken(options) {
|
|
|
73
73
|
|
|
74
74
|
// src/server/create-server.ts
|
|
75
75
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
76
|
-
import * as
|
|
76
|
+
import * as z7 from "zod/v4";
|
|
77
77
|
|
|
78
78
|
// src/version.ts
|
|
79
79
|
var DYNAMOI_MCP_VERSION = "__DYNAMOI_MCP_VERSION__";
|
|
@@ -86,6 +86,31 @@ Meta and Google ad campaigns. Smart Links are free to create and manage: no per-
|
|
|
86
86
|
fee, no subscription requirement, and no upgrade gate. Managed advertising and ad
|
|
87
87
|
budgets are separate paid campaign services.
|
|
88
88
|
|
|
89
|
+
=== Session Start Routine ===
|
|
90
|
+
|
|
91
|
+
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.
|
|
92
|
+
|
|
93
|
+
Route by state from dynamoi_get_account_overview:
|
|
94
|
+
|
|
95
|
+
- state.hasAnyArtist === false: This is a brand-new user. Ask whether they are a Spotify artist, a YouTube creator, or a label/manager.
|
|
96
|
+
- 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.
|
|
97
|
+
- 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.
|
|
98
|
+
- Label or manager with a roster \u2192 read dynamoi://playbooks/label-or-manager for the multi-artist setup walkthrough.
|
|
99
|
+
|
|
100
|
+
- 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.
|
|
101
|
+
|
|
102
|
+
- state.hasAnyArtist === true && state.hasAnyActiveCampaign === false: Offer dynamoi_get_campaign_readiness to validate launch inputs without creating anything.
|
|
103
|
+
|
|
104
|
+
- state.hasAnyArtist === true && billing blocks a launch: 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 the target artist to confirm billing is active.
|
|
105
|
+
|
|
106
|
+
- state.hasAnyArtist === true && state.hasAnyConnectedMeta === false and the user wants Spotify Smart Campaigns: only offer dynamoi_start_meta_connection after billing is active. If the tool returns billing_required, route the user to dashboard billing first. If it returns billing_check_unavailable, retry shortly instead of treating the user as unpaid. After Meta browser return, poll dynamoi_get_platform_status for the target artist with the returned onboardingAttemptId and onboardingFlow=meta. Treat platforms.meta.status as complete when it is oauth_complete, partnership_pending, or partnership_active.
|
|
107
|
+
|
|
108
|
+
- 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.
|
|
109
|
+
|
|
110
|
+
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.
|
|
111
|
+
|
|
112
|
+
=== End Session Start Routine ===
|
|
113
|
+
|
|
89
114
|
Principles:
|
|
90
115
|
- Be accurate. If uncertain, ask a clarifying question before acting.
|
|
91
116
|
- 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.
|
|
@@ -101,8 +126,8 @@ Principles:
|
|
|
101
126
|
- When a user asks for a daily breakdown, pass granularity=DAILY on the analytics tool call.
|
|
102
127
|
- When a user asks for a written rollup, strongest campaign, or review-ready analytics summary, prefer format=summary on the analytics tool call.
|
|
103
128
|
- If a read tool already returned the requested answer in summary form, answer the user directly instead of chaining more read tools.
|
|
104
|
-
- When a user asks to create a shareable release link, landing page, link-in-bio destination, streaming link, Spotify link page, or free promotion asset, prefer Smart Link tools before campaign tools. Use
|
|
105
|
-
- When answering from Smart Link tools, lead with the
|
|
129
|
+
- 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.
|
|
130
|
+
- 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.
|
|
106
131
|
- Smart Link pixel tools accept validated pixel IDs only. Do not ask for arbitrary JavaScript, tag-manager snippets, or script code.
|
|
107
132
|
- Money values are shown in USD as presented in Dynamoi.
|
|
108
133
|
- Budget minimums: $10/day (daily), $100 total (Smart Campaign), $50 total (YouTube).
|
|
@@ -111,15 +136,16 @@ Principles:
|
|
|
111
136
|
|
|
112
137
|
Common workflows:
|
|
113
138
|
- Discovery: dynamoi_list_artists \u2192 dynamoi_list_campaigns \u2192 dynamoi_get_campaign \u2192
|
|
114
|
-
|
|
139
|
+
dynamoi_get_campaign with includeAnalytics=true when needed
|
|
115
140
|
- 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.
|
|
116
141
|
- Diagnose stuck campaign: dynamoi_get_campaign \u2192 dynamoi_get_platform_status \u2192
|
|
117
142
|
propose next steps
|
|
118
|
-
- Pause/resume: dynamoi_get_campaign (confirm) \u2192
|
|
119
|
-
- Budget update: dynamoi_get_campaign (confirm) \u2192
|
|
143
|
+
- Pause/resume: dynamoi_get_campaign (confirm) \u2192 dynamoi_update_campaign with action=pause or action=resume
|
|
144
|
+
- Budget update: dynamoi_get_campaign (confirm) \u2192 dynamoi_update_campaign with action=update_budget
|
|
120
145
|
- Launch: dynamoi_list_media_assets \u2192 dynamoi_launch_campaign
|
|
121
|
-
- Free Smart Link creation:
|
|
122
|
-
- Smart Link
|
|
146
|
+
- 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
|
|
147
|
+
- Free Smart Link single-release creation: dynamoi_list_artists \u2192 dynamoi_create_smart_link_from_spotify
|
|
148
|
+
- Smart Link analytics/settings: dynamoi_list_smart_links \u2192 dynamoi_get_smart_link with include=['analytics'] or include=['artist_settings']
|
|
123
149
|
- 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.
|
|
124
150
|
- 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.
|
|
125
151
|
`.trim();
|
|
@@ -181,7 +207,7 @@ function registerDynamoiPrompts(server) {
|
|
|
181
207
|
artistId: z.string().uuid().optional(),
|
|
182
208
|
spotifyUrl: z.string().trim().optional()
|
|
183
209
|
},
|
|
184
|
-
description: "Create
|
|
210
|
+
description: "Create free Smart Links from a Spotify artist, album, or track URL.",
|
|
185
211
|
title: "Create Free Smart Link"
|
|
186
212
|
},
|
|
187
213
|
(args) => asTextPrompt(
|
|
@@ -191,7 +217,7 @@ function registerDynamoiPrompts(server) {
|
|
|
191
217
|
args.spotifyUrl ? `Spotify URL: ${args.spotifyUrl}` : "Ask me for a Spotify artist, album, or track URL. Playlist URLs are not supported today.",
|
|
192
218
|
"",
|
|
193
219
|
"Smart Links are free: no per-link fee, no subscription requirement, and no upgrade gate. This does not create a paid campaign.",
|
|
194
|
-
"
|
|
220
|
+
"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."
|
|
195
221
|
].join("\n")
|
|
196
222
|
)
|
|
197
223
|
);
|
|
@@ -210,7 +236,7 @@ function registerDynamoiPrompts(server) {
|
|
|
210
236
|
args.artistId ? `Artist ID: ${args.artistId}` : "If no artistId is provided, start by listing artists and ask me which one to audit.",
|
|
211
237
|
"",
|
|
212
238
|
"Steps:",
|
|
213
|
-
"1. Use dynamoi_list_campaigns
|
|
239
|
+
"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.",
|
|
214
240
|
"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.",
|
|
215
241
|
"3. Recommend 3-5 next actions with clear priorities."
|
|
216
242
|
].join("\n")
|
|
@@ -262,9 +288,9 @@ function registerDynamoiPrompts(server) {
|
|
|
262
288
|
`Campaign ID: ${args.campaignId}`,
|
|
263
289
|
"",
|
|
264
290
|
"Steps:",
|
|
265
|
-
"1. Use dynamoi_get_campaign to inspect current status and blockers.",
|
|
291
|
+
"1. Use dynamoi_get_campaign with includeDeploymentStatus=true to inspect current status and blockers.",
|
|
266
292
|
"2. Use dynamoi_get_platform_status for the artist to check Meta/Google connection state.",
|
|
267
|
-
"3. If appropriate, suggest safe next actions
|
|
293
|
+
"3. If appropriate, suggest safe next actions and confirm before calling dynamoi_update_campaign."
|
|
268
294
|
].join("\n")
|
|
269
295
|
)
|
|
270
296
|
);
|
|
@@ -275,12 +301,227 @@ import {
|
|
|
275
301
|
ResourceTemplate
|
|
276
302
|
} from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
277
303
|
import * as z2 from "zod/v4";
|
|
304
|
+
|
|
305
|
+
// src/server/playbook-resources.ts
|
|
306
|
+
function registerPlaybookResources(server) {
|
|
307
|
+
server.registerResource(
|
|
308
|
+
"playbook-spotify-artist",
|
|
309
|
+
"dynamoi://playbooks/spotify-artist",
|
|
310
|
+
{
|
|
311
|
+
description: "Persona playbook: how to convert a Spotify artist user from auth-grant to first activated Smart Link.",
|
|
312
|
+
mimeType: "application/json",
|
|
313
|
+
title: "Playbook: Spotify Artist"
|
|
314
|
+
},
|
|
315
|
+
async (uri) => ({
|
|
316
|
+
contents: [
|
|
317
|
+
{
|
|
318
|
+
mimeType: "application/json",
|
|
319
|
+
text: JSON.stringify({
|
|
320
|
+
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.",
|
|
321
|
+
freePlanReminder: "Free Smart Links have no per-link fee, no subscription, and no upgrade gate. Creating a Smart Link does not create a paid campaign or spend ad budget.",
|
|
322
|
+
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.",
|
|
323
|
+
persona: "Independent musician or small artist with at least one Spotify release. Goal: increase Spotify streams.",
|
|
324
|
+
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.",
|
|
325
|
+
talkingPoints: {
|
|
326
|
+
differentiatorComparison: {
|
|
327
|
+
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.",
|
|
328
|
+
trigger: "User asks how Dynamoi differs from link-in-bio or Smart Link products."
|
|
329
|
+
},
|
|
330
|
+
hesitationReassurance: {
|
|
331
|
+
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.",
|
|
332
|
+
trigger: "User hesitates about price, commitment, or whether the first month is enough to test."
|
|
333
|
+
},
|
|
334
|
+
postLaunchExpectations: {
|
|
335
|
+
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.",
|
|
336
|
+
trigger: "Immediately after a successful launch_campaign call or when the user asks when results should show."
|
|
337
|
+
},
|
|
338
|
+
smartLinkPixelSeed: {
|
|
339
|
+
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.",
|
|
340
|
+
trigger: "Smart Link user has no campaign yet or asks why a free Smart Link matters before ads."
|
|
341
|
+
},
|
|
342
|
+
socialSideEffect: {
|
|
343
|
+
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.",
|
|
344
|
+
trigger: "User mentions Instagram, social media growth, or followers while discussing Spotify promotion."
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
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."
|
|
348
|
+
}),
|
|
349
|
+
uri: uri.href
|
|
350
|
+
}
|
|
351
|
+
]
|
|
352
|
+
})
|
|
353
|
+
);
|
|
354
|
+
server.registerResource(
|
|
355
|
+
"playbook-youtube-creator",
|
|
356
|
+
"dynamoi://playbooks/youtube-creator",
|
|
357
|
+
{
|
|
358
|
+
description: "Persona playbook: how to introduce a YouTube creator to Dynamoi's revenue-per-view optimization advantage.",
|
|
359
|
+
mimeType: "application/json",
|
|
360
|
+
title: "Playbook: YouTube Creator"
|
|
361
|
+
},
|
|
362
|
+
async (uri) => ({
|
|
363
|
+
contents: [
|
|
364
|
+
{
|
|
365
|
+
mimeType: "application/json",
|
|
366
|
+
text: JSON.stringify({
|
|
367
|
+
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.",
|
|
368
|
+
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.",
|
|
369
|
+
persona: "Channel owner of any niche (music, education, gaming, vlog, podcast, tutorial, product reviews) who wants subscriber growth that pays back via AdSense.",
|
|
370
|
+
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.",
|
|
371
|
+
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.",
|
|
372
|
+
talkingPoints: {
|
|
373
|
+
differentiatorComparison: {
|
|
374
|
+
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.",
|
|
375
|
+
trigger: "User asks how YouTube campaigns differ from normal Google Ads or creator-growth services."
|
|
376
|
+
},
|
|
377
|
+
hesitationReassurance: {
|
|
378
|
+
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.",
|
|
379
|
+
trigger: "User expresses pricing concern or asks whether they can test without a long commitment."
|
|
380
|
+
},
|
|
381
|
+
playlistWaterfall: {
|
|
382
|
+
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.",
|
|
383
|
+
trigger: "User asks whether campaigns can help subscribers or the whole channel instead of one video."
|
|
384
|
+
},
|
|
385
|
+
postLaunchExpectations: {
|
|
386
|
+
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.",
|
|
387
|
+
trigger: "Immediately after a successful YouTube launch or when the user asks when results should show."
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}),
|
|
391
|
+
uri: uri.href
|
|
392
|
+
}
|
|
393
|
+
]
|
|
394
|
+
})
|
|
395
|
+
);
|
|
396
|
+
server.registerResource(
|
|
397
|
+
"playbook-label-or-manager",
|
|
398
|
+
"dynamoi://playbooks/label-or-manager",
|
|
399
|
+
{
|
|
400
|
+
description: "Persona playbook: how to onboard a label, manager, or anyone running a roster of multiple artists.",
|
|
401
|
+
mimeType: "application/json",
|
|
402
|
+
title: "Playbook: Label or Manager"
|
|
403
|
+
},
|
|
404
|
+
async (uri) => ({
|
|
405
|
+
contents: [
|
|
406
|
+
{
|
|
407
|
+
mimeType: "application/json",
|
|
408
|
+
text: JSON.stringify({
|
|
409
|
+
billingNote: "Consolidated billing across all artists in the organization. No per-seat charge, no per-artist fee.",
|
|
410
|
+
persona: "Label owner, manager, or distributor handling more than one artist. Goal: oversee promotion across a roster from one account.",
|
|
411
|
+
rolesNote: "Dynamoi supports admin, editor, and viewer roles at organization and artist level. Editors can mutate everything except admin management; viewers are read-only.",
|
|
412
|
+
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.",
|
|
413
|
+
setupSequence: [
|
|
414
|
+
"If they have one artist ready: route to dynamoi://playbooks/spotify-artist for that first artist.",
|
|
415
|
+
"After the first artist is set up, mention team invites are managed in the dashboard at /dashboard/settings/organization (no MCP tool yet).",
|
|
416
|
+
"Cross-artist analytics are available via dynamoi_get_artist_analytics per artist; a roster-wide rollup is dashboard-only."
|
|
417
|
+
],
|
|
418
|
+
talkingPoints: {
|
|
419
|
+
consolidatedRoster: {
|
|
420
|
+
claim: "One organization can hold multiple artists with admin, editor, and viewer roles, while campaign launch and billing state stay visible per artist.",
|
|
421
|
+
trigger: "User says they manage more than one artist or asks whether a label/manager workflow is supported."
|
|
422
|
+
},
|
|
423
|
+
differentiatorComparison: {
|
|
424
|
+
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.",
|
|
425
|
+
trigger: "User compares Dynamoi to Linkfire, Feature.fm, Hypeddit, or a label marketing stack."
|
|
426
|
+
},
|
|
427
|
+
hesitationReassurance: {
|
|
428
|
+
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.",
|
|
429
|
+
trigger: "User asks whether billing scales per seat or wants to test with one artist first."
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}),
|
|
433
|
+
uri: uri.href
|
|
434
|
+
}
|
|
435
|
+
]
|
|
436
|
+
})
|
|
437
|
+
);
|
|
438
|
+
server.registerResource(
|
|
439
|
+
"playbook-onboarding-tree",
|
|
440
|
+
"dynamoi://playbooks/onboarding-tree",
|
|
441
|
+
{
|
|
442
|
+
description: "Decision tree for routing a brand-new MCP user to the right persona playbook based on their first reply.",
|
|
443
|
+
mimeType: "application/json",
|
|
444
|
+
title: "Playbook: Onboarding Decision Tree"
|
|
445
|
+
},
|
|
446
|
+
async (uri) => ({
|
|
447
|
+
contents: [
|
|
448
|
+
{
|
|
449
|
+
mimeType: "application/json",
|
|
450
|
+
text: JSON.stringify({
|
|
451
|
+
nodes: [
|
|
452
|
+
{
|
|
453
|
+
do: [
|
|
454
|
+
{
|
|
455
|
+
match: "Spotify artist",
|
|
456
|
+
routeTo: "dynamoi://playbooks/spotify-artist"
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
match: "YouTube creator",
|
|
460
|
+
routeTo: "dynamoi://playbooks/youtube-creator"
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
match: "Label / manager / multiple artists",
|
|
464
|
+
routeTo: "dynamoi://playbooks/label-or-manager"
|
|
465
|
+
}
|
|
466
|
+
],
|
|
467
|
+
if: "state.hasAnyArtist === false",
|
|
468
|
+
question: "Are you a Spotify artist, a YouTube creator, or running a label/managing a roster?"
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
do: "Offer dynamoi_create_smart_link_from_spotify or dynamoi_create_smart_links_from_spotify_artist for the fastest visible win.",
|
|
472
|
+
if: "state.hasAnyArtist === true && state.hasAnySmartLink === false"
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
do: "Offer dynamoi_get_campaign_readiness to validate launch inputs before creating anything.",
|
|
476
|
+
if: "state.hasAnyArtist === true && state.hasAnyActiveCampaign === false"
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
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.",
|
|
480
|
+
if: "state.hasAnyArtist === true && billing is the launch blocker"
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
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.",
|
|
484
|
+
if: "state.hasAnyArtist === true && user wants Spotify Smart Campaigns && state.hasAnyConnectedMeta === false"
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
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.",
|
|
488
|
+
if: "state.hasAnyArtist === true && user wants YouTube growth && state.hasAnyConnectedYoutube === false"
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
do: "Ask whether they want a performance summary, a new campaign, or to update an existing campaign.",
|
|
492
|
+
if: "state.hasAnyActiveCampaign === true"
|
|
493
|
+
}
|
|
494
|
+
],
|
|
495
|
+
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.",
|
|
496
|
+
talkingPoints: {
|
|
497
|
+
creatorFirstChoice: {
|
|
498
|
+
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.",
|
|
499
|
+
trigger: "Brand-new user has no artists and asks what to do first."
|
|
500
|
+
},
|
|
501
|
+
postLaunchExpectations: {
|
|
502
|
+
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.",
|
|
503
|
+
trigger: "User asks what happens after launch or whether a first-day result is good or bad."
|
|
504
|
+
},
|
|
505
|
+
smartLinkBeforeAds: {
|
|
506
|
+
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.",
|
|
507
|
+
trigger: "User has an artist but no Smart Link or asks why the assistant recommends links before ads."
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}),
|
|
511
|
+
uri: uri.href
|
|
512
|
+
}
|
|
513
|
+
]
|
|
514
|
+
})
|
|
515
|
+
);
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
// src/server/resources.ts
|
|
278
519
|
function registerDynamoiResources(server, adapter) {
|
|
279
520
|
server.registerResource(
|
|
280
521
|
"platform-pricing",
|
|
281
522
|
"dynamoi://platform/pricing",
|
|
282
523
|
{
|
|
283
|
-
description: "Dynamoi
|
|
524
|
+
description: "Dynamoi campaign setup guidance and campaign budget minimums.",
|
|
284
525
|
mimeType: "application/json",
|
|
285
526
|
title: "Pricing"
|
|
286
527
|
},
|
|
@@ -289,10 +530,6 @@ function registerDynamoiResources(server, adapter) {
|
|
|
289
530
|
{
|
|
290
531
|
mimeType: "application/json",
|
|
291
532
|
text: JSON.stringify({
|
|
292
|
-
activationBonus: {
|
|
293
|
-
amountUsd: 600,
|
|
294
|
-
note: "100% match on first month \u2014 pay $300, get $600 ad credit"
|
|
295
|
-
},
|
|
296
533
|
budgetMinimums: {
|
|
297
534
|
smartCampaign: {
|
|
298
535
|
dailyUsd: 10,
|
|
@@ -305,16 +542,12 @@ function registerDynamoiResources(server, adapter) {
|
|
|
305
542
|
totalUsd: 50
|
|
306
543
|
}
|
|
307
544
|
},
|
|
308
|
-
creditRollover: "Credits roll over for 12 months",
|
|
309
545
|
includes: "Free Smart Links, unlimited team seats, unlimited artists, white-glove support, and campaign landing-page support where available",
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
priceUsdMonthly: 300
|
|
316
|
-
}
|
|
317
|
-
]
|
|
546
|
+
managedAdvertising: {
|
|
547
|
+
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.",
|
|
548
|
+
paymentSetupLocation: "Dynamoi dashboard"
|
|
549
|
+
},
|
|
550
|
+
noContracts: true
|
|
318
551
|
}),
|
|
319
552
|
uri: uri.href
|
|
320
553
|
}
|
|
@@ -400,6 +633,7 @@ function registerDynamoiResources(server, adapter) {
|
|
|
400
633
|
free: true,
|
|
401
634
|
included: [
|
|
402
635
|
"Unlimited free Smart Links for supported Spotify artist, album, and track URLs",
|
|
636
|
+
"Artist hub pages for catalog-level Smart Links",
|
|
403
637
|
"Smart Link analytics",
|
|
404
638
|
"Artist-level themes",
|
|
405
639
|
"Validated Meta, TikTok, and Google Ads pixel IDs",
|
|
@@ -422,6 +656,7 @@ function registerDynamoiResources(server, adapter) {
|
|
|
422
656
|
{
|
|
423
657
|
mimeType: "application/json",
|
|
424
658
|
text: JSON.stringify({
|
|
659
|
+
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.",
|
|
425
660
|
creationInputs: {
|
|
426
661
|
supportedSpotifyKinds: ["artist", "album", "track"],
|
|
427
662
|
unsupportedToday: ["playlist"]
|
|
@@ -463,6 +698,7 @@ function registerDynamoiResources(server, adapter) {
|
|
|
463
698
|
},
|
|
464
699
|
managedAdvertising: {
|
|
465
700
|
paid: true,
|
|
701
|
+
pricing: "Billing and payment setup happen in the Dynamoi dashboard, outside ChatGPT.",
|
|
466
702
|
useFor: "Managed Meta and Google ad campaigns for Spotify promotion and YouTube channel growth."
|
|
467
703
|
}
|
|
468
704
|
}),
|
|
@@ -485,6 +721,7 @@ function registerDynamoiResources(server, adapter) {
|
|
|
485
721
|
mimeType: "application/json",
|
|
486
722
|
text: JSON.stringify({
|
|
487
723
|
answerWith: [
|
|
724
|
+
"artist hub URL when present",
|
|
488
725
|
"release title",
|
|
489
726
|
"artist name",
|
|
490
727
|
"public URL",
|
|
@@ -497,7 +734,7 @@ function registerDynamoiResources(server, adapter) {
|
|
|
497
734
|
"workflow IDs",
|
|
498
735
|
"provider implementation details"
|
|
499
736
|
],
|
|
500
|
-
whenToUse: "Use Smart Link tools when the user asks for free release links, streaming landing pages, Spotify link pages, Smart Link analytics, themes, pixels, publish state, or public URLs."
|
|
737
|
+
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."
|
|
501
738
|
}),
|
|
502
739
|
uri: uri.href
|
|
503
740
|
}
|
|
@@ -517,6 +754,7 @@ function registerDynamoiResources(server, adapter) {
|
|
|
517
754
|
{
|
|
518
755
|
mimeType: "application/json",
|
|
519
756
|
text: JSON.stringify({
|
|
757
|
+
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.",
|
|
520
758
|
genericAdvice: "Answer generic music marketing questions directly unless the user asks about their Dynamoi account or asks Dynamoi to take an action.",
|
|
521
759
|
stopRule: "If a read tool already returns the requested fact in summary form, answer the user instead of chaining more read tools.",
|
|
522
760
|
userFacingFields: "Prefer names, public URLs, statuses, money display values, and next actions over internal IDs.",
|
|
@@ -527,6 +765,7 @@ function registerDynamoiResources(server, adapter) {
|
|
|
527
765
|
]
|
|
528
766
|
})
|
|
529
767
|
);
|
|
768
|
+
registerPlaybookResources(server);
|
|
530
769
|
server.registerResource(
|
|
531
770
|
"music-marketing-when-to-use-dynamoi",
|
|
532
771
|
"dynamoi://music-marketing/when-to-use-dynamoi",
|
|
@@ -748,29 +987,6 @@ var ErrorEnvelopeOutputSchema = z3.object({
|
|
|
748
987
|
status: z3.literal("error")
|
|
749
988
|
}).strict();
|
|
750
989
|
var AnyToolDataOutputSchema = z3.object({}).passthrough();
|
|
751
|
-
var PauseResumePlatformResultOutputSchema = z3.object({
|
|
752
|
-
message: z3.string().optional(),
|
|
753
|
-
platform: z3.enum(["META", "GOOGLE"]),
|
|
754
|
-
success: z3.boolean()
|
|
755
|
-
}).strict();
|
|
756
|
-
var PauseResumeCampaignDataOutputSchema = z3.object({
|
|
757
|
-
actionRequired: z3.array(z3.string()).optional(),
|
|
758
|
-
contentTitle: z3.string(),
|
|
759
|
-
id: z3.string(),
|
|
760
|
-
newStatus: z3.enum(["PAUSED", "ACTIVE"]),
|
|
761
|
-
platformResults: z3.array(PauseResumePlatformResultOutputSchema),
|
|
762
|
-
warnings: z3.array(z3.string()).optional()
|
|
763
|
-
}).strict();
|
|
764
|
-
var UpdateBudgetDataOutputSchema = z3.object({
|
|
765
|
-
actionRequired: z3.array(z3.string()).optional(),
|
|
766
|
-
budgetType: z3.enum(["DAILY", "TOTAL"]),
|
|
767
|
-
contentTitle: z3.string(),
|
|
768
|
-
endDate: z3.string().optional(),
|
|
769
|
-
id: z3.string(),
|
|
770
|
-
newBudget: MoneyDisplayOutputSchema,
|
|
771
|
-
previousBudget: MoneyDisplayOutputSchema,
|
|
772
|
-
warnings: z3.array(z3.string()).optional()
|
|
773
|
-
}).strict();
|
|
774
990
|
var MediaAssetSummaryOutputSchema = z3.object({
|
|
775
991
|
aspectRatio: z3.string().optional(),
|
|
776
992
|
createdAt: z3.string(),
|
|
@@ -805,6 +1021,7 @@ var SmartLinkStatusSchemas = {
|
|
|
805
1021
|
theme: z3.enum(["classic", "brutalist", "aurora", "cinematic"])
|
|
806
1022
|
};
|
|
807
1023
|
var SmartLinkSummaryOutputSchema = z3.object({
|
|
1024
|
+
artistHubUrl: z3.string(),
|
|
808
1025
|
artistId: z3.string(),
|
|
809
1026
|
artistName: z3.string(),
|
|
810
1027
|
claimStatus: SmartLinkStatusSchemas.claimStatus,
|
|
@@ -844,58 +1061,6 @@ var ListSmartLinksSummaryOutputSchema = z3.object({
|
|
|
844
1061
|
summary: z3.string(),
|
|
845
1062
|
totalCount: z3.number()
|
|
846
1063
|
}).strict();
|
|
847
|
-
var SmartLinkSettingsOutputSchema = z3.object({
|
|
848
|
-
artistId: z3.string(),
|
|
849
|
-
artistName: z3.string(),
|
|
850
|
-
availableThemes: z3.array(SmartLinkStatusSchemas.theme),
|
|
851
|
-
defaultTheme: SmartLinkStatusSchemas.theme,
|
|
852
|
-
isEnabled: z3.boolean(),
|
|
853
|
-
pixels: z3.object({
|
|
854
|
-
googleAdsConversionId: z3.string().nullable(),
|
|
855
|
-
metaPixelId: z3.string().nullable(),
|
|
856
|
-
tiktokPixelId: z3.string().nullable()
|
|
857
|
-
}).strict(),
|
|
858
|
-
summary: z3.string().optional()
|
|
859
|
-
}).strict();
|
|
860
|
-
var SmartLinkAnalyticsTotalsOutputSchema = z3.object({
|
|
861
|
-
anonymousVisits: z3.number(),
|
|
862
|
-
promoteCtaClicks: z3.number(),
|
|
863
|
-
shareClicks: z3.number(),
|
|
864
|
-
streamingServiceClicks: z3.number()
|
|
865
|
-
}).strict();
|
|
866
|
-
var SmartLinkBreakdownsOutputSchema = z3.object({
|
|
867
|
-
countryClicks: z3.record(z3.string(), z3.number()).optional(),
|
|
868
|
-
countryViews: z3.record(z3.string(), z3.number()).optional(),
|
|
869
|
-
deviceClicks: z3.record(z3.string(), z3.number()).optional(),
|
|
870
|
-
deviceViews: z3.record(z3.string(), z3.number()).optional(),
|
|
871
|
-
localeClicks: z3.record(z3.string(), z3.number()).optional(),
|
|
872
|
-
localeViews: z3.record(z3.string(), z3.number()).optional(),
|
|
873
|
-
referrerClicks: z3.record(z3.string(), z3.number()).optional(),
|
|
874
|
-
referrerViews: z3.record(z3.string(), z3.number()).optional(),
|
|
875
|
-
serviceClicks: z3.record(z3.string(), z3.number()).optional(),
|
|
876
|
-
themeClicks: z3.record(z3.string(), z3.number()).optional(),
|
|
877
|
-
themeViews: z3.record(z3.string(), z3.number()).optional(),
|
|
878
|
-
utmClicks: z3.record(z3.string(), z3.number()).optional(),
|
|
879
|
-
utmViews: z3.record(z3.string(), z3.number()).optional()
|
|
880
|
-
}).strict();
|
|
881
|
-
var SmartLinkAnalyticsOutputSchema = z3.object({
|
|
882
|
-
artistId: z3.string(),
|
|
883
|
-
breakdowns: SmartLinkBreakdownsOutputSchema.optional(),
|
|
884
|
-
daily: z3.array(
|
|
885
|
-
SmartLinkAnalyticsTotalsOutputSchema.extend({
|
|
886
|
-
date: z3.string()
|
|
887
|
-
}).strict()
|
|
888
|
-
).optional(),
|
|
889
|
-
dateRange: z3.object({ end: z3.string(), start: z3.string() }).strict(),
|
|
890
|
-
playLinkId: z3.string(),
|
|
891
|
-
releaseTitle: z3.string(),
|
|
892
|
-
totals: SmartLinkAnalyticsTotalsOutputSchema,
|
|
893
|
-
warnings: z3.array(z3.string()).optional()
|
|
894
|
-
}).strict();
|
|
895
|
-
var SmartLinkAnalyticsSummaryOutputSchema = z3.object({
|
|
896
|
-
summary: z3.string(),
|
|
897
|
-
warnings: z3.array(z3.string()).optional()
|
|
898
|
-
}).strict();
|
|
899
1064
|
var AvailableCountryOutputSchema = z3.object({
|
|
900
1065
|
code: z3.string(),
|
|
901
1066
|
dominantLanguage: z3.string().optional(),
|
|
@@ -915,20 +1080,6 @@ var SummaryCountOutputSchema = z3.object({
|
|
|
915
1080
|
summary: z3.string(),
|
|
916
1081
|
totalCount: z3.number()
|
|
917
1082
|
}).strict();
|
|
918
|
-
var ProductReadinessOutputSchema = z3.object({
|
|
919
|
-
blockers: z3.array(z3.string()),
|
|
920
|
-
isReady: z3.boolean(),
|
|
921
|
-
missingRequirements: z3.array(z3.string()),
|
|
922
|
-
nextAction: z3.string().optional(),
|
|
923
|
-
warnings: z3.array(z3.string())
|
|
924
|
-
}).strict();
|
|
925
|
-
var GetOnboardingStatusDataOutputSchema = z3.object({
|
|
926
|
-
artistId: z3.string(),
|
|
927
|
-
artistName: z3.string(),
|
|
928
|
-
overallNextAction: z3.string().optional(),
|
|
929
|
-
smartCampaign: ProductReadinessOutputSchema,
|
|
930
|
-
youtube: ProductReadinessOutputSchema
|
|
931
|
-
}).strict();
|
|
932
1083
|
var SummaryWarningsActionsOutputSchema = z3.object({
|
|
933
1084
|
actionRequired: z3.array(z3.string()).optional(),
|
|
934
1085
|
summary: z3.string(),
|
|
@@ -954,42 +1105,28 @@ var GetCampaignReadinessDataOutputSchema = z3.object({
|
|
|
954
1105
|
recommendedNextAction: z3.string(),
|
|
955
1106
|
warnings: z3.array(z3.string())
|
|
956
1107
|
}).strict();
|
|
957
|
-
var GetCampaignDeploymentStatusDataOutputSchema = z3.object({
|
|
958
|
-
artistId: z3.string(),
|
|
959
|
-
artistName: z3.string(),
|
|
960
|
-
blockers: z3.array(z3.string()),
|
|
961
|
-
campaignId: z3.string(),
|
|
962
|
-
campaignType: z3.enum(["SMART_CAMPAIGN", "YOUTUBE"]),
|
|
963
|
-
contentTitle: z3.string(),
|
|
964
|
-
deliveryState: z3.enum(["LIVE", "PENDING", "BLOCKED", "PAUSED", "ENDED"]),
|
|
965
|
-
nextAction: z3.string().optional(),
|
|
966
|
-
platforms: z3.array(
|
|
967
|
-
z3.object({
|
|
968
|
-
errorMessage: z3.string().optional(),
|
|
969
|
-
linkedProviderId: z3.string().optional(),
|
|
970
|
-
platform: z3.enum(["META", "GOOGLE"]),
|
|
971
|
-
status: z3.string()
|
|
972
|
-
}).strict()
|
|
973
|
-
),
|
|
974
|
-
status: z3.string(),
|
|
975
|
-
warnings: z3.array(z3.string())
|
|
976
|
-
}).strict();
|
|
977
1108
|
var CreateSmartLinkFromSpotifyDataOutputSchema = SmartLinkDetailsOutputSchema.extend({
|
|
978
1109
|
outcome: z3.enum(["created", "existing"]),
|
|
979
1110
|
workflowRunId: z3.string().nullable(),
|
|
980
1111
|
workflowWarning: z3.string().nullable()
|
|
981
1112
|
}).strict();
|
|
982
|
-
var
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
1113
|
+
var CreateSmartLinksFromSpotifyArtistDataOutputSchema = z3.object({
|
|
1114
|
+
artistCreatedFromSpotify: z3.boolean().optional(),
|
|
1115
|
+
artistHubUrl: z3.string(),
|
|
1116
|
+
artistId: z3.string(),
|
|
1117
|
+
artistName: z3.string(),
|
|
1118
|
+
catalogImportStatus: z3.enum(["started", "start_failed"]),
|
|
1119
|
+
catalogWorkflowRunId: z3.string().nullable(),
|
|
1120
|
+
currentSmartLinkCount: z3.number(),
|
|
1121
|
+
existingCount: z3.number(),
|
|
1122
|
+
initialRenderRunId: z3.string().nullable(),
|
|
1123
|
+
initialSmartLink: SmartLinkSummaryOutputSchema.nullable(),
|
|
1124
|
+
newlyAvailableCount: z3.number(),
|
|
1125
|
+
nextActions: z3.array(z3.string()),
|
|
1126
|
+
smartLinks: z3.array(SmartLinkSummaryOutputSchema),
|
|
1127
|
+
spotifyArtistUrl: z3.string(),
|
|
1128
|
+
summary: z3.string(),
|
|
1129
|
+
warnings: z3.array(z3.string()).optional()
|
|
993
1130
|
}).strict();
|
|
994
1131
|
var LaunchCampaignDataOutputSchema = z3.object({
|
|
995
1132
|
budget: MoneyDisplayOutputSchema,
|
|
@@ -1014,30 +1151,6 @@ var AnyOutputEnvelopeSchema = z3.union([
|
|
|
1014
1151
|
}),
|
|
1015
1152
|
ErrorEnvelopeOutputSchema
|
|
1016
1153
|
]);
|
|
1017
|
-
var PauseResumeOutputEnvelopeSchema = z3.union([
|
|
1018
|
-
z3.object({
|
|
1019
|
-
data: PauseResumeCampaignDataOutputSchema,
|
|
1020
|
-
status: z3.literal("success")
|
|
1021
|
-
}),
|
|
1022
|
-
z3.object({
|
|
1023
|
-
data: PauseResumeCampaignDataOutputSchema,
|
|
1024
|
-
message: z3.string(),
|
|
1025
|
-
status: z3.literal("partial_success")
|
|
1026
|
-
}),
|
|
1027
|
-
ErrorEnvelopeOutputSchema
|
|
1028
|
-
]);
|
|
1029
|
-
var UpdateBudgetOutputEnvelopeSchema = z3.union([
|
|
1030
|
-
z3.object({
|
|
1031
|
-
data: UpdateBudgetDataOutputSchema,
|
|
1032
|
-
status: z3.literal("success")
|
|
1033
|
-
}),
|
|
1034
|
-
z3.object({
|
|
1035
|
-
data: UpdateBudgetDataOutputSchema,
|
|
1036
|
-
message: z3.string(),
|
|
1037
|
-
status: z3.literal("partial_success")
|
|
1038
|
-
}),
|
|
1039
|
-
ErrorEnvelopeOutputSchema
|
|
1040
|
-
]);
|
|
1041
1154
|
var ListMediaAssetsOutputEnvelopeSchema = z3.union([
|
|
1042
1155
|
z3.object({
|
|
1043
1156
|
data: z3.union([
|
|
@@ -1065,16 +1178,6 @@ var ListAvailableCountriesOutputEnvelopeSchema = z3.union([
|
|
|
1065
1178
|
}),
|
|
1066
1179
|
ErrorEnvelopeOutputSchema
|
|
1067
1180
|
]);
|
|
1068
|
-
var GetOnboardingStatusOutputEnvelopeSchema = z3.union([
|
|
1069
|
-
z3.object({
|
|
1070
|
-
data: z3.union([
|
|
1071
|
-
GetOnboardingStatusDataOutputSchema,
|
|
1072
|
-
SummaryWarningsActionsOutputSchema
|
|
1073
|
-
]),
|
|
1074
|
-
status: z3.literal("success")
|
|
1075
|
-
}),
|
|
1076
|
-
ErrorEnvelopeOutputSchema
|
|
1077
|
-
]);
|
|
1078
1181
|
var GetCampaignReadinessOutputEnvelopeSchema = z3.union([
|
|
1079
1182
|
z3.object({
|
|
1080
1183
|
data: z3.union([
|
|
@@ -1085,19 +1188,16 @@ var GetCampaignReadinessOutputEnvelopeSchema = z3.union([
|
|
|
1085
1188
|
}),
|
|
1086
1189
|
ErrorEnvelopeOutputSchema
|
|
1087
1190
|
]);
|
|
1088
|
-
var
|
|
1191
|
+
var CreateSmartLinkFromSpotifyOutputEnvelopeSchema = z3.union([
|
|
1089
1192
|
z3.object({
|
|
1090
|
-
data:
|
|
1091
|
-
GetCampaignDeploymentStatusDataOutputSchema,
|
|
1092
|
-
SummaryWarningsActionsOutputSchema
|
|
1093
|
-
]),
|
|
1193
|
+
data: CreateSmartLinkFromSpotifyDataOutputSchema,
|
|
1094
1194
|
status: z3.literal("success")
|
|
1095
1195
|
}),
|
|
1096
1196
|
ErrorEnvelopeOutputSchema
|
|
1097
1197
|
]);
|
|
1098
|
-
var
|
|
1198
|
+
var CreateSmartLinksFromSpotifyArtistOutputEnvelopeSchema = z3.union([
|
|
1099
1199
|
z3.object({
|
|
1100
|
-
data:
|
|
1200
|
+
data: CreateSmartLinksFromSpotifyArtistDataOutputSchema,
|
|
1101
1201
|
status: z3.literal("success")
|
|
1102
1202
|
}),
|
|
1103
1203
|
ErrorEnvelopeOutputSchema
|
|
@@ -1112,54 +1212,6 @@ var ListSmartLinksOutputEnvelopeSchema = z3.union([
|
|
|
1112
1212
|
}),
|
|
1113
1213
|
ErrorEnvelopeOutputSchema
|
|
1114
1214
|
]);
|
|
1115
|
-
var GetSmartLinkOutputEnvelopeSchema = z3.union([
|
|
1116
|
-
z3.object({
|
|
1117
|
-
data: z3.union([
|
|
1118
|
-
SmartLinkDetailsOutputSchema,
|
|
1119
|
-
z3.object({ summary: z3.string() }).passthrough()
|
|
1120
|
-
]),
|
|
1121
|
-
status: z3.literal("success")
|
|
1122
|
-
}),
|
|
1123
|
-
ErrorEnvelopeOutputSchema
|
|
1124
|
-
]);
|
|
1125
|
-
var GetSmartLinkAnalyticsOutputEnvelopeSchema = z3.union([
|
|
1126
|
-
z3.object({
|
|
1127
|
-
data: z3.union([
|
|
1128
|
-
SmartLinkAnalyticsOutputSchema,
|
|
1129
|
-
SmartLinkAnalyticsSummaryOutputSchema
|
|
1130
|
-
]),
|
|
1131
|
-
status: z3.literal("success")
|
|
1132
|
-
}),
|
|
1133
|
-
ErrorEnvelopeOutputSchema
|
|
1134
|
-
]);
|
|
1135
|
-
var SmartLinkArtistSettingsOutputEnvelopeSchema = z3.union([
|
|
1136
|
-
z3.object({
|
|
1137
|
-
data: SmartLinkSettingsOutputSchema,
|
|
1138
|
-
status: z3.literal("success")
|
|
1139
|
-
}),
|
|
1140
|
-
ErrorEnvelopeOutputSchema
|
|
1141
|
-
]);
|
|
1142
|
-
var UpdateSmartLinkOutputEnvelopeSchema = z3.union([
|
|
1143
|
-
z3.object({
|
|
1144
|
-
data: UpdateSmartLinkDataOutputSchema,
|
|
1145
|
-
status: z3.literal("success")
|
|
1146
|
-
}),
|
|
1147
|
-
ErrorEnvelopeOutputSchema
|
|
1148
|
-
]);
|
|
1149
|
-
var UpdateSmartLinkArtistSettingsOutputEnvelopeSchema = z3.union([
|
|
1150
|
-
z3.object({
|
|
1151
|
-
data: UpdateSmartLinkArtistSettingsDataOutputSchema,
|
|
1152
|
-
status: z3.literal("success")
|
|
1153
|
-
}),
|
|
1154
|
-
ErrorEnvelopeOutputSchema
|
|
1155
|
-
]);
|
|
1156
|
-
var PublishSmartLinkOutputEnvelopeSchema = z3.union([
|
|
1157
|
-
z3.object({
|
|
1158
|
-
data: PublishSmartLinkDataOutputSchema,
|
|
1159
|
-
status: z3.literal("success")
|
|
1160
|
-
}),
|
|
1161
|
-
ErrorEnvelopeOutputSchema
|
|
1162
|
-
]);
|
|
1163
1215
|
|
|
1164
1216
|
// src/server/smart-link-tools.ts
|
|
1165
1217
|
var ToolFormatSchema = z4.enum(["json", "summary"]);
|
|
@@ -1221,6 +1273,13 @@ var DynamoiCreateSmartLinkFromSpotifyInputSchema = z4.object({
|
|
|
1221
1273
|
spotifyUrl: z4.string().trim().min(1).max(500),
|
|
1222
1274
|
userIntentSummary: UserIntentSummarySchema
|
|
1223
1275
|
}).strict();
|
|
1276
|
+
var DynamoiCreateSmartLinksFromSpotifyArtistInputSchema = z4.object({
|
|
1277
|
+
artistId: z4.string().uuid().optional(),
|
|
1278
|
+
clientRequestId: RequiredClientRequestIdSchema.optional(),
|
|
1279
|
+
format: ToolFormatSchema.optional(),
|
|
1280
|
+
spotifyArtistUrl: z4.string().trim().min(1).max(500),
|
|
1281
|
+
userIntentSummary: UserIntentSummarySchema
|
|
1282
|
+
}).strict();
|
|
1224
1283
|
var DynamoiListSmartLinksInputSchema = z4.object({
|
|
1225
1284
|
artistId: z4.string().uuid(),
|
|
1226
1285
|
cursor: z4.string().optional(),
|
|
@@ -1231,17 +1290,29 @@ var DynamoiListSmartLinksInputSchema = z4.object({
|
|
|
1231
1290
|
}).strict();
|
|
1232
1291
|
var DynamoiGetSmartLinkInputSchema = z4.object({
|
|
1233
1292
|
artistId: z4.string().uuid().optional(),
|
|
1293
|
+
dateRange: DateRangeSchema.optional(),
|
|
1234
1294
|
format: ToolFormatSchema.optional(),
|
|
1295
|
+
granularity: z4.enum(["TOTAL", "DAILY"]).optional(),
|
|
1296
|
+
include: z4.array(z4.enum(["analytics", "artist_settings"])).max(2).optional(),
|
|
1297
|
+
includeBreakdowns: z4.boolean().optional(),
|
|
1235
1298
|
playLinkId: z4.string().uuid().optional(),
|
|
1236
1299
|
spotifyUrl: z4.string().trim().min(1).max(500).optional()
|
|
1237
1300
|
}).strict().superRefine((data, ctx) => {
|
|
1238
|
-
|
|
1301
|
+
const settingsOnly = data.include?.includes("artist_settings") && !data.playLinkId && !data.spotifyUrl && Boolean(data.artistId);
|
|
1302
|
+
if (!(data.playLinkId || data.artistId && data.spotifyUrl || settingsOnly)) {
|
|
1239
1303
|
ctx.addIssue({
|
|
1240
1304
|
code: "custom",
|
|
1241
|
-
message: "Provide playLinkId or artistId with
|
|
1305
|
+
message: "Provide playLinkId, artistId with spotifyUrl, or artistId with include=['artist_settings']",
|
|
1242
1306
|
path: ["playLinkId"]
|
|
1243
1307
|
});
|
|
1244
1308
|
}
|
|
1309
|
+
if ((data.dateRange || data.granularity || data.includeBreakdowns) && !data.include?.includes("analytics")) {
|
|
1310
|
+
ctx.addIssue({
|
|
1311
|
+
code: "custom",
|
|
1312
|
+
message: "dateRange, granularity, and includeBreakdowns require include to contain analytics",
|
|
1313
|
+
path: ["include"]
|
|
1314
|
+
});
|
|
1315
|
+
}
|
|
1245
1316
|
});
|
|
1246
1317
|
var DynamoiGetSmartLinkAnalyticsInputSchema = z4.object({
|
|
1247
1318
|
dateRange: DateRangeSchema.optional(),
|
|
@@ -1255,12 +1326,86 @@ var DynamoiGetSmartLinkArtistSettingsInputSchema = z4.object({
|
|
|
1255
1326
|
format: ToolFormatSchema.optional()
|
|
1256
1327
|
}).strict();
|
|
1257
1328
|
var DynamoiUpdateSmartLinkInputSchema = z4.object({
|
|
1329
|
+
action: z4.enum([
|
|
1330
|
+
"update_description",
|
|
1331
|
+
"update_artist_settings",
|
|
1332
|
+
"publish",
|
|
1333
|
+
"unpublish"
|
|
1334
|
+
]),
|
|
1335
|
+
artistId: z4.string().uuid().optional(),
|
|
1258
1336
|
clientRequestId: ClientRequestIdSchema,
|
|
1259
|
-
customDescription: z4.string().max(500).nullable(),
|
|
1337
|
+
customDescription: z4.string().max(500).nullable().optional(),
|
|
1338
|
+
expectedPublishState: z4.enum(["published", "unpublished"]).optional(),
|
|
1260
1339
|
expectedUpdatedAt: z4.string().datetime().optional(),
|
|
1261
|
-
|
|
1340
|
+
googleAdsConversionId: z4.string().trim().max(32).nullable().optional(),
|
|
1341
|
+
metaPixelId: z4.string().trim().max(32).nullable().optional(),
|
|
1342
|
+
playLinkId: z4.string().uuid().optional(),
|
|
1343
|
+
theme: SmartLinkThemeSchema.optional(),
|
|
1344
|
+
tiktokPixelId: z4.string().trim().max(32).nullable().optional(),
|
|
1262
1345
|
userIntentSummary: UserIntentSummarySchema
|
|
1263
|
-
}).strict()
|
|
1346
|
+
}).strict().superRefine((data, ctx) => {
|
|
1347
|
+
if (data.action === "update_description" && data.customDescription === void 0) {
|
|
1348
|
+
ctx.addIssue({
|
|
1349
|
+
code: "custom",
|
|
1350
|
+
message: "customDescription is required when action is update_description",
|
|
1351
|
+
path: ["customDescription"]
|
|
1352
|
+
});
|
|
1353
|
+
}
|
|
1354
|
+
if (data.action !== "update_artist_settings" && !data.playLinkId) {
|
|
1355
|
+
ctx.addIssue({
|
|
1356
|
+
code: "custom",
|
|
1357
|
+
message: "playLinkId is required when action is update_description, publish, or unpublish",
|
|
1358
|
+
path: ["playLinkId"]
|
|
1359
|
+
});
|
|
1360
|
+
}
|
|
1361
|
+
if (data.action === "update_artist_settings") {
|
|
1362
|
+
if (!data.artistId) {
|
|
1363
|
+
ctx.addIssue({
|
|
1364
|
+
code: "custom",
|
|
1365
|
+
message: "artistId is required when action is update_artist_settings",
|
|
1366
|
+
path: ["artistId"]
|
|
1367
|
+
});
|
|
1368
|
+
}
|
|
1369
|
+
if (data.theme === void 0 && data.metaPixelId === void 0 && data.tiktokPixelId === void 0 && data.googleAdsConversionId === void 0) {
|
|
1370
|
+
ctx.addIssue({
|
|
1371
|
+
code: "custom",
|
|
1372
|
+
message: "Provide at least one setting to update",
|
|
1373
|
+
path: ["theme"]
|
|
1374
|
+
});
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
if ((data.action === "publish" || data.action === "unpublish") && data.customDescription !== void 0) {
|
|
1378
|
+
ctx.addIssue({
|
|
1379
|
+
code: "custom",
|
|
1380
|
+
message: "customDescription is only valid for update_description",
|
|
1381
|
+
path: ["customDescription"]
|
|
1382
|
+
});
|
|
1383
|
+
}
|
|
1384
|
+
if (data.action !== "update_artist_settings") {
|
|
1385
|
+
for (const field of [
|
|
1386
|
+
"artistId",
|
|
1387
|
+
"googleAdsConversionId",
|
|
1388
|
+
"metaPixelId",
|
|
1389
|
+
"theme",
|
|
1390
|
+
"tiktokPixelId"
|
|
1391
|
+
]) {
|
|
1392
|
+
if (data[field] !== void 0) {
|
|
1393
|
+
ctx.addIssue({
|
|
1394
|
+
code: "custom",
|
|
1395
|
+
message: `${field} is only valid for update_artist_settings`,
|
|
1396
|
+
path: [field]
|
|
1397
|
+
});
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
if (data.action !== "publish" && data.action !== "unpublish" && data.expectedPublishState !== void 0) {
|
|
1402
|
+
ctx.addIssue({
|
|
1403
|
+
code: "custom",
|
|
1404
|
+
message: "expectedPublishState is only valid for publish or unpublish",
|
|
1405
|
+
path: ["expectedPublishState"]
|
|
1406
|
+
});
|
|
1407
|
+
}
|
|
1408
|
+
});
|
|
1264
1409
|
var DynamoiUpdateSmartLinkArtistSettingsInputSchema = z4.object({
|
|
1265
1410
|
artistId: z4.string().uuid(),
|
|
1266
1411
|
clientRequestId: ClientRequestIdSchema,
|
|
@@ -1286,8 +1431,8 @@ var DynamoiPublishSmartLinkInputSchema = z4.object({
|
|
|
1286
1431
|
}).strict();
|
|
1287
1432
|
var PHASE_4_TOOL_DEFINITIONS = [
|
|
1288
1433
|
{
|
|
1289
|
-
description: "Use this when the user wants to create
|
|
1290
|
-
destructiveHint:
|
|
1434
|
+
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: no per-link fee, no subscription requirement, and no upgrade gate. This does not create a paid ad campaign. Spotify playlist URLs are not supported today. If the Smart Link already exists, return the existing link instead of creating a duplicate; 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.",
|
|
1435
|
+
destructiveHint: true,
|
|
1291
1436
|
idempotentHint: true,
|
|
1292
1437
|
name: "dynamoi_create_smart_link_from_spotify",
|
|
1293
1438
|
openWorldHint: true,
|
|
@@ -1297,7 +1442,18 @@ var PHASE_4_TOOL_DEFINITIONS = [
|
|
|
1297
1442
|
title: "Create Free Smart Link from Spotify"
|
|
1298
1443
|
},
|
|
1299
1444
|
{
|
|
1300
|
-
description: "Use this when the user wants to
|
|
1445
|
+
description: "Use this when the user gives a Spotify artist URL and wants Dynamoi to create, import, or refresh free Smart Links for the artist catalog and return the artist hub. If the signed-in user has no Dynamoi artist yet, omit artistId so Dynamoi can create the first artist from the Spotify artist profile. This starts the background catalog import so the user does not need to open the dashboard. Smart Links are free: no per-link fee, no subscription requirement, and no upgrade gate. This does not create a paid ad campaign. In the final answer, lead with the artist hub URL and current public Smart Link URLs; do not expose internal IDs unless asked.",
|
|
1446
|
+
destructiveHint: false,
|
|
1447
|
+
idempotentHint: true,
|
|
1448
|
+
name: "dynamoi_create_smart_links_from_spotify_artist",
|
|
1449
|
+
openWorldHint: true,
|
|
1450
|
+
outputSchema: CreateSmartLinksFromSpotifyArtistOutputEnvelopeSchema,
|
|
1451
|
+
readOnlyHint: false,
|
|
1452
|
+
schema: DynamoiCreateSmartLinksFromSpotifyArtistInputSchema,
|
|
1453
|
+
title: "Create Free Smart Links for Spotify Artist"
|
|
1454
|
+
},
|
|
1455
|
+
{
|
|
1456
|
+
description: "Use this when the user wants to list free Smart Links for one artist, including release title, public URL, publish state, claim state, render state, and theme. Do not use this for paid campaign lists; use dynamoi_list_campaigns for campaigns. In the final answer, show public URLs and avoid internal IDs unless asked. If empty for an artist with connected Spotify, suggest dynamoi_create_smart_links_from_spotify_artist for catalog import or dynamoi_create_smart_link_from_spotify for one release instead of stopping at 'no Smart Links yet'.",
|
|
1301
1457
|
destructiveHint: false,
|
|
1302
1458
|
name: "dynamoi_list_smart_links",
|
|
1303
1459
|
openWorldHint: false,
|
|
@@ -1307,88 +1463,104 @@ var PHASE_4_TOOL_DEFINITIONS = [
|
|
|
1307
1463
|
title: "List Smart Links"
|
|
1308
1464
|
},
|
|
1309
1465
|
{
|
|
1310
|
-
description: "Use this when the user wants full details for one free Smart Link, including release, Spotify URL, public play.dynamoi.com URL, current status, theme source, and next actions. In the final answer, lead with the public URL and do not expose internal IDs unless asked.",
|
|
1466
|
+
description: "Use this when the user wants full details for one free Smart Link, including release, Spotify URL, public play.dynamoi.com URL, current status, theme source, and next actions. Add include=['analytics'] for visit/click analytics and include=['artist_settings'] for artist-level theme/pixel settings. In the final answer, lead with the public URL and do not expose internal IDs unless asked.",
|
|
1311
1467
|
destructiveHint: false,
|
|
1312
1468
|
name: "dynamoi_get_smart_link",
|
|
1313
1469
|
openWorldHint: false,
|
|
1314
|
-
outputSchema:
|
|
1470
|
+
outputSchema: AnyOutputEnvelopeSchema,
|
|
1315
1471
|
readOnlyHint: true,
|
|
1316
1472
|
schema: DynamoiGetSmartLinkInputSchema,
|
|
1317
1473
|
title: "Get Smart Link"
|
|
1318
1474
|
},
|
|
1319
1475
|
{
|
|
1320
|
-
description: "Use this when the user
|
|
1321
|
-
destructiveHint:
|
|
1322
|
-
name: "dynamoi_get_smart_link_analytics",
|
|
1323
|
-
openWorldHint: false,
|
|
1324
|
-
outputSchema: GetSmartLinkAnalyticsOutputEnvelopeSchema,
|
|
1325
|
-
readOnlyHint: true,
|
|
1326
|
-
schema: DynamoiGetSmartLinkAnalyticsInputSchema,
|
|
1327
|
-
title: "Get Smart Link Analytics"
|
|
1328
|
-
},
|
|
1329
|
-
{
|
|
1330
|
-
description: "Use this when the user wants to inspect artist-level Smart Link settings, including whether Smart Links are enabled, default theme, available themes, and configured tracking pixel IDs.",
|
|
1331
|
-
destructiveHint: false,
|
|
1332
|
-
name: "dynamoi_get_smart_link_artist_settings",
|
|
1333
|
-
openWorldHint: false,
|
|
1334
|
-
outputSchema: SmartLinkArtistSettingsOutputEnvelopeSchema,
|
|
1335
|
-
readOnlyHint: true,
|
|
1336
|
-
schema: DynamoiGetSmartLinkArtistSettingsInputSchema,
|
|
1337
|
-
title: "Get Smart Link Artist Settings"
|
|
1338
|
-
},
|
|
1339
|
-
{
|
|
1340
|
-
description: "Use this when the user wants to change one Smart Link's public description. This updates a public landing page and queues background rendering. Theme and pixel settings are artist-level; use dynamoi_update_smart_link_artist_settings for those.",
|
|
1341
|
-
destructiveHint: false,
|
|
1476
|
+
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.",
|
|
1477
|
+
destructiveHint: true,
|
|
1342
1478
|
idempotentHint: true,
|
|
1343
1479
|
name: "dynamoi_update_smart_link",
|
|
1344
1480
|
openWorldHint: true,
|
|
1345
|
-
outputSchema:
|
|
1481
|
+
outputSchema: AnyOutputEnvelopeSchema,
|
|
1346
1482
|
readOnlyHint: false,
|
|
1347
1483
|
schema: DynamoiUpdateSmartLinkInputSchema,
|
|
1348
1484
|
title: "Update Smart Link"
|
|
1349
|
-
}
|
|
1485
|
+
}
|
|
1486
|
+
];
|
|
1487
|
+
|
|
1488
|
+
// src/server/tools.ts
|
|
1489
|
+
import * as z6 from "zod/v4";
|
|
1490
|
+
|
|
1491
|
+
// src/server/onboarding-tool-definitions.ts
|
|
1492
|
+
function createPhaseOnboardingToolDefinitions(schemas) {
|
|
1493
|
+
return [
|
|
1494
|
+
{
|
|
1495
|
+
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.",
|
|
1496
|
+
destructiveHint: false,
|
|
1497
|
+
idempotentHint: true,
|
|
1498
|
+
name: "dynamoi_start_youtube_channel_link",
|
|
1499
|
+
openWorldHint: true,
|
|
1500
|
+
outputSchema: AnyOutputEnvelopeSchema,
|
|
1501
|
+
readOnlyHint: false,
|
|
1502
|
+
schema: schemas.youtubeChannelLink,
|
|
1503
|
+
title: "Start YouTube Channel Link"
|
|
1504
|
+
},
|
|
1505
|
+
{
|
|
1506
|
+
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.",
|
|
1507
|
+
destructiveHint: false,
|
|
1508
|
+
idempotentHint: true,
|
|
1509
|
+
name: "dynamoi_start_meta_connection",
|
|
1510
|
+
openWorldHint: true,
|
|
1511
|
+
outputSchema: AnyOutputEnvelopeSchema,
|
|
1512
|
+
readOnlyHint: false,
|
|
1513
|
+
schema: schemas.metaConnection,
|
|
1514
|
+
title: "Start Meta Connection"
|
|
1515
|
+
}
|
|
1516
|
+
];
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
// src/server/openai-tools.ts
|
|
1520
|
+
import * as z5 from "zod/v4";
|
|
1521
|
+
var DynamoiOpenAiSearchInputSchema = z5.object({
|
|
1522
|
+
query: z5.string().trim().min(1).max(500)
|
|
1523
|
+
}).strict();
|
|
1524
|
+
var DynamoiOpenAiFetchInputSchema = z5.object({
|
|
1525
|
+
id: z5.string().trim().min(1).max(200)
|
|
1526
|
+
}).strict();
|
|
1527
|
+
var OPENAI_TOOL_DEFINITIONS = [
|
|
1350
1528
|
{
|
|
1351
|
-
|
|
1529
|
+
// OpenAI ChatGPT Connectors / Deep Research expects a tool literally
|
|
1530
|
+
// named `search` returning {results: [{id, title, text?, url?}]}. This
|
|
1531
|
+
// is the same data dynamoi_search returns, reshaped for OpenAI Deep
|
|
1532
|
+
// Research citation flows. ChatGPT will not call this tool directly in
|
|
1533
|
+
// regular chat — it picks dynamoi_search by description.
|
|
1534
|
+
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.",
|
|
1352
1535
|
destructiveHint: false,
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
title: "Update Smart Link Artist Settings"
|
|
1536
|
+
name: "search",
|
|
1537
|
+
openWorldHint: false,
|
|
1538
|
+
outputSchema: AnyOutputEnvelopeSchema,
|
|
1539
|
+
readOnlyHint: true,
|
|
1540
|
+
schema: DynamoiOpenAiSearchInputSchema,
|
|
1541
|
+
title: "Search (OpenAI Connectors)"
|
|
1360
1542
|
},
|
|
1361
1543
|
{
|
|
1362
|
-
|
|
1544
|
+
// OpenAI Deep Research follow-up tool: given an id returned by `search`,
|
|
1545
|
+
// returns the full record so it can be cited.
|
|
1546
|
+
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.",
|
|
1363
1547
|
destructiveHint: false,
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
title: "Publish Smart Link"
|
|
1371
|
-
},
|
|
1372
|
-
{
|
|
1373
|
-
description: "Use this when the user explicitly wants to unpublish a Smart Link and remove its public play.dynamoi.com landing page. Restate the affected public URL before calling this tool.",
|
|
1374
|
-
destructiveHint: true,
|
|
1375
|
-
idempotentHint: true,
|
|
1376
|
-
name: "dynamoi_unpublish_smart_link",
|
|
1377
|
-
openWorldHint: true,
|
|
1378
|
-
outputSchema: PublishSmartLinkOutputEnvelopeSchema,
|
|
1379
|
-
readOnlyHint: false,
|
|
1380
|
-
schema: DynamoiPublishSmartLinkInputSchema,
|
|
1381
|
-
title: "Unpublish Smart Link"
|
|
1548
|
+
name: "fetch",
|
|
1549
|
+
openWorldHint: false,
|
|
1550
|
+
outputSchema: AnyOutputEnvelopeSchema,
|
|
1551
|
+
readOnlyHint: true,
|
|
1552
|
+
schema: DynamoiOpenAiFetchInputSchema,
|
|
1553
|
+
title: "Fetch (OpenAI Connectors)"
|
|
1382
1554
|
}
|
|
1383
1555
|
];
|
|
1384
1556
|
|
|
1385
1557
|
// src/server/tools.ts
|
|
1386
|
-
|
|
1387
|
-
var
|
|
1388
|
-
var
|
|
1389
|
-
var
|
|
1390
|
-
var
|
|
1391
|
-
var ExpectedCampaignStatusSchema =
|
|
1558
|
+
var ToolFormatSchema2 = z6.enum(["json", "summary"]);
|
|
1559
|
+
var IsoDateSchema2 = z6.string().regex(/^\d{4}-\d{2}-\d{2}$/);
|
|
1560
|
+
var UserIntentSummarySchema2 = z6.string().trim().max(500).optional();
|
|
1561
|
+
var ClientRequestIdSchema2 = z6.string().uuid().optional();
|
|
1562
|
+
var OnboardingAttemptIdSchema = z6.string().trim().min(1).max(120).optional();
|
|
1563
|
+
var ExpectedCampaignStatusSchema = z6.enum([
|
|
1392
1564
|
"AWAITING_SMART_LINK",
|
|
1393
1565
|
"ACTIVE",
|
|
1394
1566
|
"ARCHIVED",
|
|
@@ -1404,19 +1576,20 @@ function isValidCalendarDate2(value) {
|
|
|
1404
1576
|
const date = /* @__PURE__ */ new Date(`${value}T00:00:00.000Z`);
|
|
1405
1577
|
return Number.isFinite(date.getTime()) && date.toISOString().slice(0, 10) === value;
|
|
1406
1578
|
}
|
|
1407
|
-
var DynamoiListArtistsInputSchema =
|
|
1408
|
-
|
|
1579
|
+
var DynamoiListArtistsInputSchema = z6.object({
|
|
1580
|
+
artistId: z6.string().uuid().optional(),
|
|
1581
|
+
cursor: z6.string().optional(),
|
|
1409
1582
|
format: ToolFormatSchema2.optional(),
|
|
1410
|
-
limit:
|
|
1583
|
+
limit: z6.number().int().min(1).max(50).optional()
|
|
1411
1584
|
}).strict();
|
|
1412
|
-
var DynamoiSearchInputSchema =
|
|
1413
|
-
artistId:
|
|
1414
|
-
cursor:
|
|
1585
|
+
var DynamoiSearchInputSchema = z6.object({
|
|
1586
|
+
artistId: z6.string().uuid().optional(),
|
|
1587
|
+
cursor: z6.string().optional(),
|
|
1415
1588
|
format: ToolFormatSchema2.optional(),
|
|
1416
|
-
includeArchived:
|
|
1417
|
-
limit:
|
|
1418
|
-
query:
|
|
1419
|
-
type:
|
|
1589
|
+
includeArchived: z6.boolean().optional(),
|
|
1590
|
+
limit: z6.number().int().min(1).max(50).optional(),
|
|
1591
|
+
query: z6.string().trim().max(120).optional(),
|
|
1592
|
+
type: z6.enum(["artist", "campaign", "smartlink"]).optional()
|
|
1420
1593
|
}).strict().superRefine((data, ctx) => {
|
|
1421
1594
|
if (!(data.type || data.query)) {
|
|
1422
1595
|
ctx.addIssue({
|
|
@@ -1426,34 +1599,29 @@ var DynamoiSearchInputSchema = z5.object({
|
|
|
1426
1599
|
});
|
|
1427
1600
|
}
|
|
1428
1601
|
});
|
|
1429
|
-
var DynamoiGetCurrentUserIntentSchema =
|
|
1602
|
+
var DynamoiGetCurrentUserIntentSchema = z6.enum([
|
|
1430
1603
|
"account_overview",
|
|
1431
1604
|
"artist_access_check",
|
|
1432
1605
|
"organization_access_check",
|
|
1433
1606
|
"platform_connection_check"
|
|
1434
1607
|
]);
|
|
1435
|
-
var DynamoiGetCurrentUserInputSchema =
|
|
1608
|
+
var DynamoiGetCurrentUserInputSchema = z6.object({
|
|
1436
1609
|
format: ToolFormatSchema2.optional(),
|
|
1437
1610
|
intent: DynamoiGetCurrentUserIntentSchema
|
|
1438
1611
|
}).strict();
|
|
1439
|
-
var DynamoiGetArtistInputSchema =
|
|
1440
|
-
artistId:
|
|
1612
|
+
var DynamoiGetArtistInputSchema = z6.object({
|
|
1613
|
+
artistId: z6.string().uuid(),
|
|
1441
1614
|
format: ToolFormatSchema2.optional()
|
|
1442
1615
|
}).strict();
|
|
1443
|
-
var DynamoiListCampaignsInputSchema =
|
|
1444
|
-
artistId:
|
|
1445
|
-
campaignType:
|
|
1446
|
-
cursor:
|
|
1447
|
-
format: ToolFormatSchema2.optional(),
|
|
1448
|
-
limit: z5.number().int().min(1).max(50).optional(),
|
|
1449
|
-
status: z5.string().trim().optional()
|
|
1450
|
-
}).strict();
|
|
1451
|
-
var DynamoiGetCampaignInputSchema = z5.object({
|
|
1452
|
-
campaignId: z5.string().uuid(),
|
|
1616
|
+
var DynamoiListCampaignsInputSchema = z6.object({
|
|
1617
|
+
artistId: z6.string().uuid(),
|
|
1618
|
+
campaignType: z6.enum(["SMART_CAMPAIGN", "YOUTUBE"]).optional(),
|
|
1619
|
+
cursor: z6.string().optional(),
|
|
1453
1620
|
format: ToolFormatSchema2.optional(),
|
|
1454
|
-
|
|
1621
|
+
limit: z6.number().int().min(1).max(50).optional(),
|
|
1622
|
+
status: z6.string().trim().optional()
|
|
1455
1623
|
}).strict();
|
|
1456
|
-
var DateRangeSchema2 =
|
|
1624
|
+
var DateRangeSchema2 = z6.object({
|
|
1457
1625
|
end: IsoDateSchema2,
|
|
1458
1626
|
start: IsoDateSchema2
|
|
1459
1627
|
}).strict().superRefine((data, ctx) => {
|
|
@@ -1479,113 +1647,170 @@ var DateRangeSchema2 = z5.object({
|
|
|
1479
1647
|
});
|
|
1480
1648
|
}
|
|
1481
1649
|
});
|
|
1482
|
-
var
|
|
1483
|
-
|
|
1650
|
+
var DynamoiGetCampaignInputSchema = z6.object({
|
|
1651
|
+
analyticsDateRange: DateRangeSchema2.optional(),
|
|
1652
|
+
analyticsGranularity: z6.enum(["TOTAL", "DAILY"]).optional(),
|
|
1653
|
+
campaignId: z6.string().uuid(),
|
|
1654
|
+
format: ToolFormatSchema2.optional(),
|
|
1655
|
+
includeAnalytics: z6.boolean().optional(),
|
|
1656
|
+
includeCountries: z6.boolean().optional(),
|
|
1657
|
+
includeDeploymentStatus: z6.boolean().optional()
|
|
1658
|
+
}).strict();
|
|
1659
|
+
var DynamoiGetCampaignAnalyticsInputSchema = z6.object({
|
|
1660
|
+
campaignId: z6.string().uuid(),
|
|
1484
1661
|
dateRange: DateRangeSchema2.optional(),
|
|
1485
1662
|
format: ToolFormatSchema2.optional(),
|
|
1486
|
-
granularity:
|
|
1663
|
+
granularity: z6.enum(["TOTAL", "DAILY"]).optional()
|
|
1487
1664
|
}).strict();
|
|
1488
|
-
var DynamoiGetArtistAnalyticsInputSchema =
|
|
1489
|
-
artistId:
|
|
1665
|
+
var DynamoiGetArtistAnalyticsInputSchema = z6.object({
|
|
1666
|
+
artistId: z6.string().uuid(),
|
|
1490
1667
|
dateRange: DateRangeSchema2.optional(),
|
|
1491
1668
|
format: ToolFormatSchema2.optional(),
|
|
1492
|
-
granularity:
|
|
1669
|
+
granularity: z6.enum(["TOTAL", "DAILY"]).optional()
|
|
1493
1670
|
}).strict();
|
|
1494
|
-
var DynamoiGetBillingInputSchema =
|
|
1495
|
-
artistId:
|
|
1496
|
-
format: ToolFormatSchema2.optional()
|
|
1671
|
+
var DynamoiGetBillingInputSchema = z6.object({
|
|
1672
|
+
artistId: z6.string().uuid(),
|
|
1673
|
+
format: ToolFormatSchema2.optional(),
|
|
1674
|
+
onboardingAttemptId: OnboardingAttemptIdSchema
|
|
1497
1675
|
}).strict();
|
|
1498
|
-
var LocationTargetSchema =
|
|
1499
|
-
code:
|
|
1500
|
-
name:
|
|
1676
|
+
var LocationTargetSchema = z6.object({
|
|
1677
|
+
code: z6.string().trim().min(1).max(8),
|
|
1678
|
+
name: z6.string().trim().min(1).max(120)
|
|
1501
1679
|
}).strict();
|
|
1502
|
-
var DynamoiGetPlatformStatusInputSchema =
|
|
1503
|
-
artistId:
|
|
1504
|
-
format: ToolFormatSchema2.optional()
|
|
1680
|
+
var DynamoiGetPlatformStatusInputSchema = z6.object({
|
|
1681
|
+
artistId: z6.string().uuid(),
|
|
1682
|
+
format: ToolFormatSchema2.optional(),
|
|
1683
|
+
onboardingAttemptId: OnboardingAttemptIdSchema,
|
|
1684
|
+
onboardingFlow: z6.enum(["meta", "youtube"]).optional()
|
|
1505
1685
|
}).strict();
|
|
1506
|
-
var
|
|
1507
|
-
|
|
1508
|
-
cursor: z5.string().optional(),
|
|
1686
|
+
var DynamoiStartYoutubeChannelLinkInputSchema = z6.object({
|
|
1687
|
+
artistId: z6.string().uuid(),
|
|
1509
1688
|
format: ToolFormatSchema2.optional(),
|
|
1510
|
-
|
|
1511
|
-
query: z5.string().trim().max(120).optional()
|
|
1689
|
+
userIntentSummary: UserIntentSummarySchema2
|
|
1512
1690
|
}).strict();
|
|
1513
|
-
var
|
|
1514
|
-
artistId:
|
|
1691
|
+
var DynamoiStartMetaConnectionInputSchema = z6.object({
|
|
1692
|
+
artistId: z6.string().uuid(),
|
|
1693
|
+
format: ToolFormatSchema2.optional(),
|
|
1694
|
+
userIntentSummary: UserIntentSummarySchema2
|
|
1695
|
+
}).strict();
|
|
1696
|
+
var DynamoiListAvailableCountriesInputSchema = z6.object({
|
|
1697
|
+
campaignType: z6.enum(["SMART_CAMPAIGN", "YOUTUBE"]),
|
|
1698
|
+
cursor: z6.string().optional(),
|
|
1699
|
+
format: ToolFormatSchema2.optional(),
|
|
1700
|
+
limit: z6.number().int().min(1).max(100).optional(),
|
|
1701
|
+
query: z6.string().trim().max(120).optional()
|
|
1702
|
+
}).strict();
|
|
1703
|
+
var DynamoiGetOnboardingStatusInputSchema = z6.object({
|
|
1704
|
+
artistId: z6.string().uuid(),
|
|
1515
1705
|
format: ToolFormatSchema2.optional()
|
|
1516
1706
|
}).strict();
|
|
1517
|
-
var DynamoiGetCampaignReadinessInputSchema =
|
|
1518
|
-
artistId:
|
|
1519
|
-
budgetAmount:
|
|
1520
|
-
budgetType:
|
|
1521
|
-
campaignType:
|
|
1522
|
-
contentType:
|
|
1707
|
+
var DynamoiGetCampaignReadinessInputSchema = z6.object({
|
|
1708
|
+
artistId: z6.string().uuid(),
|
|
1709
|
+
budgetAmount: z6.number().finite().positive().optional(),
|
|
1710
|
+
budgetType: z6.enum(["DAILY", "TOTAL"]).optional(),
|
|
1711
|
+
campaignType: z6.enum(["SMART_CAMPAIGN", "YOUTUBE"]),
|
|
1712
|
+
contentType: z6.enum(["TRACK", "ALBUM", "PLAYLIST", "VIDEO"]).optional(),
|
|
1523
1713
|
endDate: IsoDateSchema2.optional(),
|
|
1524
1714
|
format: ToolFormatSchema2.optional(),
|
|
1525
|
-
locationTargets:
|
|
1526
|
-
mediaAssetIds:
|
|
1527
|
-
spotifyUrl:
|
|
1528
|
-
youtubeVideoId:
|
|
1715
|
+
locationTargets: z6.array(LocationTargetSchema).optional(),
|
|
1716
|
+
mediaAssetIds: z6.array(z6.string().uuid()).optional(),
|
|
1717
|
+
spotifyUrl: z6.string().trim().min(1).max(500).optional(),
|
|
1718
|
+
youtubeVideoId: z6.string().trim().min(1).max(128).optional()
|
|
1529
1719
|
}).strict();
|
|
1530
|
-
var DynamoiGetCampaignDeploymentStatusInputSchema =
|
|
1531
|
-
campaignId:
|
|
1720
|
+
var DynamoiGetCampaignDeploymentStatusInputSchema = z6.object({
|
|
1721
|
+
campaignId: z6.string().uuid(),
|
|
1532
1722
|
format: ToolFormatSchema2.optional()
|
|
1533
1723
|
}).strict();
|
|
1534
|
-
var DynamoiPauseCampaignInputSchema =
|
|
1535
|
-
campaignId:
|
|
1724
|
+
var DynamoiPauseCampaignInputSchema = z6.object({
|
|
1725
|
+
campaignId: z6.string().uuid(),
|
|
1536
1726
|
clientRequestId: ClientRequestIdSchema2,
|
|
1537
1727
|
expectedCurrentStatus: ExpectedCampaignStatusSchema,
|
|
1538
1728
|
userIntentSummary: UserIntentSummarySchema2
|
|
1539
1729
|
}).strict();
|
|
1540
|
-
var DynamoiResumeCampaignInputSchema =
|
|
1541
|
-
campaignId:
|
|
1730
|
+
var DynamoiResumeCampaignInputSchema = z6.object({
|
|
1731
|
+
campaignId: z6.string().uuid(),
|
|
1542
1732
|
clientRequestId: ClientRequestIdSchema2,
|
|
1543
1733
|
expectedCurrentStatus: ExpectedCampaignStatusSchema,
|
|
1544
1734
|
userIntentSummary: UserIntentSummarySchema2
|
|
1545
1735
|
}).strict();
|
|
1546
|
-
var DynamoiUpdateBudgetInputSchema =
|
|
1547
|
-
budgetAmount:
|
|
1548
|
-
campaignId:
|
|
1736
|
+
var DynamoiUpdateBudgetInputSchema = z6.object({
|
|
1737
|
+
budgetAmount: z6.number().finite().positive(),
|
|
1738
|
+
campaignId: z6.string().uuid(),
|
|
1549
1739
|
clientRequestId: ClientRequestIdSchema2,
|
|
1550
1740
|
endDate: IsoDateSchema2.optional(),
|
|
1551
|
-
expectedCurrentBudgetAmount:
|
|
1741
|
+
expectedCurrentBudgetAmount: z6.number().finite().positive().optional(),
|
|
1552
1742
|
expectedCurrentEndDate: IsoDateSchema2.optional(),
|
|
1553
1743
|
userIntentSummary: UserIntentSummarySchema2
|
|
1554
1744
|
}).strict();
|
|
1555
|
-
var
|
|
1556
|
-
|
|
1557
|
-
|
|
1745
|
+
var DynamoiUpdateCampaignInputSchema = z6.object({
|
|
1746
|
+
action: z6.enum(["pause", "resume", "update_budget"]),
|
|
1747
|
+
budgetAmount: z6.number().finite().positive().optional(),
|
|
1748
|
+
campaignId: z6.string().uuid(),
|
|
1749
|
+
clientRequestId: ClientRequestIdSchema2,
|
|
1750
|
+
endDate: IsoDateSchema2.optional(),
|
|
1751
|
+
expectedCurrentBudgetAmount: z6.number().finite().positive().optional(),
|
|
1752
|
+
expectedCurrentEndDate: IsoDateSchema2.optional(),
|
|
1753
|
+
expectedCurrentStatus: ExpectedCampaignStatusSchema,
|
|
1754
|
+
userIntentSummary: UserIntentSummarySchema2
|
|
1755
|
+
}).strict().superRefine((data, ctx) => {
|
|
1756
|
+
if (data.action === "update_budget" && data.budgetAmount === void 0) {
|
|
1757
|
+
ctx.addIssue({
|
|
1758
|
+
code: "custom",
|
|
1759
|
+
message: "budgetAmount is required when action is update_budget",
|
|
1760
|
+
path: ["budgetAmount"]
|
|
1761
|
+
});
|
|
1762
|
+
}
|
|
1763
|
+
if (data.action !== "update_budget") {
|
|
1764
|
+
for (const field of [
|
|
1765
|
+
"budgetAmount",
|
|
1766
|
+
"endDate",
|
|
1767
|
+
"expectedCurrentBudgetAmount",
|
|
1768
|
+
"expectedCurrentEndDate"
|
|
1769
|
+
]) {
|
|
1770
|
+
if (data[field] !== void 0) {
|
|
1771
|
+
ctx.addIssue({
|
|
1772
|
+
code: "custom",
|
|
1773
|
+
message: `${field} is only valid when action is update_budget`,
|
|
1774
|
+
path: [field]
|
|
1775
|
+
});
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1779
|
+
});
|
|
1780
|
+
var DynamoiListMediaAssetsInputSchema = z6.object({
|
|
1781
|
+
artistId: z6.string().uuid(),
|
|
1782
|
+
cursor: z6.string().optional(),
|
|
1558
1783
|
format: ToolFormatSchema2.optional(),
|
|
1559
|
-
includeUrls:
|
|
1560
|
-
limit:
|
|
1784
|
+
includeUrls: z6.boolean().optional(),
|
|
1785
|
+
limit: z6.number().int().min(1).max(50).optional()
|
|
1561
1786
|
}).strict();
|
|
1562
|
-
var DynamoiLaunchCampaignInputSchema =
|
|
1787
|
+
var DynamoiLaunchCampaignInputSchema = z6.object({
|
|
1563
1788
|
// Creative
|
|
1564
|
-
adCopy:
|
|
1565
|
-
appleMusicUrl:
|
|
1566
|
-
artistId:
|
|
1789
|
+
adCopy: z6.string().trim().max(500).optional(),
|
|
1790
|
+
appleMusicUrl: z6.string().trim().min(1).max(500).optional(),
|
|
1791
|
+
artistId: z6.string().uuid(),
|
|
1567
1792
|
// Budget
|
|
1568
|
-
budgetAmount:
|
|
1569
|
-
budgetSplits:
|
|
1570
|
-
|
|
1571
|
-
|
|
1793
|
+
budgetAmount: z6.number().finite().positive(),
|
|
1794
|
+
budgetSplits: z6.record(
|
|
1795
|
+
z6.enum(["META", "GOOGLE"]),
|
|
1796
|
+
z6.number().int().min(0).max(100)
|
|
1572
1797
|
),
|
|
1573
|
-
budgetType:
|
|
1574
|
-
campaignType:
|
|
1798
|
+
budgetType: z6.enum(["DAILY", "TOTAL"]),
|
|
1799
|
+
campaignType: z6.enum(["SMART_CAMPAIGN", "YOUTUBE"]),
|
|
1575
1800
|
// Idempotency (client-generated UUID)
|
|
1576
|
-
clientRequestId:
|
|
1801
|
+
clientRequestId: z6.string().uuid(),
|
|
1577
1802
|
// Content
|
|
1578
|
-
contentTitle:
|
|
1579
|
-
contentType:
|
|
1580
|
-
endDate:
|
|
1803
|
+
contentTitle: z6.string().trim().min(1).max(160),
|
|
1804
|
+
contentType: z6.enum(["TRACK", "ALBUM", "PLAYLIST", "VIDEO"]),
|
|
1805
|
+
endDate: z6.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),
|
|
1581
1806
|
// Targeting
|
|
1582
|
-
locationTargets:
|
|
1807
|
+
locationTargets: z6.array(LocationTargetSchema).optional(),
|
|
1583
1808
|
// Smart Campaign creative selection (existing assets only in Phase 3)
|
|
1584
|
-
mediaAssetIds:
|
|
1585
|
-
spotifyUrl:
|
|
1586
|
-
useAiGeneratedCopy:
|
|
1809
|
+
mediaAssetIds: z6.array(z6.string().uuid()).optional(),
|
|
1810
|
+
spotifyUrl: z6.string().trim().min(1).max(500).optional(),
|
|
1811
|
+
useAiGeneratedCopy: z6.boolean().optional(),
|
|
1587
1812
|
userIntentSummary: UserIntentSummarySchema2,
|
|
1588
|
-
youtubeVideoId:
|
|
1813
|
+
youtubeVideoId: z6.string().trim().min(1).max(128).optional()
|
|
1589
1814
|
}).strict().superRefine((data, ctx) => {
|
|
1590
1815
|
const sum = Object.values(data.budgetSplits ?? {}).reduce(
|
|
1591
1816
|
(acc, v) => acc + (Number.isFinite(v) ? v : 0),
|
|
@@ -1661,7 +1886,7 @@ var DynamoiLaunchCampaignInputSchema = z5.object({
|
|
|
1661
1886
|
});
|
|
1662
1887
|
var PHASE_1_TOOL_DEFINITIONS = [
|
|
1663
1888
|
{
|
|
1664
|
-
description: "Use this when the user explicitly asks about the signed-in Dynamoi account itself, such as who is logged in, how many organizations or artists it can access, or whether account-level platform connections exist. Always pass intent to match that explicit account question. Do not use this to enumerate artists one by one; use dynamoi_list_artists for that. Never use this to 'check context' before answering generic Instagram, lyrics, songwriting, or marketing-advice questions, even if Dynamoi is attached.",
|
|
1889
|
+
description: "Use this when the user explicitly asks about the signed-in Dynamoi account itself, such as who is logged in, how many organizations or artists it can access, or whether account-level platform connections exist. Always pass intent to match that explicit account question. Do not use this to confirm a specific Meta or YouTube onboarding attempt because this account-level state can span multiple artists; use dynamoi_get_platform_status for the target artist instead. Do not use this to enumerate artists one by one; use dynamoi_list_artists for that. Never use this to 'check context' before answering generic Instagram, lyrics, songwriting, or marketing-advice questions, even if Dynamoi is attached.",
|
|
1665
1890
|
destructiveHint: false,
|
|
1666
1891
|
name: "dynamoi_get_account_overview",
|
|
1667
1892
|
openWorldHint: false,
|
|
@@ -1671,7 +1896,7 @@ var PHASE_1_TOOL_DEFINITIONS = [
|
|
|
1671
1896
|
title: "Get Account Overview"
|
|
1672
1897
|
},
|
|
1673
1898
|
{
|
|
1674
|
-
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. 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.",
|
|
1899
|
+
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'; instead route via dynamoi_get_account_overview.recommendedNextActions or read dynamoi://playbooks/onboarding-tree.",
|
|
1675
1900
|
destructiveHint: false,
|
|
1676
1901
|
name: "dynamoi_list_artists",
|
|
1677
1902
|
openWorldHint: false,
|
|
@@ -1681,7 +1906,7 @@ var PHASE_1_TOOL_DEFINITIONS = [
|
|
|
1681
1906
|
title: "List Artists"
|
|
1682
1907
|
},
|
|
1683
1908
|
{
|
|
1684
|
-
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.",
|
|
1909
|
+
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 or read dynamoi://playbooks/onboarding-tree.",
|
|
1685
1910
|
destructiveHint: false,
|
|
1686
1911
|
name: "dynamoi_search",
|
|
1687
1912
|
openWorldHint: false,
|
|
@@ -1690,18 +1915,9 @@ var PHASE_1_TOOL_DEFINITIONS = [
|
|
|
1690
1915
|
schema: DynamoiSearchInputSchema,
|
|
1691
1916
|
title: "Search Dynamoi"
|
|
1692
1917
|
},
|
|
1918
|
+
...OPENAI_TOOL_DEFINITIONS,
|
|
1693
1919
|
{
|
|
1694
|
-
description: "Use this when the user wants
|
|
1695
|
-
destructiveHint: false,
|
|
1696
|
-
name: "dynamoi_get_artist",
|
|
1697
|
-
openWorldHint: false,
|
|
1698
|
-
outputSchema: AnyOutputEnvelopeSchema,
|
|
1699
|
-
readOnlyHint: true,
|
|
1700
|
-
schema: DynamoiGetArtistInputSchema,
|
|
1701
|
-
title: "Get Artist"
|
|
1702
|
-
},
|
|
1703
|
-
{
|
|
1704
|
-
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.",
|
|
1920
|
+
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.",
|
|
1705
1921
|
destructiveHint: false,
|
|
1706
1922
|
name: "dynamoi_list_campaigns",
|
|
1707
1923
|
openWorldHint: false,
|
|
@@ -1711,7 +1927,7 @@ var PHASE_1_TOOL_DEFINITIONS = [
|
|
|
1711
1927
|
title: "List Campaigns"
|
|
1712
1928
|
},
|
|
1713
1929
|
{
|
|
1714
|
-
description: "Use this when the user wants full details for one campaign, including budget, targeting, platform status, and next actions.
|
|
1930
|
+
description: "Use this when the user wants full details for one campaign, including budget, targeting, platform status, and next actions. Set includeAnalytics=true for one-campaign performance, includeDeploymentStatus=true for delivery/deployment blockers, and includeCountries=true only when the full country list is needed. Do not use this for a campaign list; use dynamoi_list_campaigns instead. After a successful launch or campaign mutation, prefer format=summary when you need a follow-up read to relay the final answer.",
|
|
1715
1931
|
destructiveHint: false,
|
|
1716
1932
|
name: "dynamoi_get_campaign",
|
|
1717
1933
|
openWorldHint: false,
|
|
@@ -1721,17 +1937,7 @@ var PHASE_1_TOOL_DEFINITIONS = [
|
|
|
1721
1937
|
title: "Get Campaign"
|
|
1722
1938
|
},
|
|
1723
1939
|
{
|
|
1724
|
-
description: "Use this when the user
|
|
1725
|
-
destructiveHint: false,
|
|
1726
|
-
name: "dynamoi_get_campaign_analytics",
|
|
1727
|
-
openWorldHint: false,
|
|
1728
|
-
outputSchema: AnyOutputEnvelopeSchema,
|
|
1729
|
-
readOnlyHint: true,
|
|
1730
|
-
schema: DynamoiGetCampaignAnalyticsInputSchema,
|
|
1731
|
-
title: "Get Campaign Analytics"
|
|
1732
|
-
},
|
|
1733
|
-
{
|
|
1734
|
-
description: "Use this when the user wants artist-level performance across all campaigns, including 30-day rollups or daily breakdowns. Pass granularity=DAILY when the user asks for a daily breakdown. Pass format=summary when the user wants a written rollup, a strongest-campaign verdict, or a direct answer you can relay immediately. If this tool already returned the requested strongest-campaign comparison, stop and answer instead of calling more analytics tools. Do not use this for one campaign's metrics; use dynamoi_get_campaign_analytics instead.",
|
|
1940
|
+
description: "Use this when the user wants artist-level performance across all campaigns, including 30-day rollups or daily breakdowns. Pass granularity=DAILY when the user asks for a daily breakdown. Pass format=summary when the user wants a written rollup, a strongest-campaign verdict, or a direct answer you can relay immediately. If this tool already returned the requested strongest-campaign comparison, stop and answer instead of calling more analytics tools. For one campaign's metrics, use dynamoi_get_campaign with includeAnalytics=true.",
|
|
1735
1941
|
destructiveHint: false,
|
|
1736
1942
|
name: "dynamoi_get_artist_analytics",
|
|
1737
1943
|
openWorldHint: false,
|
|
@@ -1741,7 +1947,7 @@ var PHASE_1_TOOL_DEFINITIONS = [
|
|
|
1741
1947
|
title: "Get Artist Analytics"
|
|
1742
1948
|
},
|
|
1743
1949
|
{
|
|
1744
|
-
description: "Use this when the user asks about billing state, credit balance, promo limits, or whether billing
|
|
1950
|
+
description: "Use this when the user asks about billing state, credit balance, promo limits, subscription status, or whether billing blocks launches for one artist. This is a read-only status check; it does not create checkout links or collect payment. If billing blocks a launch, direct the user to start or restore managed advertising in the Dynamoi dashboard, then call this tool again to confirm the status. Do not use this for campaign analytics or platform connection troubleshooting.",
|
|
1745
1951
|
destructiveHint: false,
|
|
1746
1952
|
name: "dynamoi_get_billing",
|
|
1747
1953
|
openWorldHint: false,
|
|
@@ -1751,7 +1957,7 @@ var PHASE_1_TOOL_DEFINITIONS = [
|
|
|
1751
1957
|
title: "Get Billing"
|
|
1752
1958
|
},
|
|
1753
1959
|
{
|
|
1754
|
-
description: "Use this when the user wants to know whether Spotify, Meta, or YouTube are connected and what setup steps still block launches. Do not use this for billing details; use dynamoi_get_billing when the question is about credits or subscription state. Never use this to personalize generic Instagram or marketing-advice questions.",
|
|
1960
|
+
description: "Use this when the user wants to know whether Spotify, Meta, or YouTube are connected and what setup steps still block launches. When polling after dynamoi_start_meta_connection or dynamoi_start_youtube_channel_link, pass the returned onboardingAttemptId and onboardingFlow so Dynamoi ops can correlate the chat-first browser step. Do not use this for billing details; use dynamoi_get_billing when the question is about credits or subscription billing state. Never use this to personalize generic Instagram or marketing-advice questions.",
|
|
1755
1961
|
destructiveHint: false,
|
|
1756
1962
|
name: "dynamoi_get_platform_status",
|
|
1757
1963
|
openWorldHint: false,
|
|
@@ -1770,16 +1976,6 @@ var PHASE_1_TOOL_DEFINITIONS = [
|
|
|
1770
1976
|
schema: DynamoiListAvailableCountriesInputSchema,
|
|
1771
1977
|
title: "List Available Countries"
|
|
1772
1978
|
},
|
|
1773
|
-
{
|
|
1774
|
-
description: "Use this when the user asks whether one artist is ready to create Smart Campaigns or YouTube campaigns, or what setup steps are still missing. This is artist-level readiness, not a campaign launch. Do not use this for generic marketing advice.",
|
|
1775
|
-
destructiveHint: false,
|
|
1776
|
-
name: "dynamoi_get_onboarding_status",
|
|
1777
|
-
openWorldHint: false,
|
|
1778
|
-
outputSchema: GetOnboardingStatusOutputEnvelopeSchema,
|
|
1779
|
-
readOnlyHint: true,
|
|
1780
|
-
schema: DynamoiGetOnboardingStatusInputSchema,
|
|
1781
|
-
title: "Get Onboarding Status"
|
|
1782
|
-
},
|
|
1783
1979
|
{
|
|
1784
1980
|
description: "Use this when the user is planning a campaign and wants to know if the proposed inputs are ready before dynamoi_launch_campaign. This validates readiness and targeting without creating a campaign. Do not use this to create or mutate campaigns.",
|
|
1785
1981
|
destructiveHint: false,
|
|
@@ -1789,53 +1985,27 @@ var PHASE_1_TOOL_DEFINITIONS = [
|
|
|
1789
1985
|
readOnlyHint: true,
|
|
1790
1986
|
schema: DynamoiGetCampaignReadinessInputSchema,
|
|
1791
1987
|
title: "Get Campaign Readiness"
|
|
1792
|
-
},
|
|
1793
|
-
{
|
|
1794
|
-
description: "Use this when the user asks why an existing campaign is not live, where deployment stands, or what is blocking delivery. This reads local Dynamoi deployment state only. Do not use this for new campaign planning.",
|
|
1795
|
-
destructiveHint: false,
|
|
1796
|
-
name: "dynamoi_get_campaign_deployment_status",
|
|
1797
|
-
openWorldHint: false,
|
|
1798
|
-
outputSchema: GetCampaignDeploymentStatusOutputEnvelopeSchema,
|
|
1799
|
-
readOnlyHint: true,
|
|
1800
|
-
schema: DynamoiGetCampaignDeploymentStatusInputSchema,
|
|
1801
|
-
title: "Get Campaign Deployment Status"
|
|
1802
1988
|
}
|
|
1803
1989
|
];
|
|
1990
|
+
var PHASE_ONBOARDING_TOOL_DEFINITIONS = createPhaseOnboardingToolDefinitions({
|
|
1991
|
+
metaConnection: DynamoiStartMetaConnectionInputSchema,
|
|
1992
|
+
youtubeChannelLink: DynamoiStartYoutubeChannelLinkInputSchema
|
|
1993
|
+
});
|
|
1804
1994
|
var PHASE_2_TOOL_DEFINITIONS = [
|
|
1805
1995
|
{
|
|
1806
|
-
description: "Use this when the user explicitly wants to pause
|
|
1807
|
-
destructiveHint: true,
|
|
1808
|
-
idempotentHint: true,
|
|
1809
|
-
name: "dynamoi_pause_campaign",
|
|
1810
|
-
openWorldHint: true,
|
|
1811
|
-
outputSchema: PauseResumeOutputEnvelopeSchema,
|
|
1812
|
-
readOnlyHint: false,
|
|
1813
|
-
schema: DynamoiPauseCampaignInputSchema,
|
|
1814
|
-
title: "Pause Campaign"
|
|
1815
|
-
},
|
|
1816
|
-
{
|
|
1817
|
-
description: "Use this when the user explicitly wants to resume a paused campaign and restart ad delivery. Do not use this for inspection-only questions; this changes external campaign state.",
|
|
1818
|
-
destructiveHint: true,
|
|
1819
|
-
idempotentHint: true,
|
|
1820
|
-
name: "dynamoi_resume_campaign",
|
|
1821
|
-
openWorldHint: true,
|
|
1822
|
-
outputSchema: PauseResumeOutputEnvelopeSchema,
|
|
1823
|
-
readOnlyHint: false,
|
|
1824
|
-
schema: DynamoiResumeCampaignInputSchema,
|
|
1825
|
-
title: "Resume Campaign"
|
|
1826
|
-
},
|
|
1827
|
-
{
|
|
1828
|
-
description: "Use this when the user explicitly wants to change a campaign budget, and optionally the end date for total-budget campaigns. Do not use this for read-only budget checks; this updates live campaign settings.",
|
|
1996
|
+
description: "Use this when the user explicitly wants to pause, resume, or update the budget/end date for an existing campaign. Set action to pause, resume, or update_budget. Do not use this for inspection-only questions; this changes live campaign workflow state or external campaign settings.",
|
|
1829
1997
|
destructiveHint: true,
|
|
1830
1998
|
idempotentHint: true,
|
|
1831
|
-
name: "
|
|
1999
|
+
name: "dynamoi_update_campaign",
|
|
1832
2000
|
openWorldHint: true,
|
|
1833
|
-
outputSchema:
|
|
2001
|
+
outputSchema: AnyOutputEnvelopeSchema,
|
|
1834
2002
|
readOnlyHint: false,
|
|
1835
|
-
schema:
|
|
1836
|
-
title: "Update Campaign
|
|
2003
|
+
schema: DynamoiUpdateCampaignInputSchema,
|
|
2004
|
+
title: "Update Campaign"
|
|
1837
2005
|
}
|
|
1838
2006
|
];
|
|
2007
|
+
|
|
2008
|
+
// src/server/workflow-tools.ts
|
|
1839
2009
|
var PHASE_3_TOOL_DEFINITIONS = [
|
|
1840
2010
|
{
|
|
1841
2011
|
description: "Use this when the user wants to choose from uploaded images or videos that can be reused in a campaign launch. Do not use this when the user only wants campaign status or analytics. Use format=json when you need asset IDs for a follow-up launch. Request includeUrls only when the assistant must display or inspect public-safe asset URLs.",
|
|
@@ -1849,7 +2019,7 @@ var PHASE_3_TOOL_DEFINITIONS = [
|
|
|
1849
2019
|
},
|
|
1850
2020
|
{
|
|
1851
2021
|
description: "Use this when the user explicitly wants to create a new Smart Campaign or YouTube Campaign and start the launch workflow with provided details. Ads are not necessarily live until the returned delivery state is ACTIVE. For review or demo Smart Campaign launches that already specify the artist, content title, budget, countries, and reusable media assets, you may omit spotifyUrl and endDate because Dynamoi can infer reviewer-safe defaults. Do not invent placeholder spotifyUrl or endDate values for those review/demo launches; omit them and let Dynamoi infer them. After a successful launch, answer from the returned campaign details directly instead of chaining more tools unless the user explicitly asked for more. Do not use this for recommendations or previews; this creates a real campaign workflow or demo-safe simulated campaign.",
|
|
1852
|
-
destructiveHint:
|
|
2022
|
+
destructiveHint: true,
|
|
1853
2023
|
idempotentHint: true,
|
|
1854
2024
|
name: "dynamoi_launch_campaign",
|
|
1855
2025
|
openWorldHint: true,
|
|
@@ -1861,8 +2031,8 @@ var PHASE_3_TOOL_DEFINITIONS = [
|
|
|
1861
2031
|
];
|
|
1862
2032
|
|
|
1863
2033
|
// src/server/create-server.ts
|
|
1864
|
-
var SdkToolOutputEnvelopeSchema =
|
|
1865
|
-
status:
|
|
2034
|
+
var SdkToolOutputEnvelopeSchema = z7.object({
|
|
2035
|
+
status: z7.enum(["success", "partial_success", "error"])
|
|
1866
2036
|
}).passthrough();
|
|
1867
2037
|
function asTextResult(envelope) {
|
|
1868
2038
|
const isToolError = Boolean(envelope) && typeof envelope === "object" && envelope.status === "error";
|
|
@@ -1912,6 +2082,7 @@ function createDynamoiMcpServer(options) {
|
|
|
1912
2082
|
);
|
|
1913
2083
|
for (const def of [
|
|
1914
2084
|
...PHASE_1_TOOL_DEFINITIONS,
|
|
2085
|
+
...PHASE_ONBOARDING_TOOL_DEFINITIONS,
|
|
1915
2086
|
...PHASE_2_TOOL_DEFINITIONS,
|
|
1916
2087
|
...PHASE_3_TOOL_DEFINITIONS,
|
|
1917
2088
|
...PHASE_4_TOOL_DEFINITIONS
|
|
@@ -1955,9 +2126,15 @@ function createDynamoiMcpServer(options) {
|
|
|
1955
2126
|
outputSchema: def.outputSchema,
|
|
1956
2127
|
toolName: def.name
|
|
1957
2128
|
});
|
|
1958
|
-
case "
|
|
2129
|
+
case "search":
|
|
1959
2130
|
return asValidatedTextResult({
|
|
1960
|
-
envelope: await options.adapter.
|
|
2131
|
+
envelope: await options.adapter.openAiSearch(input),
|
|
2132
|
+
outputSchema: def.outputSchema,
|
|
2133
|
+
toolName: def.name
|
|
2134
|
+
});
|
|
2135
|
+
case "fetch":
|
|
2136
|
+
return asValidatedTextResult({
|
|
2137
|
+
envelope: await options.adapter.openAiFetch(input),
|
|
1961
2138
|
outputSchema: def.outputSchema,
|
|
1962
2139
|
toolName: def.name
|
|
1963
2140
|
});
|
|
@@ -1979,15 +2156,15 @@ function createDynamoiMcpServer(options) {
|
|
|
1979
2156
|
outputSchema: def.outputSchema,
|
|
1980
2157
|
toolName: def.name
|
|
1981
2158
|
});
|
|
1982
|
-
case "
|
|
2159
|
+
case "dynamoi_get_billing":
|
|
1983
2160
|
return asValidatedTextResult({
|
|
1984
|
-
envelope: await options.adapter.
|
|
2161
|
+
envelope: await options.adapter.getBilling(input),
|
|
1985
2162
|
outputSchema: def.outputSchema,
|
|
1986
2163
|
toolName: def.name
|
|
1987
2164
|
});
|
|
1988
|
-
case "
|
|
2165
|
+
case "dynamoi_start_meta_connection":
|
|
1989
2166
|
return asValidatedTextResult({
|
|
1990
|
-
envelope: await options.adapter.
|
|
2167
|
+
envelope: await options.adapter.startMetaConnection(input),
|
|
1991
2168
|
outputSchema: def.outputSchema,
|
|
1992
2169
|
toolName: def.name
|
|
1993
2170
|
});
|
|
@@ -1997,15 +2174,15 @@ function createDynamoiMcpServer(options) {
|
|
|
1997
2174
|
outputSchema: def.outputSchema,
|
|
1998
2175
|
toolName: def.name
|
|
1999
2176
|
});
|
|
2000
|
-
case "
|
|
2177
|
+
case "dynamoi_start_youtube_channel_link":
|
|
2001
2178
|
return asValidatedTextResult({
|
|
2002
|
-
envelope: await options.adapter.
|
|
2179
|
+
envelope: await options.adapter.startYoutubeChannelLink(input),
|
|
2003
2180
|
outputSchema: def.outputSchema,
|
|
2004
2181
|
toolName: def.name
|
|
2005
2182
|
});
|
|
2006
|
-
case "
|
|
2183
|
+
case "dynamoi_list_available_countries":
|
|
2007
2184
|
return asValidatedTextResult({
|
|
2008
|
-
envelope: await options.adapter.
|
|
2185
|
+
envelope: await options.adapter.listAvailableCountries(input),
|
|
2009
2186
|
outputSchema: def.outputSchema,
|
|
2010
2187
|
toolName: def.name
|
|
2011
2188
|
});
|
|
@@ -2015,27 +2192,9 @@ function createDynamoiMcpServer(options) {
|
|
|
2015
2192
|
outputSchema: def.outputSchema,
|
|
2016
2193
|
toolName: def.name
|
|
2017
2194
|
});
|
|
2018
|
-
case "
|
|
2019
|
-
return asValidatedTextResult({
|
|
2020
|
-
envelope: await options.adapter.getCampaignDeploymentStatus(input),
|
|
2021
|
-
outputSchema: def.outputSchema,
|
|
2022
|
-
toolName: def.name
|
|
2023
|
-
});
|
|
2024
|
-
case "dynamoi_pause_campaign":
|
|
2025
|
-
return asValidatedTextResult({
|
|
2026
|
-
envelope: await options.adapter.pauseCampaign(input),
|
|
2027
|
-
outputSchema: def.outputSchema,
|
|
2028
|
-
toolName: def.name
|
|
2029
|
-
});
|
|
2030
|
-
case "dynamoi_resume_campaign":
|
|
2195
|
+
case "dynamoi_update_campaign":
|
|
2031
2196
|
return asValidatedTextResult({
|
|
2032
|
-
envelope: await options.adapter.
|
|
2033
|
-
outputSchema: def.outputSchema,
|
|
2034
|
-
toolName: def.name
|
|
2035
|
-
});
|
|
2036
|
-
case "dynamoi_update_budget":
|
|
2037
|
-
return asValidatedTextResult({
|
|
2038
|
-
envelope: await options.adapter.updateBudget(input),
|
|
2197
|
+
envelope: await options.adapter.updateCampaign(input),
|
|
2039
2198
|
outputSchema: def.outputSchema,
|
|
2040
2199
|
toolName: def.name
|
|
2041
2200
|
});
|
|
@@ -2057,27 +2216,21 @@ function createDynamoiMcpServer(options) {
|
|
|
2057
2216
|
outputSchema: def.outputSchema,
|
|
2058
2217
|
toolName: def.name
|
|
2059
2218
|
});
|
|
2060
|
-
case "
|
|
2061
|
-
return asValidatedTextResult({
|
|
2062
|
-
envelope: await options.adapter.listSmartLinks(input),
|
|
2063
|
-
outputSchema: def.outputSchema,
|
|
2064
|
-
toolName: def.name
|
|
2065
|
-
});
|
|
2066
|
-
case "dynamoi_get_smart_link":
|
|
2219
|
+
case "dynamoi_create_smart_links_from_spotify_artist":
|
|
2067
2220
|
return asValidatedTextResult({
|
|
2068
|
-
envelope: await options.adapter.
|
|
2221
|
+
envelope: await options.adapter.createSmartLinksFromSpotifyArtist(input),
|
|
2069
2222
|
outputSchema: def.outputSchema,
|
|
2070
2223
|
toolName: def.name
|
|
2071
2224
|
});
|
|
2072
|
-
case "
|
|
2225
|
+
case "dynamoi_list_smart_links":
|
|
2073
2226
|
return asValidatedTextResult({
|
|
2074
|
-
envelope: await options.adapter.
|
|
2227
|
+
envelope: await options.adapter.listSmartLinks(input),
|
|
2075
2228
|
outputSchema: def.outputSchema,
|
|
2076
2229
|
toolName: def.name
|
|
2077
2230
|
});
|
|
2078
|
-
case "
|
|
2231
|
+
case "dynamoi_get_smart_link":
|
|
2079
2232
|
return asValidatedTextResult({
|
|
2080
|
-
envelope: await options.adapter.
|
|
2233
|
+
envelope: await options.adapter.getSmartLink(input),
|
|
2081
2234
|
outputSchema: def.outputSchema,
|
|
2082
2235
|
toolName: def.name
|
|
2083
2236
|
});
|
|
@@ -2087,24 +2240,6 @@ function createDynamoiMcpServer(options) {
|
|
|
2087
2240
|
outputSchema: def.outputSchema,
|
|
2088
2241
|
toolName: def.name
|
|
2089
2242
|
});
|
|
2090
|
-
case "dynamoi_update_smart_link_artist_settings":
|
|
2091
|
-
return asValidatedTextResult({
|
|
2092
|
-
envelope: await options.adapter.updateSmartLinkArtistSettings(input),
|
|
2093
|
-
outputSchema: def.outputSchema,
|
|
2094
|
-
toolName: def.name
|
|
2095
|
-
});
|
|
2096
|
-
case "dynamoi_publish_smart_link":
|
|
2097
|
-
return asValidatedTextResult({
|
|
2098
|
-
envelope: await options.adapter.publishSmartLink(input),
|
|
2099
|
-
outputSchema: def.outputSchema,
|
|
2100
|
-
toolName: def.name
|
|
2101
|
-
});
|
|
2102
|
-
case "dynamoi_unpublish_smart_link":
|
|
2103
|
-
return asValidatedTextResult({
|
|
2104
|
-
envelope: await options.adapter.unpublishSmartLink(input),
|
|
2105
|
-
outputSchema: def.outputSchema,
|
|
2106
|
-
toolName: def.name
|
|
2107
|
-
});
|
|
2108
2243
|
default:
|
|
2109
2244
|
return asTextResult({
|
|
2110
2245
|
message: "Unknown tool",
|
|
@@ -2220,6 +2355,7 @@ export {
|
|
|
2220
2355
|
DYNAMOI_MCP_SCOPES,
|
|
2221
2356
|
DateRangeSchema2 as DateRangeSchema,
|
|
2222
2357
|
DynamoiCreateSmartLinkFromSpotifyInputSchema,
|
|
2358
|
+
DynamoiCreateSmartLinksFromSpotifyArtistInputSchema,
|
|
2223
2359
|
DynamoiGetArtistAnalyticsInputSchema,
|
|
2224
2360
|
DynamoiGetArtistInputSchema,
|
|
2225
2361
|
DynamoiGetBillingInputSchema,
|
|
@@ -2239,17 +2375,23 @@ export {
|
|
|
2239
2375
|
DynamoiListCampaignsInputSchema,
|
|
2240
2376
|
DynamoiListMediaAssetsInputSchema,
|
|
2241
2377
|
DynamoiListSmartLinksInputSchema,
|
|
2378
|
+
DynamoiOpenAiFetchInputSchema,
|
|
2379
|
+
DynamoiOpenAiSearchInputSchema,
|
|
2242
2380
|
DynamoiPauseCampaignInputSchema,
|
|
2243
2381
|
DynamoiPublishSmartLinkInputSchema,
|
|
2244
2382
|
DynamoiResumeCampaignInputSchema,
|
|
2245
2383
|
DynamoiSearchInputSchema,
|
|
2384
|
+
DynamoiStartMetaConnectionInputSchema,
|
|
2385
|
+
DynamoiStartYoutubeChannelLinkInputSchema,
|
|
2246
2386
|
DynamoiUpdateBudgetInputSchema,
|
|
2387
|
+
DynamoiUpdateCampaignInputSchema,
|
|
2247
2388
|
DynamoiUpdateSmartLinkArtistSettingsInputSchema,
|
|
2248
2389
|
DynamoiUpdateSmartLinkInputSchema,
|
|
2249
2390
|
PHASE_1_TOOL_DEFINITIONS,
|
|
2250
2391
|
PHASE_2_TOOL_DEFINITIONS,
|
|
2251
2392
|
PHASE_3_TOOL_DEFINITIONS,
|
|
2252
2393
|
PHASE_4_TOOL_DEFINITIONS,
|
|
2394
|
+
PHASE_ONBOARDING_TOOL_DEFINITIONS,
|
|
2253
2395
|
ToolFormatSchema2 as ToolFormatSchema,
|
|
2254
2396
|
buildProtectedResourceMetadata,
|
|
2255
2397
|
buildWwwAuthenticateHeader,
|