@kolbo/mcp 1.84.3 → 1.85.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.js +2 -0
- package/src/toolAnnotations.js +1 -0
- package/src/tools/_shared.js +2 -1
- package/src/tools/analyze.js +50 -0
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -77,6 +77,7 @@ const { registerVoiceTools } = require('./tools/voices');
|
|
|
77
77
|
const { registerMusicLibraryTools } = require('./tools/music_library');
|
|
78
78
|
const { registerStockLibraryTools } = require('./tools/stock_library');
|
|
79
79
|
const { registerAudioStemTools } = require('./tools/audio_stems');
|
|
80
|
+
const { registerAnalyzeTools } = require('./tools/analyze');
|
|
80
81
|
const { registerBlenderTools } = require('./tools/blender');
|
|
81
82
|
const { registerApps, attachToolWidgetMeta } = require('./apps');
|
|
82
83
|
const { attachToolAnnotations } = require('./toolAnnotations');
|
|
@@ -170,6 +171,7 @@ function createServer(opts = {}) {
|
|
|
170
171
|
registerVisualDnaTools(server, client, toolOptions);
|
|
171
172
|
registerMoodboardTools(server, client, toolOptions);
|
|
172
173
|
registerColorPaletteTools(server, client, toolOptions);
|
|
174
|
+
registerAnalyzeTools(server, client, toolOptions);
|
|
173
175
|
registerMediaTools(server, client, toolOptions);
|
|
174
176
|
registerPresetTools(server, client, toolOptions);
|
|
175
177
|
registerArtifactTools(server, client, toolOptions);
|
package/src/toolAnnotations.js
CHANGED
|
@@ -74,6 +74,7 @@ const DESTRUCTIVE_WRITE = [
|
|
|
74
74
|
'chat_send_message', 'generate_character_sheet',
|
|
75
75
|
'acquire_clean_music_track', 'import_music_track_to_library',
|
|
76
76
|
'separate_audio_stems', 'clean_dialogue_leftovers', 'separate_ambience',
|
|
77
|
+
'analyze_video',
|
|
77
78
|
|
|
78
79
|
// Deletes and whole-value replacement updates are conservatively destructive.
|
|
79
80
|
'delete_voice', 'update_visual_dna', 'delete_visual_dna', 'delete_visual_dna_folder',
|
package/src/tools/_shared.js
CHANGED
|
@@ -55,7 +55,8 @@ const FILE_INPUT_TOOLS = [
|
|
|
55
55
|
'generate_3d', 'edit_image', 'edit_video', 'transcribe_audio',
|
|
56
56
|
'create_visual_dna', 'update_visual_dna', 'generate_character_sheet', 'clone_voice',
|
|
57
57
|
'chat_send_message', 'create_moodboard', 'update_moodboard',
|
|
58
|
-
'separate_audio_stems', 'clean_dialogue_leftovers', 'separate_ambience'
|
|
58
|
+
'separate_audio_stems', 'clean_dialogue_leftovers', 'separate_ambience',
|
|
59
|
+
'analyze_video'
|
|
59
60
|
];
|
|
60
61
|
|
|
61
62
|
const REMOTE_FILE_HINT =
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/* ⛔ BACKWARD COMPATIBILITY: Tool names and arg names below are a PUBLIC
|
|
2
|
+
* CONTRACT. Never rename, remove, or break an existing tool/arg — old cached
|
|
3
|
+
* `npx @kolbo/mcp` installs in the wild will break silently. Add new tools or
|
|
4
|
+
* new OPTIONAL args only. Full rules: ../index.js top-of-file and CLAUDE.md. */
|
|
5
|
+
|
|
6
|
+
const { z } = require('zod');
|
|
7
|
+
const { projectIdField } = require('./_shared');
|
|
8
|
+
|
|
9
|
+
function registerAnalyzeTools(server, client) {
|
|
10
|
+
// ─── analyze_video ──────────────────────────────────────────
|
|
11
|
+
// Kolbo's official video understanding. Sync — the server holds the socket for
|
|
12
|
+
// long videos, so there is nothing to poll.
|
|
13
|
+
server.tool(
|
|
14
|
+
'analyze_video',
|
|
15
|
+
'Understand a video with Kolbo\'s official video-understanding model (agentic Gemini: it navigates the timeline itself — frames, audio and transcript on demand — instead of sampling fixed frames, so long videos are cheap and timestamp / "when does X happen" / counting questions are answered directly). Pass a public https video URL or a YouTube URL plus an optional question in `prompt`; with no prompt you get an exhaustive description + verbatim transcript. Billed by the analyzer\'s real token usage. Local file → upload it first (create_upload_ticket / upload_media / media_upload_widget) and pass the returned URL. For subtitle files use transcribe_audio instead.',
|
|
16
|
+
{
|
|
17
|
+
video_url: z.string().optional().describe('Public https URL of the video (Kolbo media URL from upload_media / list_media, or any public file). Either this or youtube_url.'),
|
|
18
|
+
youtube_url: z.string().optional().describe('A youtube.com / youtu.be link. Either this or video_url.'),
|
|
19
|
+
prompt: z.string().optional().describe('The question or task about the video (e.g. "At what timestamp does the logo appear?", "Count how many people speak", "Summarize the three main arguments"). Omit for a full description + verbatim transcript.'),
|
|
20
|
+
quality: z.enum(['standard', 'hq']).optional().describe('"standard" (default, Flash-Lite) or "hq" (Flash, higher accuracy, ~2.5x the token price). Use hq for short clips where precision matters.'),
|
|
21
|
+
project_id: projectIdField,
|
|
22
|
+
},
|
|
23
|
+
async ({ video_url, youtube_url, prompt, quality, project_id }) => {
|
|
24
|
+
if (!video_url && !youtube_url) {
|
|
25
|
+
return { content: [{ type: 'text', text: 'Provide video_url or youtube_url. Local file? Upload it first (create_upload_ticket / upload_media / media_upload_widget) and pass the returned URL.' }], isError: true };
|
|
26
|
+
}
|
|
27
|
+
const result = await client.post('/v1/analyze/video', {
|
|
28
|
+
...(video_url ? { video_url } : {}),
|
|
29
|
+
...(youtube_url ? { youtube_url } : {}),
|
|
30
|
+
...(prompt ? { prompt } : {}),
|
|
31
|
+
...(quality ? { quality } : {}),
|
|
32
|
+
...(project_id ? { project_id } : {}),
|
|
33
|
+
});
|
|
34
|
+
return {
|
|
35
|
+
content: [{
|
|
36
|
+
type: 'text',
|
|
37
|
+
text: JSON.stringify({
|
|
38
|
+
analysis: result.analysis,
|
|
39
|
+
model: result.model,
|
|
40
|
+
agentic: result.agentic,
|
|
41
|
+
usage: result.usage,
|
|
42
|
+
credits_used: result.credits_used,
|
|
43
|
+
}, null, 2),
|
|
44
|
+
}],
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
module.exports = { registerAnalyzeTools };
|