@speakai/mcp-server 1.23.1 → 1.24.1
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/README.md +6 -5
- package/dist/index.js +126 -233
- 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
|
|
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 (
|
|
397
|
+
### MCP Tools (114)
|
|
398
398
|
|
|
399
399
|
<details>
|
|
400
|
-
<summary>Media (
|
|
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,
|
|
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
|
|
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,
|
|
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
|
-
|
|
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 ({
|
|
1228
|
+
async ({ mediaType, filename, mimeType }) => {
|
|
1421
1229
|
try {
|
|
1422
|
-
const
|
|
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: {
|
|
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
|
-
|
|
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
|
|
1447
|
-
mediaType: import_zod2.z.enum([MediaType.AUDIO, MediaType.VIDEO]).optional().describe(
|
|
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
|
|
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:
|
|
1861
|
+
openWorldHint: false
|
|
2056
1862
|
},
|
|
2057
1863
|
async (body) => {
|
|
2058
1864
|
try {
|
|
@@ -2718,7 +2524,7 @@ function register5(server, client) {
|
|
|
2718
2524
|
readOnlyHint: false,
|
|
2719
2525
|
destructiveHint: false,
|
|
2720
2526
|
idempotentHint: false,
|
|
2721
|
-
openWorldHint:
|
|
2527
|
+
openWorldHint: false
|
|
2722
2528
|
},
|
|
2723
2529
|
async (body) => {
|
|
2724
2530
|
try {
|
|
@@ -2779,7 +2585,7 @@ function register5(server, client) {
|
|
|
2779
2585
|
readOnlyHint: false,
|
|
2780
2586
|
destructiveHint: false,
|
|
2781
2587
|
idempotentHint: false,
|
|
2782
|
-
openWorldHint:
|
|
2588
|
+
openWorldHint: false
|
|
2783
2589
|
},
|
|
2784
2590
|
async (body) => {
|
|
2785
2591
|
try {
|
|
@@ -2893,7 +2699,7 @@ function register5(server, client) {
|
|
|
2893
2699
|
readOnlyHint: false,
|
|
2894
2700
|
destructiveHint: false,
|
|
2895
2701
|
idempotentHint: true,
|
|
2896
|
-
openWorldHint:
|
|
2702
|
+
openWorldHint: false
|
|
2897
2703
|
},
|
|
2898
2704
|
async ({ recorderId, ...body }) => {
|
|
2899
2705
|
try {
|
|
@@ -2929,7 +2735,7 @@ function register5(server, client) {
|
|
|
2929
2735
|
readOnlyHint: false,
|
|
2930
2736
|
destructiveHint: true,
|
|
2931
2737
|
idempotentHint: true,
|
|
2932
|
-
openWorldHint:
|
|
2738
|
+
openWorldHint: false
|
|
2933
2739
|
},
|
|
2934
2740
|
async ({ recorderId, ...body }) => {
|
|
2935
2741
|
try {
|
|
@@ -2957,7 +2763,7 @@ function register5(server, client) {
|
|
|
2957
2763
|
readOnlyHint: false,
|
|
2958
2764
|
destructiveHint: true,
|
|
2959
2765
|
idempotentHint: true,
|
|
2960
|
-
openWorldHint:
|
|
2766
|
+
openWorldHint: false
|
|
2961
2767
|
},
|
|
2962
2768
|
async ({ recorderId }) => {
|
|
2963
2769
|
try {
|
|
@@ -3030,7 +2836,7 @@ function register6(server, client) {
|
|
|
3030
2836
|
readOnlyHint: false,
|
|
3031
2837
|
destructiveHint: false,
|
|
3032
2838
|
idempotentHint: false,
|
|
3033
|
-
openWorldHint:
|
|
2839
|
+
openWorldHint: false
|
|
3034
2840
|
},
|
|
3035
2841
|
async (body) => {
|
|
3036
2842
|
try {
|
|
@@ -3065,7 +2871,7 @@ function register6(server, client) {
|
|
|
3065
2871
|
readOnlyHint: false,
|
|
3066
2872
|
destructiveHint: false,
|
|
3067
2873
|
idempotentHint: true,
|
|
3068
|
-
openWorldHint:
|
|
2874
|
+
openWorldHint: false
|
|
3069
2875
|
},
|
|
3070
2876
|
async ({ embedId, ...body }) => {
|
|
3071
2877
|
try {
|
|
@@ -4268,7 +4074,7 @@ function register10(server, client) {
|
|
|
4268
4074
|
readOnlyHint: false,
|
|
4269
4075
|
destructiveHint: false,
|
|
4270
4076
|
idempotentHint: false,
|
|
4271
|
-
openWorldHint:
|
|
4077
|
+
openWorldHint: false
|
|
4272
4078
|
},
|
|
4273
4079
|
async (body) => {
|
|
4274
4080
|
try {
|
|
@@ -4304,7 +4110,7 @@ function register10(server, client) {
|
|
|
4304
4110
|
readOnlyHint: false,
|
|
4305
4111
|
destructiveHint: true,
|
|
4306
4112
|
idempotentHint: true,
|
|
4307
|
-
openWorldHint:
|
|
4113
|
+
openWorldHint: false
|
|
4308
4114
|
},
|
|
4309
4115
|
async ({ automationId, ...body }) => {
|
|
4310
4116
|
try {
|
|
@@ -4338,7 +4144,7 @@ function register10(server, client) {
|
|
|
4338
4144
|
readOnlyHint: false,
|
|
4339
4145
|
destructiveHint: false,
|
|
4340
4146
|
idempotentHint: false,
|
|
4341
|
-
openWorldHint:
|
|
4147
|
+
openWorldHint: false
|
|
4342
4148
|
},
|
|
4343
4149
|
async ({ automationId }) => {
|
|
4344
4150
|
try {
|
|
@@ -4367,7 +4173,7 @@ function register10(server, client) {
|
|
|
4367
4173
|
readOnlyHint: false,
|
|
4368
4174
|
destructiveHint: false,
|
|
4369
4175
|
idempotentHint: true,
|
|
4370
|
-
openWorldHint:
|
|
4176
|
+
openWorldHint: false
|
|
4371
4177
|
},
|
|
4372
4178
|
async (body) => {
|
|
4373
4179
|
try {
|
|
@@ -4396,7 +4202,7 @@ function register10(server, client) {
|
|
|
4396
4202
|
readOnlyHint: false,
|
|
4397
4203
|
destructiveHint: true,
|
|
4398
4204
|
idempotentHint: true,
|
|
4399
|
-
openWorldHint:
|
|
4205
|
+
openWorldHint: false
|
|
4400
4206
|
},
|
|
4401
4207
|
async (body) => {
|
|
4402
4208
|
try {
|
|
@@ -5136,7 +4942,7 @@ function register14(server, client) {
|
|
|
5136
4942
|
readOnlyHint: false,
|
|
5137
4943
|
destructiveHint: false,
|
|
5138
4944
|
idempotentHint: false,
|
|
5139
|
-
openWorldHint:
|
|
4945
|
+
openWorldHint: false
|
|
5140
4946
|
},
|
|
5141
4947
|
async (args2) => {
|
|
5142
4948
|
const { name, trigger, steps, automationId, description, isActive, orTriggers } = args2;
|
|
@@ -5385,11 +5191,13 @@ Likely cause: this server rejects filter rules on webhook payload fields (${data
|
|
|
5385
5191
|
registerSpeakTool(
|
|
5386
5192
|
server,
|
|
5387
5193
|
"upload_and_analyze",
|
|
5388
|
-
|
|
5194
|
+
`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
5195
|
{
|
|
5390
|
-
|
|
5196
|
+
// A plain literal, not a template: the docs generator drops a tool's whole parameter
|
|
5197
|
+
// table when a description interpolates a value it cannot resolve statically.
|
|
5198
|
+
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
5199
|
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("
|
|
5200
|
+
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
5201
|
sourceLanguage: import_zod15.z.string().optional().describe("BCP-47 language code (e.g., 'en-US', 'he-IL')"),
|
|
5394
5202
|
folderId: import_zod15.z.string().optional().describe("Folder ID to place the media in"),
|
|
5395
5203
|
tags: import_zod15.z.string().optional().describe("Comma-separated tags")
|
|
@@ -5405,9 +5213,9 @@ Likely cause: this server rejects filter rules on webhook payload fields (${data
|
|
|
5405
5213
|
try {
|
|
5406
5214
|
const uploadBody = {
|
|
5407
5215
|
name: params.name ?? params.url.split("/").pop()?.split("?")[0] ?? "Upload",
|
|
5408
|
-
url: params.url
|
|
5409
|
-
mediaType: params.mediaType ?? "audio"
|
|
5216
|
+
url: params.url
|
|
5410
5217
|
};
|
|
5218
|
+
if (params.mediaType) uploadBody.mediaType = params.mediaType;
|
|
5411
5219
|
if (params.sourceLanguage) uploadBody.sourceLanguage = params.sourceLanguage;
|
|
5412
5220
|
if (params.folderId) uploadBody.folderId = params.folderId;
|
|
5413
5221
|
if (params.tags) uploadBody.tags = params.tags;
|
|
@@ -5442,6 +5250,84 @@ ${JSON.stringify(uploadRes.data, null, 2)}` }],
|
|
|
5442
5250
|
}
|
|
5443
5251
|
}
|
|
5444
5252
|
);
|
|
5253
|
+
registerSpeakTool(
|
|
5254
|
+
server,
|
|
5255
|
+
"upload_and_analyze_batch",
|
|
5256
|
+
`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.`,
|
|
5257
|
+
{
|
|
5258
|
+
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."),
|
|
5259
|
+
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.'),
|
|
5260
|
+
folderId: import_zod15.z.string().optional().describe("Folder ID for every upload in the batch"),
|
|
5261
|
+
sourceLanguage: import_zod15.z.string().optional().describe('BCP-47 language code applied to every upload, e.g. "en-US"'),
|
|
5262
|
+
tags: import_zod15.z.string().optional().describe("Comma-separated tags applied to every upload"),
|
|
5263
|
+
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.")
|
|
5264
|
+
},
|
|
5265
|
+
{
|
|
5266
|
+
title: "Upload and Analyze Several URLs",
|
|
5267
|
+
readOnlyHint: false,
|
|
5268
|
+
destructiveHint: false,
|
|
5269
|
+
idempotentHint: false,
|
|
5270
|
+
openWorldHint: true
|
|
5271
|
+
},
|
|
5272
|
+
async (params) => {
|
|
5273
|
+
const urls = [...new Set(params.urls.map((u) => u.trim()).filter(Boolean))];
|
|
5274
|
+
if (urls.length === 0) {
|
|
5275
|
+
return { content: [{ type: "text", text: "Error: no usable URLs after trimming." }], isError: true };
|
|
5276
|
+
}
|
|
5277
|
+
const shared = {};
|
|
5278
|
+
if (params.mediaType) shared.mediaType = params.mediaType;
|
|
5279
|
+
if (params.sourceLanguage) shared.sourceLanguage = params.sourceLanguage;
|
|
5280
|
+
if (params.folderId) shared.folderId = params.folderId;
|
|
5281
|
+
if (params.tags) shared.tags = params.tags;
|
|
5282
|
+
const uploaded = [];
|
|
5283
|
+
const failed = [];
|
|
5284
|
+
let cursor = 0;
|
|
5285
|
+
const workerCount = Math.min(params.concurrency ?? MAX_BATCH_CONCURRENCY, urls.length);
|
|
5286
|
+
const send = (url) => api.post("/v1/media/upload", {
|
|
5287
|
+
...shared,
|
|
5288
|
+
name: url.split("/").pop()?.split("?")[0] || "Upload",
|
|
5289
|
+
url
|
|
5290
|
+
});
|
|
5291
|
+
const worker = async () => {
|
|
5292
|
+
for (let i = cursor++; i < urls.length; i = cursor++) {
|
|
5293
|
+
const url = urls[i];
|
|
5294
|
+
try {
|
|
5295
|
+
let res;
|
|
5296
|
+
try {
|
|
5297
|
+
res = await send(url);
|
|
5298
|
+
} catch (err) {
|
|
5299
|
+
const message = formatAxiosError(err);
|
|
5300
|
+
if (!isRateLimited(message)) throw err;
|
|
5301
|
+
await new Promise((r) => setTimeout(r, RATE_LIMIT_RETRY_DELAY_MS));
|
|
5302
|
+
res = await send(url);
|
|
5303
|
+
}
|
|
5304
|
+
const mediaId = res.data?.data?.mediaId;
|
|
5305
|
+
if (mediaId) uploaded.push({ url, mediaId, state: res.data?.data?.state ?? "pending" });
|
|
5306
|
+
else failed.push({ url, error: "Upload accepted but no mediaId was returned." });
|
|
5307
|
+
} catch (err) {
|
|
5308
|
+
failed.push({ url, error: formatAxiosError(err) });
|
|
5309
|
+
}
|
|
5310
|
+
}
|
|
5311
|
+
};
|
|
5312
|
+
await Promise.all(Array.from({ length: workerCount }, worker));
|
|
5313
|
+
const result = {
|
|
5314
|
+
requested: urls.length,
|
|
5315
|
+
uploaded: uploaded.length,
|
|
5316
|
+
failed: failed.length,
|
|
5317
|
+
media: uploaded,
|
|
5318
|
+
errors: failed,
|
|
5319
|
+
nextSteps: uploaded.length ? [
|
|
5320
|
+
`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.`,
|
|
5321
|
+
`2. When one reads "processed", call get_media_insights and get_transcript for it.`,
|
|
5322
|
+
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.`
|
|
5323
|
+
] : ["No uploads were accepted. Report the errors above to the user."]
|
|
5324
|
+
};
|
|
5325
|
+
return {
|
|
5326
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
5327
|
+
...uploaded.length === 0 ? { isError: true } : {}
|
|
5328
|
+
};
|
|
5329
|
+
}
|
|
5330
|
+
);
|
|
5445
5331
|
registerSpeakTool(
|
|
5446
5332
|
server,
|
|
5447
5333
|
"upload_local_file",
|
|
@@ -5476,11 +5362,10 @@ ${JSON.stringify(uploadRes.data, null, 2)}` }],
|
|
|
5476
5362
|
};
|
|
5477
5363
|
}
|
|
5478
5364
|
const filename = path2.basename(filePath);
|
|
5479
|
-
const isVideo = isVideoFile(filePath);
|
|
5480
5365
|
const mediaType = params.mediaType ?? detectMediaType(filePath);
|
|
5481
5366
|
const mimeType = getMimeType(filePath);
|
|
5482
5367
|
const signedRes = await api.get("/v1/media/upload/signedurl", {
|
|
5483
|
-
params: {
|
|
5368
|
+
params: { mediaType, filename, mimeType }
|
|
5484
5369
|
});
|
|
5485
5370
|
const signedData = signedRes.data?.data;
|
|
5486
5371
|
const uploadUrl = signedData?.preSignedUrl ?? signedData?.signedUrl ?? signedData?.url;
|
|
@@ -5536,7 +5421,7 @@ ${JSON.stringify(signedRes.data, null, 2)}` }],
|
|
|
5536
5421
|
}
|
|
5537
5422
|
);
|
|
5538
5423
|
}
|
|
5539
|
-
var import_zod15, fs, path2, CANONICAL_FILTER_FIELDS, ID_PATTERN, TRIGGER_SPEC_DESCRIPTION, STEP_SPEC_DESCRIPTION, buildAutomationSchema;
|
|
5424
|
+
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
5425
|
var init_workflows = __esm({
|
|
5541
5426
|
"src/tools/workflows.ts"() {
|
|
5542
5427
|
"use strict";
|
|
@@ -5549,6 +5434,10 @@ var init_workflows = __esm({
|
|
|
5549
5434
|
init_media_utils();
|
|
5550
5435
|
init_capabilities();
|
|
5551
5436
|
init_inbound_webhook_utils();
|
|
5437
|
+
MAX_BATCH_URLS = 25;
|
|
5438
|
+
MAX_BATCH_CONCURRENCY = 5;
|
|
5439
|
+
RATE_LIMIT_RETRY_DELAY_MS = 5e3;
|
|
5440
|
+
isRateLimited = (message) => /rate limit|too many requests|\b429\b/i.test(message);
|
|
5552
5441
|
CANONICAL_FILTER_FIELDS = /* @__PURE__ */ new Set([
|
|
5553
5442
|
"name",
|
|
5554
5443
|
"duration",
|
|
@@ -6383,7 +6272,7 @@ function register16(server, client) {
|
|
|
6383
6272
|
readOnlyHint: false,
|
|
6384
6273
|
destructiveHint: false,
|
|
6385
6274
|
idempotentHint: true,
|
|
6386
|
-
openWorldHint:
|
|
6275
|
+
openWorldHint: false
|
|
6387
6276
|
},
|
|
6388
6277
|
async ({ dashboardId }) => {
|
|
6389
6278
|
try {
|
|
@@ -6671,7 +6560,7 @@ function registerPrompts(server) {
|
|
|
6671
6560
|
"analyze-meeting",
|
|
6672
6561
|
"Upload a meeting recording and get a full analysis \u2014 transcript, insights, action items, and key takeaways.",
|
|
6673
6562
|
{
|
|
6674
|
-
url: import_zod18.z.string().describe(
|
|
6563
|
+
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
6564
|
name: import_zod18.z.string().optional().describe("Meeting name (optional)")
|
|
6676
6565
|
},
|
|
6677
6566
|
async ({ url, name }) => ({
|
|
@@ -6693,7 +6582,10 @@ function registerPrompts(server) {
|
|
|
6693
6582
|
` - Open questions or follow-ups needed`,
|
|
6694
6583
|
` - Overall sentiment`,
|
|
6695
6584
|
``,
|
|
6696
|
-
`Use upload_and_analyze to handle the upload and processing in one step
|
|
6585
|
+
`Use upload_and_analyze to handle the upload and processing in one step. Pass the URL`,
|
|
6586
|
+
`exactly as given \u2014 a page link is resolved server-side. If I told you whether this is`,
|
|
6587
|
+
`an audio or a video recording, pass that as mediaType; if I did not say, leave it off`,
|
|
6588
|
+
`and let the server pick the best available track.`
|
|
6697
6589
|
].join("\n")
|
|
6698
6590
|
}
|
|
6699
6591
|
}
|
|
@@ -6781,6 +6673,7 @@ var init_prompts = __esm({
|
|
|
6781
6673
|
"src/prompts.ts"() {
|
|
6782
6674
|
"use strict";
|
|
6783
6675
|
import_zod18 = require("zod");
|
|
6676
|
+
init_media_utils();
|
|
6784
6677
|
}
|
|
6785
6678
|
});
|
|
6786
6679
|
|
|
@@ -6906,6 +6799,7 @@ var init_tool_names = __esm({
|
|
|
6906
6799
|
// workflows (high-level wrappers around media + upload + automation tools)
|
|
6907
6800
|
"build_automation",
|
|
6908
6801
|
"upload_and_analyze",
|
|
6802
|
+
"upload_and_analyze_batch",
|
|
6909
6803
|
"upload_local_file",
|
|
6910
6804
|
// users / team management
|
|
6911
6805
|
"list_users",
|
|
@@ -7362,11 +7256,10 @@ function createCli() {
|
|
|
7362
7256
|
let state;
|
|
7363
7257
|
if (isLocalFile) {
|
|
7364
7258
|
const filename = pathMod.basename(source);
|
|
7365
|
-
const isVideo = isVideoFile(source);
|
|
7366
7259
|
const mediaType = opts.type ?? detectMediaType(source);
|
|
7367
7260
|
const mimeType = getMimeType(source);
|
|
7368
7261
|
const signedRes = await client.get("/v1/media/upload/signedurl", {
|
|
7369
|
-
params: {
|
|
7262
|
+
params: { mediaType, filename, mimeType }
|
|
7370
7263
|
});
|
|
7371
7264
|
const signedData = signedRes.data?.data;
|
|
7372
7265
|
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.
|
|
3
|
+
"version": "1.24.1",
|
|
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",
|