@speakai/mcp-server 1.23.1 → 1.24.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +6 -5
  2. package/dist/index.js +137 -242
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -242,7 +242,7 @@ For questions about data handling, see [speakai.co/privacy](https://speakai.co/p
242
242
 
243
243
  ## What you can do once installed
244
244
 
245
- Speak AI ships 113 tools your AI assistant can call. You don't memorize them — Claude/ChatGPT pick the right ones based on what you ask. Examples by category:
245
+ Speak AI ships 114 tools your AI assistant can call. You don't memorize them — Claude/ChatGPT pick the right ones based on what you ask. Examples by category:
246
246
 
247
247
  | Ask | Tools used (auto) |
248
248
  |---|---|
@@ -394,17 +394,18 @@ SPEAK_API_KEY=your-key npx @speakai/mcp-server
394
394
  | `SPEAK_ACCESS_TOKEN` | No | Auto-managed | JWT access token (auto-fetched and refreshed) |
395
395
  | `SPEAK_BASE_URL` | No | `https://api.speakai.co` | API base URL |
396
396
 
397
- ### MCP Tools (113)
397
+ ### MCP Tools (114)
398
398
 
399
399
  <details>
400
- <summary>Media (17 tools)</summary>
400
+ <summary>Media (18 tools)</summary>
401
401
 
402
402
  | Tool | Description |
403
403
  |---|---|
404
404
  | `get_signed_upload_url` | Get a pre-signed S3 URL for direct file upload |
405
- | `upload_media` | Upload media from a URL — a direct/public file URL or a social/video link (YouTube, Instagram, TikTok, X, Facebook, Reddit, SoundCloud, …) resolved automatically. |
405
+ | `upload_media` | Upload media from a URL — a direct/public file URL, a pre-signed S3 URL, or a social/video page link resolved automatically (YouTube, TikTok, Instagram, X/Twitter, Facebook, Reddit, SoundCloud, Twitch, Dailymotion, Streamable, Snapchat, Pinterest, Tumblr, Bilibili, VK, OK.ru, Rutube). Vimeo and Loom page links are not supported. |
406
406
  | `upload_local_file` | Upload a local file directly from disk |
407
- | `upload_and_analyze` | Upload media from a URL (direct file or social/video link, resolved automatically) and return its `media_id` immediately. Poll `get_media_status` until `processed`, then call `get_media_insights` for AI summaries. |
407
+ | `upload_and_analyze` | Upload media from a URL (direct file, or any social/video page link `upload_media` accepts — resolved automatically) and return its `media_id` immediately. Poll `get_media_status` until `processed`, then call `get_media_insights` for AI summaries. Set `mediaType` when the user has said which they want; leave it off otherwise and the server picks the best available track. |
408
+ | `upload_and_analyze_batch` | Upload up to 25 URLs in one call, 5 at a time. Each URL is reported as uploaded or failed with its reason, so one bad link does not sink the batch. Use this instead of calling `upload_and_analyze` in a loop. |
408
409
  | `list_media` | List and search media files with filters, pagination, and optional inline data (transcripts, speakers, keywords) via `include` param |
409
410
  | `get_media_insights` | Get AI insights — topics, sentiment, summaries, action items |
410
411
  | `get_transcript` | Get full transcript with speaker labels and timestamps |
package/dist/index.js CHANGED
@@ -283,7 +283,7 @@ var init_auth = __esm({
283
283
  });
284
284
 
285
285
  // node_modules/@speakai/shared/dist/enums/automation.js
286
- var AutomationTrigger, AutomationAction, AutomationStepType, AutomationRunStatus, AutomationIOType, AutomationRunType, AutomationScheduleTimePeriod, AssistantType;
286
+ var AutomationTrigger, AutomationAction, AutomationRunType, AutomationScheduleTimePeriod, AssistantType;
287
287
  var init_automation = __esm({
288
288
  "node_modules/@speakai/shared/dist/enums/automation.js"() {
289
289
  "use strict";
@@ -291,38 +291,11 @@ var init_automation = __esm({
291
291
  AutomationTrigger2["FOLDERS"] = "folders";
292
292
  AutomationTrigger2["TAGS"] = "tags";
293
293
  AutomationTrigger2["KEYWORDS"] = "keywords";
294
- AutomationTrigger2["COMPOSIO"] = "composio";
295
- AutomationTrigger2["WEBHOOK"] = "webhook";
296
294
  })(AutomationTrigger || (AutomationTrigger = {}));
297
295
  (function(AutomationAction2) {
298
296
  AutomationAction2["MAGIC_PROMPT"] = "magic-prompt";
299
297
  AutomationAction2["TRANSLATION"] = "translation";
300
298
  })(AutomationAction || (AutomationAction = {}));
301
- (function(AutomationStepType2) {
302
- AutomationStepType2["TRIGGER"] = "trigger";
303
- AutomationStepType2["MAGIC_PROMPT"] = "magic-prompt";
304
- AutomationStepType2["TRANSLATION"] = "translation";
305
- AutomationStepType2["COMPOSIO_ACTION"] = "composio-action";
306
- AutomationStepType2["FILTER"] = "filter";
307
- AutomationStepType2["SPEAK_UPLOAD"] = "speak-upload";
308
- AutomationStepType2["NOTIFY"] = "notify";
309
- AutomationStepType2["OUTBOUND_WEBHOOK"] = "outbound-webhook";
310
- AutomationStepType2["CONDITION"] = "condition";
311
- })(AutomationStepType || (AutomationStepType = {}));
312
- (function(AutomationRunStatus2) {
313
- AutomationRunStatus2["PENDING"] = "pending";
314
- AutomationRunStatus2["RUNNING"] = "running";
315
- AutomationRunStatus2["COMPLETED"] = "completed";
316
- AutomationRunStatus2["FAILED"] = "failed";
317
- AutomationRunStatus2["KILLED"] = "killed";
318
- })(AutomationRunStatus || (AutomationRunStatus = {}));
319
- (function(AutomationIOType2) {
320
- AutomationIOType2["FILE"] = "file";
321
- AutomationIOType2["MEDIA"] = "media";
322
- AutomationIOType2["INSIGHT"] = "insight";
323
- AutomationIOType2["NOTIFY"] = "notify";
324
- AutomationIOType2["DATA"] = "data";
325
- })(AutomationIOType || (AutomationIOType = {}));
326
299
  (function(AutomationRunType2) {
327
300
  AutomationRunType2["INSTANT"] = "instant";
328
301
  AutomationRunType2["SCHEDULE"] = "schedule";
@@ -414,7 +387,6 @@ var init_embed = __esm({
414
387
  (function(EmbedType2) {
415
388
  EmbedType2["MEDIA_PLAYER"] = "mediaPlayer";
416
389
  EmbedType2["REPOSITORY"] = "repository";
417
- EmbedType2["DASHBOARD"] = "dashboard";
418
390
  })(EmbedType || (EmbedType = {}));
419
391
  (function(ImageSelectionType2) {
420
392
  ImageSelectionType2["LOGO"] = "logo";
@@ -514,18 +486,6 @@ var init_filter = __esm({
514
486
  }
515
487
  });
516
488
 
517
- // node_modules/@speakai/shared/dist/enums/integration.js
518
- var IntegrationAuthType;
519
- var init_integration = __esm({
520
- "node_modules/@speakai/shared/dist/enums/integration.js"() {
521
- "use strict";
522
- (function(IntegrationAuthType2) {
523
- IntegrationAuthType2["OAUTH"] = "oauth";
524
- IntegrationAuthType2["API_KEY"] = "api_key";
525
- })(IntegrationAuthType || (IntegrationAuthType = {}));
526
- }
527
- });
528
-
529
489
  // node_modules/@speakai/shared/dist/enums/media.js
530
490
  var MediaType, MediaState, MediaPrivacyMode, MediaInsightType, MediaInsightStatus, MediaProcessType;
531
491
  var init_media = __esm({
@@ -1003,72 +963,10 @@ var init_webhook = __esm({
1003
963
  (function(WebhookEventSource2) {
1004
964
  WebhookEventSource2["SPEAK"] = "speak";
1005
965
  WebhookEventSource2["ZAPIER"] = "zapier";
1006
- WebhookEventSource2["N8N"] = "n8n";
1007
- WebhookEventSource2["PIPEDREAM"] = "pipedream";
1008
- WebhookEventSource2["MAKE"] = "make";
1009
966
  })(WebhookEventSource || (WebhookEventSource = {}));
1010
967
  }
1011
968
  });
1012
969
 
1013
- // node_modules/@speakai/shared/dist/enums/llm.js
1014
- var LLMProvider, LLMModels;
1015
- var init_llm = __esm({
1016
- "node_modules/@speakai/shared/dist/enums/llm.js"() {
1017
- "use strict";
1018
- (function(LLMProvider2) {
1019
- LLMProvider2["OPENAI"] = "openai";
1020
- LLMProvider2["GOOGLE"] = "google";
1021
- LLMProvider2["ANTHROPIC"] = "anthropic";
1022
- LLMProvider2["OPENROUTER"] = "openrouter";
1023
- })(LLMProvider || (LLMProvider = {}));
1024
- (function(LLMModels2) {
1025
- LLMModels2["GPT_3_5"] = "gpt-3.5";
1026
- LLMModels2["GPT_3_5_TURBO_16K"] = "gpt-3.5-turbo-16k";
1027
- LLMModels2["GPT_3_5_TURBO_0125"] = "gpt-3.5-turbo-0125";
1028
- LLMModels2["GPT_4"] = "gpt-4";
1029
- LLMModels2["GPT_4_1106_PREVIEW"] = "gpt-4-1106-preview";
1030
- LLMModels2["GPT_4_TURBO"] = "gpt-4-turbo";
1031
- LLMModels2["GPT_4_O_2024_05_13"] = "gpt-4o-2024-05-13";
1032
- LLMModels2["GPT_4O"] = "gpt-4o";
1033
- LLMModels2["GPT_4O_MINI"] = "gpt-4o-mini";
1034
- LLMModels2["GPT_4_O_2024_08_06"] = "gpt-4o-2024-08-06";
1035
- LLMModels2["GPT_4_MINI_2024_07_18"] = "gpt-4o-mini-2024-07-18";
1036
- LLMModels2["GPT_4_1_2025_04_14"] = "gpt-4.1-2025-04-14";
1037
- LLMModels2["GPT_5_1_2025_11_13"] = "gpt-5.1-2025-11-13";
1038
- LLMModels2["GPT_5_2"] = "gpt-5.2";
1039
- LLMModels2["GPT_5_4"] = "gpt-5.4";
1040
- LLMModels2["GPT_5_4_MINI"] = "gpt-5.4-mini";
1041
- LLMModels2["GPT_5_4_MINI_2026_03_17"] = "gpt-5.4-mini-2026-03-17";
1042
- LLMModels2["GPT_5_4_NANO"] = "gpt-5.4-nano";
1043
- LLMModels2["GPT_5_5"] = "gpt-5.5";
1044
- LLMModels2["GPT_5_5_THINKING"] = "gpt-5.5-thinking";
1045
- LLMModels2["GPT_5_6_SOL"] = "gpt-5.6-sol";
1046
- LLMModels2["GPT_5_6_TERRA"] = "gpt-5.6-terra";
1047
- LLMModels2["GPT_5_6_LUNA"] = "gpt-5.6-luna";
1048
- LLMModels2["CLAUDE_2"] = "claude-2";
1049
- LLMModels2["CLAUDE_3_5_SONNET"] = "claude-3-5-sonnet";
1050
- LLMModels2["CLAUDE_3_5_SONNET_20241022"] = "claude-3-5-sonnet-20241022";
1051
- LLMModels2["CLAUDE_3_7_SONNET_LATEST"] = "claude-3-7-sonnet-latest";
1052
- LLMModels2["CLAUDE_HAIKU_4_5"] = "claude-haiku-4-5";
1053
- LLMModels2["CLAUDE_SONNET_4_6"] = "claude-sonnet-4-6";
1054
- LLMModels2["CLAUDE_SONNET_5"] = "claude-sonnet-5";
1055
- LLMModels2["CLAUDE_OPUS_4_8"] = "claude-opus-4-8";
1056
- LLMModels2["GEMINI_1_5_PRO"] = "gemini-1.5-pro";
1057
- LLMModels2["GEMINI_1_5_FLASH"] = "gemini-1.5-flash";
1058
- LLMModels2["GEMINI_2_0_FLASH"] = "gemini-2.0-flash";
1059
- LLMModels2["GEMINI_2_5_PRO"] = "gemini-2.5-pro";
1060
- LLMModels2["GEMINI_2_5_FLASH"] = "gemini-2.5-flash";
1061
- LLMModels2["GEMINI_2_5_FLASH_LITE"] = "gemini-2.5-flash-lite";
1062
- LLMModels2["GEMINI_3_FLASH_PREVIEW"] = "gemini-3-flash-preview";
1063
- LLMModels2["GEMINI_3_1_FLASH_LITE"] = "gemini-3.1-flash-lite";
1064
- LLMModels2["GEMINI_3_1_PRO_PREVIEW"] = "gemini-3.1-pro-preview";
1065
- LLMModels2["GEMINI_3_5_FLASH"] = "gemini-3.5-flash";
1066
- LLMModels2["GROK_4_5"] = "x-ai/grok-4.5";
1067
- LLMModels2["GLM_5_2"] = "z-ai/glm-5.2";
1068
- })(LLMModels || (LLMModels = {}));
1069
- }
1070
- });
1071
-
1072
970
  // node_modules/@speakai/shared/dist/enums/index.js
1073
971
  var init_enums = __esm({
1074
972
  "node_modules/@speakai/shared/dist/enums/index.js"() {
@@ -1083,7 +981,6 @@ var init_enums = __esm({
1083
981
  init_export();
1084
982
  init_fields();
1085
983
  init_filter();
1086
- init_integration();
1087
984
  init_media();
1088
985
  init_meeting();
1089
986
  init_notification();
@@ -1096,7 +993,6 @@ var init_enums = __esm({
1096
993
  init_translation();
1097
994
  init_user();
1098
995
  init_webhook();
1099
- init_llm();
1100
996
  }
1101
997
  });
1102
998
 
@@ -1135,13 +1031,6 @@ var init_folder = __esm({
1135
1031
  }
1136
1032
  });
1137
1033
 
1138
- // node_modules/@speakai/shared/dist/interfaces/integration.js
1139
- var init_integration2 = __esm({
1140
- "node_modules/@speakai/shared/dist/interfaces/integration.js"() {
1141
- "use strict";
1142
- }
1143
- });
1144
-
1145
1034
  // node_modules/@speakai/shared/dist/interfaces/recorder.js
1146
1035
  var init_recorder2 = __esm({
1147
1036
  "node_modules/@speakai/shared/dist/interfaces/recorder.js"() {
@@ -1233,21 +1122,6 @@ var init_clip2 = __esm({
1233
1122
  }
1234
1123
  });
1235
1124
 
1236
- // node_modules/@speakai/shared/dist/utils/dashboard-spec.js
1237
- var init_dashboard_spec = __esm({
1238
- "node_modules/@speakai/shared/dist/utils/dashboard-spec.js"() {
1239
- "use strict";
1240
- }
1241
- });
1242
-
1243
- // node_modules/@speakai/shared/dist/interfaces/dashboard.js
1244
- var init_dashboard = __esm({
1245
- "node_modules/@speakai/shared/dist/interfaces/dashboard.js"() {
1246
- "use strict";
1247
- init_dashboard_spec();
1248
- }
1249
- });
1250
-
1251
1125
  // node_modules/@speakai/shared/dist/interfaces/index.js
1252
1126
  var init_interfaces = __esm({
1253
1127
  "node_modules/@speakai/shared/dist/interfaces/index.js"() {
@@ -1257,7 +1131,6 @@ var init_interfaces = __esm({
1257
1131
  init_transcript();
1258
1132
  init_text();
1259
1133
  init_folder();
1260
- init_integration2();
1261
1134
  init_recorder2();
1262
1135
  init_embed2();
1263
1136
  init_automation2();
@@ -1271,7 +1144,6 @@ var init_interfaces = __esm({
1271
1144
  init_calendar2();
1272
1145
  init_category();
1273
1146
  init_clip2();
1274
- init_dashboard();
1275
1147
  }
1276
1148
  });
1277
1149
 
@@ -1282,70 +1154,6 @@ var init_transcript2 = __esm({
1282
1154
  }
1283
1155
  });
1284
1156
 
1285
- // node_modules/@speakai/shared/dist/pricing/modelPricing.js
1286
- var MODEL_PRICING;
1287
- var init_modelPricing = __esm({
1288
- "node_modules/@speakai/shared/dist/pricing/modelPricing.js"() {
1289
- "use strict";
1290
- init_llm();
1291
- MODEL_PRICING = {
1292
- // ═══════════════ OpenAI ═══════════════
1293
- // Deprecated
1294
- [LLMModels.GPT_3_5]: { inputPerMillion: 0.5, outputPerMillion: 1.5, provider: LLMProvider.OPENAI },
1295
- [LLMModels.GPT_3_5_TURBO_16K]: { inputPerMillion: 3, outputPerMillion: 4, provider: LLMProvider.OPENAI },
1296
- [LLMModels.GPT_3_5_TURBO_0125]: { inputPerMillion: 0.5, outputPerMillion: 1.5, provider: LLMProvider.OPENAI },
1297
- [LLMModels.GPT_4]: { inputPerMillion: 30, outputPerMillion: 60, provider: LLMProvider.OPENAI },
1298
- [LLMModels.GPT_4_1106_PREVIEW]: { inputPerMillion: 10, outputPerMillion: 30, provider: LLMProvider.OPENAI },
1299
- [LLMModels.GPT_4_TURBO]: { inputPerMillion: 10, outputPerMillion: 30, provider: LLMProvider.OPENAI },
1300
- [LLMModels.GPT_4_O_2024_05_13]: { inputPerMillion: 5, outputPerMillion: 15, provider: LLMProvider.OPENAI },
1301
- // Live
1302
- [LLMModels.GPT_4O]: { inputPerMillion: 2.5, outputPerMillion: 10, cachedInputPerMillion: 1.25, provider: LLMProvider.OPENAI },
1303
- [LLMModels.GPT_4O_MINI]: { inputPerMillion: 0.15, outputPerMillion: 0.6, cachedInputPerMillion: 0.075, provider: LLMProvider.OPENAI },
1304
- [LLMModels.GPT_4_O_2024_08_06]: { inputPerMillion: 2.5, outputPerMillion: 10, cachedInputPerMillion: 1.25, provider: LLMProvider.OPENAI },
1305
- [LLMModels.GPT_4_MINI_2024_07_18]: { inputPerMillion: 0.15, outputPerMillion: 0.6, cachedInputPerMillion: 0.075, provider: LLMProvider.OPENAI },
1306
- [LLMModels.GPT_4_1_2025_04_14]: { inputPerMillion: 2, outputPerMillion: 8, cachedInputPerMillion: 0.5, provider: LLMProvider.OPENAI },
1307
- [LLMModels.GPT_5_1_2025_11_13]: { inputPerMillion: 1.25, outputPerMillion: 10, cachedInputPerMillion: 0.125, provider: LLMProvider.OPENAI },
1308
- [LLMModels.GPT_5_2]: { inputPerMillion: 1.75, outputPerMillion: 14, cachedInputPerMillion: 0.175, provider: LLMProvider.OPENAI },
1309
- [LLMModels.GPT_5_4]: { inputPerMillion: 2.5, outputPerMillion: 15, cachedInputPerMillion: 0.25, longContextThresholdTokens: 272e3, inputPerMillionLong: 5, outputPerMillionLong: 22.5, cachedInputPerMillionLong: 0.5, provider: LLMProvider.OPENAI },
1310
- [LLMModels.GPT_5_4_MINI]: { inputPerMillion: 0.75, outputPerMillion: 4.5, cachedInputPerMillion: 0.075, provider: LLMProvider.OPENAI },
1311
- [LLMModels.GPT_5_4_MINI_2026_03_17]: { inputPerMillion: 0.75, outputPerMillion: 4.5, cachedInputPerMillion: 0.075, provider: LLMProvider.OPENAI },
1312
- [LLMModels.GPT_5_4_NANO]: { inputPerMillion: 0.2, outputPerMillion: 1.25, cachedInputPerMillion: 0.02, provider: LLMProvider.OPENAI },
1313
- [LLMModels.GPT_5_5]: { inputPerMillion: 5, outputPerMillion: 30, cachedInputPerMillion: 0.5, longContextThresholdTokens: 272e3, inputPerMillionLong: 10, outputPerMillionLong: 45, cachedInputPerMillionLong: 1, provider: LLMProvider.OPENAI },
1314
- [LLMModels.GPT_5_5_THINKING]: { inputPerMillion: 5, outputPerMillion: 30, cachedInputPerMillion: 0.5, longContextThresholdTokens: 272e3, inputPerMillionLong: 10, outputPerMillionLong: 45, cachedInputPerMillionLong: 1, provider: LLMProvider.OPENAI },
1315
- // gpt-5.5 reasoning mode (same rate)
1316
- [LLMModels.GPT_5_6_SOL]: { inputPerMillion: 5, outputPerMillion: 30, cachedInputPerMillion: 0.5, provider: LLMProvider.OPENAI },
1317
- [LLMModels.GPT_5_6_TERRA]: { inputPerMillion: 2.5, outputPerMillion: 15, cachedInputPerMillion: 0.25, provider: LLMProvider.OPENAI },
1318
- [LLMModels.GPT_5_6_LUNA]: { inputPerMillion: 1, outputPerMillion: 6, cachedInputPerMillion: 0.1, provider: LLMProvider.OPENAI },
1319
- // ═══════════════ Anthropic (cache read = 0.1x input) ═══════════════
1320
- // Deprecated
1321
- [LLMModels.CLAUDE_2]: { inputPerMillion: 8, outputPerMillion: 24, provider: LLMProvider.ANTHROPIC },
1322
- [LLMModels.CLAUDE_3_5_SONNET]: { inputPerMillion: 3, outputPerMillion: 15, cachedInputPerMillion: 0.3, provider: LLMProvider.ANTHROPIC },
1323
- [LLMModels.CLAUDE_3_5_SONNET_20241022]: { inputPerMillion: 3, outputPerMillion: 15, cachedInputPerMillion: 0.3, provider: LLMProvider.ANTHROPIC },
1324
- [LLMModels.CLAUDE_3_7_SONNET_LATEST]: { inputPerMillion: 3, outputPerMillion: 15, cachedInputPerMillion: 0.3, provider: LLMProvider.ANTHROPIC },
1325
- // Live
1326
- [LLMModels.CLAUDE_HAIKU_4_5]: { inputPerMillion: 1, outputPerMillion: 5, cachedInputPerMillion: 0.1, provider: LLMProvider.ANTHROPIC },
1327
- [LLMModels.CLAUDE_SONNET_4_6]: { inputPerMillion: 3, outputPerMillion: 15, cachedInputPerMillion: 0.3, provider: LLMProvider.ANTHROPIC },
1328
- [LLMModels.CLAUDE_SONNET_5]: { inputPerMillion: 3, outputPerMillion: 15, cachedInputPerMillion: 0.3, provider: LLMProvider.ANTHROPIC },
1329
- [LLMModels.CLAUDE_OPUS_4_8]: { inputPerMillion: 5, outputPerMillion: 25, cachedInputPerMillion: 0.5, provider: LLMProvider.ANTHROPIC },
1330
- // ═══════════════ Google Gemini ═══════════════
1331
- // Deprecated
1332
- [LLMModels.GEMINI_1_5_PRO]: { inputPerMillion: 1.25, outputPerMillion: 5, provider: LLMProvider.GOOGLE },
1333
- [LLMModels.GEMINI_1_5_FLASH]: { inputPerMillion: 0.075, outputPerMillion: 0.3, cachedInputPerMillion: 0.01875, provider: LLMProvider.GOOGLE },
1334
- [LLMModels.GEMINI_2_0_FLASH]: { inputPerMillion: 0.1, outputPerMillion: 0.4, cachedInputPerMillion: 0.025, provider: LLMProvider.GOOGLE },
1335
- // Live
1336
- [LLMModels.GEMINI_2_5_PRO]: { inputPerMillion: 1.25, outputPerMillion: 10, longContextThresholdTokens: 2e5, inputPerMillionLong: 2.5, outputPerMillionLong: 15, provider: LLMProvider.GOOGLE },
1337
- [LLMModels.GEMINI_2_5_FLASH]: { inputPerMillion: 0.3, outputPerMillion: 2.5, cachedInputPerMillion: 0.03, provider: LLMProvider.GOOGLE },
1338
- [LLMModels.GEMINI_2_5_FLASH_LITE]: { inputPerMillion: 0.1, outputPerMillion: 0.4, cachedInputPerMillion: 0.01, provider: LLMProvider.GOOGLE },
1339
- [LLMModels.GEMINI_3_FLASH_PREVIEW]: { inputPerMillion: 0.5, outputPerMillion: 3, cachedInputPerMillion: 0.05, provider: LLMProvider.GOOGLE },
1340
- [LLMModels.GEMINI_3_1_FLASH_LITE]: { inputPerMillion: 0.25, outputPerMillion: 1.5, provider: LLMProvider.GOOGLE },
1341
- [LLMModels.GEMINI_3_1_PRO_PREVIEW]: { inputPerMillion: 2, outputPerMillion: 12, longContextThresholdTokens: 2e5, inputPerMillionLong: 4, outputPerMillionLong: 18, provider: LLMProvider.GOOGLE },
1342
- [LLMModels.GEMINI_3_5_FLASH]: { inputPerMillion: 1.5, outputPerMillion: 9, cachedInputPerMillion: 0.15, provider: LLMProvider.GOOGLE },
1343
- [LLMModels.GROK_4_5]: { inputPerMillion: 2.2, outputPerMillion: 6.6, cachedInputPerMillion: 0.22, provider: LLMProvider.OPENROUTER },
1344
- [LLMModels.GLM_5_2]: { inputPerMillion: 1.023, outputPerMillion: 3.3, cachedInputPerMillion: 0.1023, provider: LLMProvider.OPENROUTER }
1345
- };
1346
- }
1347
- });
1348
-
1349
1157
  // node_modules/@speakai/shared/dist/index.js
1350
1158
  var init_dist = __esm({
1351
1159
  "node_modules/@speakai/shared/dist/index.js"() {
@@ -1353,8 +1161,6 @@ var init_dist = __esm({
1353
1161
  init_enums();
1354
1162
  init_interfaces();
1355
1163
  init_transcript2();
1356
- init_dashboard_spec();
1357
- init_modelPricing();
1358
1164
  }
1359
1165
  });
1360
1166
 
@@ -1372,7 +1178,7 @@ function getMimeType(filePath) {
1372
1178
  function detectMediaType(filePath) {
1373
1179
  return isVideoFile(filePath) ? "video" : "audio";
1374
1180
  }
1375
- var path, VIDEO_EXTENSIONS, MIME_TYPES;
1181
+ var path, VIDEO_EXTENSIONS, MIME_TYPES, SUPPORTED_URL_SOURCES, UNSUPPORTED_URL_SOURCES;
1376
1182
  var init_media_utils = __esm({
1377
1183
  "src/media-utils.ts"() {
1378
1184
  "use strict";
@@ -1389,6 +1195,8 @@ var init_media_utils = __esm({
1389
1195
  ".mkv": "video/x-matroska",
1390
1196
  ".wmv": "video/x-ms-wmv"
1391
1197
  };
1198
+ SUPPORTED_URL_SOURCES = "YouTube, TikTok, Instagram, X/Twitter, Facebook, Reddit, SoundCloud, Twitch, Dailymotion, Streamable, Snapchat, Pinterest, Tumblr, Bilibili, VK, OK.ru and Rutube";
1199
+ UNSUPPORTED_URL_SOURCES = "Vimeo and Loom page links are not supported.";
1392
1200
  }
1393
1201
  });
1394
1202
 
@@ -1407,7 +1215,7 @@ function register(server, client) {
1407
1215
  "Get a pre-signed S3 URL for direct file upload to Speak AI storage. After getting the URL, PUT your file to it, then call upload_media with the S3 URL. For a simpler workflow, use upload_local_file instead which handles all steps automatically.",
1408
1216
  {
1409
1217
  filename: import_zod2.z.string().min(1).describe('Original filename including extension, e.g. "interview.mp4". The extension decides audio vs video and the storage path, so it must match the real file \u2014 a video named ".mp3" is stored as audio and can never be analysed as video.'),
1410
- isVideo: import_zod2.z.boolean().optional().describe("Override the audio/video decision. Omit to derive it from the filename extension (recommended); only set this when the extension does not reflect the real container."),
1218
+ mediaType: import_zod2.z.enum([MediaType.AUDIO, MediaType.VIDEO]).optional().describe('Type of media: "audio" or "video". It decides the storage path, so it has to match the real file. Send it whenever the user has told you which they want, or when the filename extension does not reflect the real container. Omit it to derive the type from the extension, which is the only evidence available here because the bytes do not exist yet.'),
1411
1219
  mimeType: import_zod2.z.string().optional().describe('MIME type, e.g. "video/mp4". Omit to derive it from the filename extension.')
1412
1220
  },
1413
1221
  {
@@ -1417,12 +1225,12 @@ function register(server, client) {
1417
1225
  idempotentHint: false,
1418
1226
  openWorldHint: false
1419
1227
  },
1420
- async ({ isVideo, filename, mimeType }) => {
1228
+ async ({ mediaType, filename, mimeType }) => {
1421
1229
  try {
1422
- const resolvedIsVideo = isVideo ?? isVideoFile(filename);
1230
+ const resolvedMediaType = mediaType ?? (isVideoFile(filename) ? MediaType.VIDEO : MediaType.AUDIO);
1423
1231
  const resolvedMimeType = mimeType ?? getMimeType(filename);
1424
1232
  const result = await api.get("/v1/media/upload/signedurl", {
1425
- params: { isVideo: resolvedIsVideo, filename, mimeType: resolvedMimeType }
1233
+ params: { mediaType: resolvedMediaType, filename, mimeType: resolvedMimeType }
1426
1234
  });
1427
1235
  return {
1428
1236
  content: [
@@ -1440,11 +1248,11 @@ function register(server, client) {
1440
1248
  registerSpeakTool(
1441
1249
  server,
1442
1250
  "upload_media",
1443
- "Upload media from a URL \u2014 a direct/public file URL, a pre-signed S3 URL, or a shareable social/video link (YouTube, Instagram, TikTok, X, Facebook, Reddit, SoundCloud, and similar) which Speak resolves to the underlying media automatically. Processing is asynchronous \u2014 after uploading, use get_media_status to poll until state is 'processed' (typically 1-3 minutes for audio under 60 min), then use get_transcript and get_media_insights to retrieve results. For a single call that handles everything, use upload_and_analyze instead. For local files, use upload_local_file. (Vimeo links are not yet supported.)",
1251
+ `Upload media from a URL \u2014 a direct/public file URL, a pre-signed S3 URL, or a shareable social/video page link, which Speak resolves to the underlying media automatically. Supported page links: ${SUPPORTED_URL_SOURCES}. ${UNSUPPORTED_URL_SOURCES} Processing is asynchronous \u2014 after uploading, use get_media_status to poll until state is 'processed' (typically 1-3 minutes for audio under 60 min), then use get_transcript and get_media_insights to retrieve results. For a single call that handles everything, use upload_and_analyze instead. For local files, use upload_local_file.`,
1444
1252
  {
1445
1253
  name: import_zod2.z.string().min(1).describe("Display name for the media file"),
1446
- url: import_zod2.z.string().describe("Direct/public media file URL, pre-signed S3 URL, or a shareable social/video page link (e.g. an Instagram reel or TikTok URL) \u2014 page links are resolved to the underlying media server-side."),
1447
- mediaType: import_zod2.z.enum([MediaType.AUDIO, MediaType.VIDEO]).optional().describe(`Type of media: "audio" or "video". Omit to derive it from the URL's file extension (recommended). Set it only when the URL has no usable extension; a video labelled "audio" here can never be analysed as video.`),
1254
+ url: import_zod2.z.string().describe("Direct/public media file URL, pre-signed S3 URL, or a shareable social/video page link \u2014 page links are resolved to the underlying media server-side. See this tool's description for the platforms accepted. Pass the URL the user gave you as-is; do not try to convert it to a file URL first."),
1255
+ mediaType: import_zod2.z.enum([MediaType.AUDIO, MediaType.VIDEO]).optional().describe('Type of media: "audio" or "video". Send it whenever the user has told you which they want \u2014 if they called it an audio file, or asked for audio only, pass "audio"; if they called it a video, pass "video". Otherwise omit it and the server decides: it inspects the actual file for a direct URL, and picks the best track the platform offers for a page link. Do not guess from the URL, because sending a value stops the server inspecting the file, and a video imported as "audio" can never be analysed as video afterwards.'),
1448
1256
  description: import_zod2.z.string().optional().describe("Description of the media file"),
1449
1257
  sourceLanguage: import_zod2.z.string().optional().describe('BCP-47 language code for transcription, e.g. "en-US" or "he-IL"'),
1450
1258
  tags: import_zod2.z.string().optional().describe("Comma-separated tags for the media"),
@@ -1466,9 +1274,7 @@ function register(server, client) {
1466
1274
  },
1467
1275
  async (body) => {
1468
1276
  try {
1469
- const urlPath = body.url.split(/[?#]/)[0];
1470
- const mediaType = body.mediaType ?? detectMediaType(urlPath);
1471
- const result = await api.post("/v1/media/upload", { ...body, mediaType });
1277
+ const result = await api.post("/v1/media/upload", body);
1472
1278
  return {
1473
1279
  content: [
1474
1280
  { type: "text", text: JSON.stringify(result.data, null, 2) }
@@ -2052,7 +1858,7 @@ function register2(server, client) {
2052
1858
  readOnlyHint: false,
2053
1859
  destructiveHint: false,
2054
1860
  idempotentHint: false,
2055
- openWorldHint: true
1861
+ openWorldHint: false
2056
1862
  },
2057
1863
  async (body) => {
2058
1864
  try {
@@ -2116,7 +1922,7 @@ function register2(server, client) {
2116
1922
  },
2117
1923
  async ({ mediaId }) => {
2118
1924
  try {
2119
- const result = await api.get(`/v1/text/reanalyze/${mediaId}`);
1925
+ const result = await api.get(`/v1/media/reanalyze/${mediaId}`);
2120
1926
  return {
2121
1927
  content: [
2122
1928
  { type: "text", text: JSON.stringify(result.data, null, 2) }
@@ -2151,9 +1957,10 @@ function register2(server, client) {
2151
1957
  },
2152
1958
  async ({ mediaId, ...body }) => {
2153
1959
  try {
1960
+ const payload = body.text !== void 0 ? { ...body, rawText: body.text } : body;
2154
1961
  const result = await api.put(
2155
1962
  `/v1/text/update/${mediaId}`,
2156
- body
1963
+ payload
2157
1964
  );
2158
1965
  return {
2159
1966
  content: [
@@ -2718,7 +2525,7 @@ function register5(server, client) {
2718
2525
  readOnlyHint: false,
2719
2526
  destructiveHint: false,
2720
2527
  idempotentHint: false,
2721
- openWorldHint: true
2528
+ openWorldHint: false
2722
2529
  },
2723
2530
  async (body) => {
2724
2531
  try {
@@ -2779,7 +2586,7 @@ function register5(server, client) {
2779
2586
  readOnlyHint: false,
2780
2587
  destructiveHint: false,
2781
2588
  idempotentHint: false,
2782
- openWorldHint: true
2589
+ openWorldHint: false
2783
2590
  },
2784
2591
  async (body) => {
2785
2592
  try {
@@ -2893,7 +2700,7 @@ function register5(server, client) {
2893
2700
  readOnlyHint: false,
2894
2701
  destructiveHint: false,
2895
2702
  idempotentHint: true,
2896
- openWorldHint: true
2703
+ openWorldHint: false
2897
2704
  },
2898
2705
  async ({ recorderId, ...body }) => {
2899
2706
  try {
@@ -2929,7 +2736,7 @@ function register5(server, client) {
2929
2736
  readOnlyHint: false,
2930
2737
  destructiveHint: true,
2931
2738
  idempotentHint: true,
2932
- openWorldHint: true
2739
+ openWorldHint: false
2933
2740
  },
2934
2741
  async ({ recorderId, ...body }) => {
2935
2742
  try {
@@ -2957,7 +2764,7 @@ function register5(server, client) {
2957
2764
  readOnlyHint: false,
2958
2765
  destructiveHint: true,
2959
2766
  idempotentHint: true,
2960
- openWorldHint: true
2767
+ openWorldHint: false
2961
2768
  },
2962
2769
  async ({ recorderId }) => {
2963
2770
  try {
@@ -3030,7 +2837,7 @@ function register6(server, client) {
3030
2837
  readOnlyHint: false,
3031
2838
  destructiveHint: false,
3032
2839
  idempotentHint: false,
3033
- openWorldHint: true
2840
+ openWorldHint: false
3034
2841
  },
3035
2842
  async (body) => {
3036
2843
  try {
@@ -3049,13 +2856,14 @@ function register6(server, client) {
3049
2856
  registerSpeakTool(
3050
2857
  server,
3051
2858
  "update_embed",
3052
- "Update an existing embed widget \u2014 appearance/feature toggles via `meta`, plus scope and privacy.",
2859
+ "Update an existing embed widget \u2014 appearance/feature toggles via `meta`, plus scope and privacy. Setting `privacyMode` clears any existing password unless a new one is supplied in the same call.",
3053
2860
  {
3054
2861
  embedId: import_zod7.z.string().min(1).describe("Unique identifier of the embed"),
3055
2862
  mediaId: import_zod7.z.string().optional().describe("Media file the embed points to"),
3056
- folderIds: import_zod7.z.array(import_zod7.z.string()).optional().describe("Folder IDs the embed covers"),
3057
- privacyMode: import_zod7.z.string().optional().describe("Privacy mode for the embed"),
3058
- embedType: import_zod7.z.string().optional().describe("Embed type"),
2863
+ privacyMode: import_zod7.z.string().optional().describe(
2864
+ "Privacy mode for the embed. Changing this clears the existing password unless `password` is also supplied in the same call."
2865
+ ),
2866
+ password: import_zod7.z.string().optional().describe("Password to protect the embed with when privacyMode is private. Only applied when privacyMode is also sent."),
3059
2867
  meta: import_zod7.z.record(import_zod7.z.unknown()).optional().describe(
3060
2868
  "Embed appearance & feature toggles: { backgroundImg, logo, primaryColor, titleColor, chatWelcomeMessage, assistantTemplateId, isTitle, isDescription, isRemarks, isDataVizDownloadable, isSEOIndexing, isPromptAsk, isPromptHistory, isMediaExport, callToActionButtons:[{ url, label }], features:[{ name, isActive, isCustom? }] }"
3061
2869
  )
@@ -3063,9 +2871,9 @@ function register6(server, client) {
3063
2871
  {
3064
2872
  title: "Update Embed Widget",
3065
2873
  readOnlyHint: false,
3066
- destructiveHint: false,
2874
+ destructiveHint: true,
3067
2875
  idempotentHint: true,
3068
- openWorldHint: true
2876
+ openWorldHint: false
3069
2877
  },
3070
2878
  async ({ embedId, ...body }) => {
3071
2879
  try {
@@ -4268,7 +4076,7 @@ function register10(server, client) {
4268
4076
  readOnlyHint: false,
4269
4077
  destructiveHint: false,
4270
4078
  idempotentHint: false,
4271
- openWorldHint: true
4079
+ openWorldHint: false
4272
4080
  },
4273
4081
  async (body) => {
4274
4082
  try {
@@ -4304,7 +4112,7 @@ function register10(server, client) {
4304
4112
  readOnlyHint: false,
4305
4113
  destructiveHint: true,
4306
4114
  idempotentHint: true,
4307
- openWorldHint: true
4115
+ openWorldHint: false
4308
4116
  },
4309
4117
  async ({ automationId, ...body }) => {
4310
4118
  try {
@@ -4338,7 +4146,7 @@ function register10(server, client) {
4338
4146
  readOnlyHint: false,
4339
4147
  destructiveHint: false,
4340
4148
  idempotentHint: false,
4341
- openWorldHint: true
4149
+ openWorldHint: false
4342
4150
  },
4343
4151
  async ({ automationId }) => {
4344
4152
  try {
@@ -4367,7 +4175,7 @@ function register10(server, client) {
4367
4175
  readOnlyHint: false,
4368
4176
  destructiveHint: false,
4369
4177
  idempotentHint: true,
4370
- openWorldHint: true
4178
+ openWorldHint: false
4371
4179
  },
4372
4180
  async (body) => {
4373
4181
  try {
@@ -4396,7 +4204,7 @@ function register10(server, client) {
4396
4204
  readOnlyHint: false,
4397
4205
  destructiveHint: true,
4398
4206
  idempotentHint: true,
4399
- openWorldHint: true
4207
+ openWorldHint: false
4400
4208
  },
4401
4209
  async (body) => {
4402
4210
  try {
@@ -4661,7 +4469,7 @@ function register11(server, client) {
4661
4469
  registerSpeakTool(
4662
4470
  server,
4663
4471
  "update_webhook",
4664
- "Update an existing webhook. This replaces the webhook config, so `callbackUrl` must always be supplied.",
4472
+ "Update an existing webhook. This is a partial update \u2014 only the fields you supply are changed; `callbackUrl` is always required, the rest are left untouched if omitted.",
4665
4473
  {
4666
4474
  webhookId: import_zod12.z.string().min(1).describe("Unique identifier of the webhook"),
4667
4475
  callbackUrl: import_zod12.z.string().url().describe("HTTPS endpoint URL to receive webhook payloads"),
@@ -5134,9 +4942,9 @@ function register14(server, client) {
5134
4942
  {
5135
4943
  title: "Build Automation",
5136
4944
  readOnlyHint: false,
5137
- destructiveHint: false,
4945
+ destructiveHint: true,
5138
4946
  idempotentHint: false,
5139
- openWorldHint: true
4947
+ openWorldHint: false
5140
4948
  },
5141
4949
  async (args2) => {
5142
4950
  const { name, trigger, steps, automationId, description, isActive, orTriggers } = args2;
@@ -5385,11 +5193,13 @@ Likely cause: this server rejects filter rules on webhook payload fields (${data
5385
5193
  registerSpeakTool(
5386
5194
  server,
5387
5195
  "upload_and_analyze",
5388
- "Upload and transcribe media from a URL \u2014 a direct/public file URL, OR a shareable social/video link (YouTube, Instagram, TikTok, X, Facebook, Reddit, SoundCloud, and similar), which Speak resolves to the underlying media automatically. Returns media_id immediately; after this returns, poll get_media_status until state is 'processed' (typically 1-3 min for under 60min audio), then call get_media_insights for AI summaries. This async pattern is required for remote MCP transports \u2014 long blocking calls die at proxy idle timeouts. (Vimeo links are not yet supported.)",
5196
+ `Upload and transcribe media from a URL \u2014 a direct/public file URL, OR a shareable social/video page link, which Speak resolves to the underlying media automatically. Supported page links: ${SUPPORTED_URL_SOURCES}. ${UNSUPPORTED_URL_SOURCES} Returns media_id immediately; after this returns, poll get_media_status until state is 'processed' (typically 1-3 min for under 60min audio), then call get_media_insights for AI summaries. This async pattern is required for remote MCP transports \u2014 long blocking calls die at proxy idle timeouts.`,
5389
5197
  {
5390
- url: import_zod15.z.string().describe("Direct/public media file URL, or a shareable social/video page link (e.g. an Instagram reel, TikTok, YouTube, or X post URL) \u2014 page links are resolved to the underlying media server-side. Pass the URL the user gave you as-is."),
5198
+ // A plain literal, not a template: the docs generator drops a tool's whole parameter
5199
+ // table when a description interpolates a value it cannot resolve statically.
5200
+ url: import_zod15.z.string().describe("Direct/public media file URL, or a shareable social/video page link \u2014 page links are resolved to the underlying media server-side. See this tool's description for the platforms accepted. Pass the URL the user gave you as-is; do not try to convert it to a file URL first."),
5391
5201
  name: import_zod15.z.string().optional().describe("Display name for the media (defaults to filename from URL)"),
5392
- mediaType: import_zod15.z.enum([MediaType.AUDIO, MediaType.VIDEO]).optional().describe("Media type (default: audio)"),
5202
+ mediaType: import_zod15.z.enum([MediaType.AUDIO, MediaType.VIDEO]).optional().describe('Type of media: "audio" or "video". Send it whenever the user has told you which they want \u2014 if they called it an audio file, or asked for audio only, pass "audio"; if they called it a video, pass "video". Otherwise omit it and the server decides: it inspects the actual file for a direct URL, and picks the best track the platform offers for a page link. Do not guess from the URL, because sending a value stops the server inspecting the file, and a video imported as "audio" can never be analysed as video afterwards.'),
5393
5203
  sourceLanguage: import_zod15.z.string().optional().describe("BCP-47 language code (e.g., 'en-US', 'he-IL')"),
5394
5204
  folderId: import_zod15.z.string().optional().describe("Folder ID to place the media in"),
5395
5205
  tags: import_zod15.z.string().optional().describe("Comma-separated tags")
@@ -5405,9 +5215,9 @@ Likely cause: this server rejects filter rules on webhook payload fields (${data
5405
5215
  try {
5406
5216
  const uploadBody = {
5407
5217
  name: params.name ?? params.url.split("/").pop()?.split("?")[0] ?? "Upload",
5408
- url: params.url,
5409
- mediaType: params.mediaType ?? "audio"
5218
+ url: params.url
5410
5219
  };
5220
+ if (params.mediaType) uploadBody.mediaType = params.mediaType;
5411
5221
  if (params.sourceLanguage) uploadBody.sourceLanguage = params.sourceLanguage;
5412
5222
  if (params.folderId) uploadBody.folderId = params.folderId;
5413
5223
  if (params.tags) uploadBody.tags = params.tags;
@@ -5442,6 +5252,84 @@ ${JSON.stringify(uploadRes.data, null, 2)}` }],
5442
5252
  }
5443
5253
  }
5444
5254
  );
5255
+ registerSpeakTool(
5256
+ server,
5257
+ "upload_and_analyze_batch",
5258
+ `Upload several URLs in one call \u2014 the batch form of upload_and_analyze, for when someone hands you a list of links. Takes up to ${MAX_BATCH_URLS} URLs and starts at most ${MAX_BATCH_CONCURRENCY} at a time so a long list does not hammer the API. Each URL may be a direct/public file URL or a shareable social/video page link. Supported page links: ${SUPPORTED_URL_SOURCES}. ${UNSUPPORTED_URL_SOURCES} One URL failing does not stop the rest: every URL is reported individually as uploaded or failed, with its reason. Returns as soon as the uploads are accepted, so poll get_media_status per mediaId, or list_media on the folder, to follow processing. Prefer this over calling upload_and_analyze in a loop.`,
5259
+ {
5260
+ urls: import_zod15.z.array(import_zod15.z.string().min(1)).min(1).max(MAX_BATCH_URLS).describe("The URLs to import, up to 25. Pass each one exactly as the user gave it; page links are resolved server-side. Duplicates are uploaded once."),
5261
+ mediaType: import_zod15.z.enum([MediaType.AUDIO, MediaType.VIDEO]).optional().describe('Applies to every URL in the batch. Send it only when the user has said which they want for all of them \u2014 "audio" if they asked for audio only, "video" if they called them videos. Otherwise omit it and the server decides per URL. Mixed batches: leave it off, or split into two calls.'),
5262
+ folderId: import_zod15.z.string().optional().describe("Folder ID for every upload in the batch"),
5263
+ sourceLanguage: import_zod15.z.string().optional().describe('BCP-47 language code applied to every upload, e.g. "en-US"'),
5264
+ tags: import_zod15.z.string().optional().describe("Comma-separated tags applied to every upload"),
5265
+ concurrency: import_zod15.z.number().int().min(1).max(MAX_BATCH_CONCURRENCY).optional().describe("How many uploads to start at once, 1 to 5. Defaults to 5. Drop it to 1 to import strictly in order.")
5266
+ },
5267
+ {
5268
+ title: "Upload and Analyze Several URLs",
5269
+ readOnlyHint: false,
5270
+ destructiveHint: false,
5271
+ idempotentHint: false,
5272
+ openWorldHint: true
5273
+ },
5274
+ async (params) => {
5275
+ const urls = [...new Set(params.urls.map((u) => u.trim()).filter(Boolean))];
5276
+ if (urls.length === 0) {
5277
+ return { content: [{ type: "text", text: "Error: no usable URLs after trimming." }], isError: true };
5278
+ }
5279
+ const shared = {};
5280
+ if (params.mediaType) shared.mediaType = params.mediaType;
5281
+ if (params.sourceLanguage) shared.sourceLanguage = params.sourceLanguage;
5282
+ if (params.folderId) shared.folderId = params.folderId;
5283
+ if (params.tags) shared.tags = params.tags;
5284
+ const uploaded = [];
5285
+ const failed = [];
5286
+ let cursor = 0;
5287
+ const workerCount = Math.min(params.concurrency ?? MAX_BATCH_CONCURRENCY, urls.length);
5288
+ const send = (url) => api.post("/v1/media/upload", {
5289
+ ...shared,
5290
+ name: url.split("/").pop()?.split("?")[0] || "Upload",
5291
+ url
5292
+ });
5293
+ const worker = async () => {
5294
+ for (let i = cursor++; i < urls.length; i = cursor++) {
5295
+ const url = urls[i];
5296
+ try {
5297
+ let res;
5298
+ try {
5299
+ res = await send(url);
5300
+ } catch (err) {
5301
+ const message = formatAxiosError(err);
5302
+ if (!isRateLimited(message)) throw err;
5303
+ await new Promise((r) => setTimeout(r, RATE_LIMIT_RETRY_DELAY_MS));
5304
+ res = await send(url);
5305
+ }
5306
+ const mediaId = res.data?.data?.mediaId;
5307
+ if (mediaId) uploaded.push({ url, mediaId, state: res.data?.data?.state ?? "pending" });
5308
+ else failed.push({ url, error: "Upload accepted but no mediaId was returned." });
5309
+ } catch (err) {
5310
+ failed.push({ url, error: formatAxiosError(err) });
5311
+ }
5312
+ }
5313
+ };
5314
+ await Promise.all(Array.from({ length: workerCount }, worker));
5315
+ const result = {
5316
+ requested: urls.length,
5317
+ uploaded: uploaded.length,
5318
+ failed: failed.length,
5319
+ media: uploaded,
5320
+ errors: failed,
5321
+ nextSteps: uploaded.length ? [
5322
+ `1. Poll get_media_status for each of the ${uploaded.length} mediaId values every 10-30 seconds, or call list_media on the folder to see them together.`,
5323
+ `2. When one reads "processed", call get_media_insights and get_transcript for it.`,
5324
+ failed.length ? `3. ${failed.length} URL(s) did not upload \u2014 report the reasons above rather than silently retrying.` : `3. Nothing failed in this batch.`
5325
+ ] : ["No uploads were accepted. Report the errors above to the user."]
5326
+ };
5327
+ return {
5328
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
5329
+ ...uploaded.length === 0 ? { isError: true } : {}
5330
+ };
5331
+ }
5332
+ );
5445
5333
  registerSpeakTool(
5446
5334
  server,
5447
5335
  "upload_local_file",
@@ -5476,11 +5364,10 @@ ${JSON.stringify(uploadRes.data, null, 2)}` }],
5476
5364
  };
5477
5365
  }
5478
5366
  const filename = path2.basename(filePath);
5479
- const isVideo = isVideoFile(filePath);
5480
5367
  const mediaType = params.mediaType ?? detectMediaType(filePath);
5481
5368
  const mimeType = getMimeType(filePath);
5482
5369
  const signedRes = await api.get("/v1/media/upload/signedurl", {
5483
- params: { isVideo, filename, mimeType }
5370
+ params: { mediaType, filename, mimeType }
5484
5371
  });
5485
5372
  const signedData = signedRes.data?.data;
5486
5373
  const uploadUrl = signedData?.preSignedUrl ?? signedData?.signedUrl ?? signedData?.url;
@@ -5536,7 +5423,7 @@ ${JSON.stringify(signedRes.data, null, 2)}` }],
5536
5423
  }
5537
5424
  );
5538
5425
  }
5539
- var import_zod15, fs, path2, CANONICAL_FILTER_FIELDS, ID_PATTERN, TRIGGER_SPEC_DESCRIPTION, STEP_SPEC_DESCRIPTION, buildAutomationSchema;
5426
+ var import_zod15, fs, path2, MAX_BATCH_URLS, MAX_BATCH_CONCURRENCY, RATE_LIMIT_RETRY_DELAY_MS, isRateLimited, CANONICAL_FILTER_FIELDS, ID_PATTERN, TRIGGER_SPEC_DESCRIPTION, STEP_SPEC_DESCRIPTION, buildAutomationSchema;
5540
5427
  var init_workflows = __esm({
5541
5428
  "src/tools/workflows.ts"() {
5542
5429
  "use strict";
@@ -5549,6 +5436,10 @@ var init_workflows = __esm({
5549
5436
  init_media_utils();
5550
5437
  init_capabilities();
5551
5438
  init_inbound_webhook_utils();
5439
+ MAX_BATCH_URLS = 25;
5440
+ MAX_BATCH_CONCURRENCY = 5;
5441
+ RATE_LIMIT_RETRY_DELAY_MS = 5e3;
5442
+ isRateLimited = (message) => /rate limit|too many requests|\b429\b/i.test(message);
5552
5443
  CANONICAL_FILTER_FIELDS = /* @__PURE__ */ new Set([
5553
5444
  "name",
5554
5445
  "duration",
@@ -6383,7 +6274,7 @@ function register16(server, client) {
6383
6274
  readOnlyHint: false,
6384
6275
  destructiveHint: false,
6385
6276
  idempotentHint: true,
6386
- openWorldHint: true
6277
+ openWorldHint: false
6387
6278
  },
6388
6279
  async ({ dashboardId }) => {
6389
6280
  try {
@@ -6671,7 +6562,7 @@ function registerPrompts(server) {
6671
6562
  "analyze-meeting",
6672
6563
  "Upload a meeting recording and get a full analysis \u2014 transcript, insights, action items, and key takeaways.",
6673
6564
  {
6674
- url: import_zod18.z.string().describe("URL of the meeting recording \u2014 a direct file link or a shareable social/video link (resolved automatically)"),
6565
+ url: import_zod18.z.string().describe(`URL of the meeting recording \u2014 a direct file link, or a shareable page link from ${SUPPORTED_URL_SOURCES} (resolved to the underlying media automatically)`),
6675
6566
  name: import_zod18.z.string().optional().describe("Meeting name (optional)")
6676
6567
  },
6677
6568
  async ({ url, name }) => ({
@@ -6693,7 +6584,10 @@ function registerPrompts(server) {
6693
6584
  ` - Open questions or follow-ups needed`,
6694
6585
  ` - Overall sentiment`,
6695
6586
  ``,
6696
- `Use upload_and_analyze to handle the upload and processing in one step.`
6587
+ `Use upload_and_analyze to handle the upload and processing in one step. Pass the URL`,
6588
+ `exactly as given \u2014 a page link is resolved server-side. If I told you whether this is`,
6589
+ `an audio or a video recording, pass that as mediaType; if I did not say, leave it off`,
6590
+ `and let the server pick the best available track.`
6697
6591
  ].join("\n")
6698
6592
  }
6699
6593
  }
@@ -6781,6 +6675,7 @@ var init_prompts = __esm({
6781
6675
  "src/prompts.ts"() {
6782
6676
  "use strict";
6783
6677
  import_zod18 = require("zod");
6678
+ init_media_utils();
6784
6679
  }
6785
6680
  });
6786
6681
 
@@ -6906,6 +6801,7 @@ var init_tool_names = __esm({
6906
6801
  // workflows (high-level wrappers around media + upload + automation tools)
6907
6802
  "build_automation",
6908
6803
  "upload_and_analyze",
6804
+ "upload_and_analyze_batch",
6909
6805
  "upload_local_file",
6910
6806
  // users / team management
6911
6807
  "list_users",
@@ -7362,11 +7258,10 @@ function createCli() {
7362
7258
  let state;
7363
7259
  if (isLocalFile) {
7364
7260
  const filename = pathMod.basename(source);
7365
- const isVideo = isVideoFile(source);
7366
7261
  const mediaType = opts.type ?? detectMediaType(source);
7367
7262
  const mimeType = getMimeType(source);
7368
7263
  const signedRes = await client.get("/v1/media/upload/signedurl", {
7369
- params: { isVideo, filename, mimeType }
7264
+ params: { mediaType, filename, mimeType }
7370
7265
  });
7371
7266
  const signedData = signedRes.data?.data;
7372
7267
  const uploadUrl = signedData?.signedUrl ?? signedData?.url;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@speakai/mcp-server",
3
- "version": "1.23.1",
3
+ "version": "1.24.3",
4
4
  "mcpName": "io.github.speakai/mcp-server",
5
5
  "description": "Official Speak AI MCP Server — capture meetings, search thousands of recordings, run async voice and video surveys, create clips, and automate workflows from your AI assistant.",
6
6
  "homepage": "https://docs.speakai.co/mcp",