katto-mcp 0.3.2 → 0.4.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/index.mjs +60 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -149,6 +149,56 @@ const TOOLS = [
|
|
|
149
149
|
"duration buckets).",
|
|
150
150
|
inputSchema: { type: "object", properties: {} },
|
|
151
151
|
},
|
|
152
|
+
{
|
|
153
|
+
name: "katto_rerender_clip",
|
|
154
|
+
description:
|
|
155
|
+
"Re-render one finished clip with a new reframe layout and/or caption style. Does NOT use video quota. " +
|
|
156
|
+
"Returns a rerender_id; poll katto_get_rerender for the new clip url.",
|
|
157
|
+
inputSchema: {
|
|
158
|
+
type: "object",
|
|
159
|
+
properties: {
|
|
160
|
+
id: { type: "string", description: "Job id from katto_create_clip_job." },
|
|
161
|
+
clip_index: { type: "number", description: "0-based index of the clip to re-render." },
|
|
162
|
+
layout_mode: {
|
|
163
|
+
type: "string",
|
|
164
|
+
enum: ["face_tracking", "wide", "split_screen", "stacked", "passthrough", "grid_3", "grid_4"],
|
|
165
|
+
},
|
|
166
|
+
caption_style: { type: "string", description: "A caption style preset name." },
|
|
167
|
+
},
|
|
168
|
+
required: ["id", "clip_index"],
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: "katto_dub_clip",
|
|
173
|
+
description:
|
|
174
|
+
"Re-render one finished clip dubbed into one or more languages (en, es, fr, it, pt, hi, ja, zh). Does " +
|
|
175
|
+
"NOT use video quota. Returns a rerender_id; poll katto_get_rerender for the result.",
|
|
176
|
+
inputSchema: {
|
|
177
|
+
type: "object",
|
|
178
|
+
properties: {
|
|
179
|
+
id: { type: "string", description: "Job id." },
|
|
180
|
+
clip_index: { type: "number", description: "0-based clip index." },
|
|
181
|
+
languages: {
|
|
182
|
+
type: "array",
|
|
183
|
+
items: { type: "string", enum: ["en", "es", "fr", "it", "pt", "hi", "ja", "zh"] },
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
required: ["id", "clip_index", "languages"],
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
name: "katto_get_rerender",
|
|
191
|
+
description:
|
|
192
|
+
"Poll a re-render started by katto_rerender_clip or katto_dub_clip. Returns { status, clip_url, captions_url }.",
|
|
193
|
+
inputSchema: {
|
|
194
|
+
type: "object",
|
|
195
|
+
properties: {
|
|
196
|
+
id: { type: "string", description: "Job id." },
|
|
197
|
+
rerender_id: { type: "string", description: "The rerender_id returned by rerender/dub." },
|
|
198
|
+
},
|
|
199
|
+
required: ["id", "rerender_id"],
|
|
200
|
+
},
|
|
201
|
+
},
|
|
152
202
|
];
|
|
153
203
|
|
|
154
204
|
// Static reference data — returned by the list_* tools without an API call.
|
|
@@ -167,7 +217,7 @@ const CLIP_LENGTHS = [
|
|
|
167
217
|
{ value: '90_180', label: '90 to 180 seconds' },
|
|
168
218
|
];
|
|
169
219
|
|
|
170
|
-
const server = new Server({ name: "katto", version: "0.
|
|
220
|
+
const server = new Server({ name: "katto", version: "0.4.0" }, { capabilities: { tools: {} } });
|
|
171
221
|
|
|
172
222
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
|
|
173
223
|
|
|
@@ -204,6 +254,15 @@ server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
204
254
|
data = { sources: SOURCES, note: "You can also clip a local file via the REST API (POST /v1/uploads)." };
|
|
205
255
|
} else if (name === "katto_list_clip_lengths") {
|
|
206
256
|
data = { clip_lengths: CLIP_LENGTHS };
|
|
257
|
+
} else if (name === "katto_rerender_clip") {
|
|
258
|
+
const b = {};
|
|
259
|
+
if (args.layout_mode) b.layout_mode = args.layout_mode;
|
|
260
|
+
if (args.caption_style) b.caption_style = args.caption_style;
|
|
261
|
+
data = await api(`/api/v1/jobs/${encodeURIComponent(args.id)}/clips/${encodeURIComponent(args.clip_index)}/rerender`, { method: "POST", body: JSON.stringify(b) });
|
|
262
|
+
} else if (name === "katto_dub_clip") {
|
|
263
|
+
data = await api(`/api/v1/jobs/${encodeURIComponent(args.id)}/clips/${encodeURIComponent(args.clip_index)}/rerender`, { method: "POST", body: JSON.stringify({ dub: args.languages || [] }) });
|
|
264
|
+
} else if (name === "katto_get_rerender") {
|
|
265
|
+
data = await api(`/api/v1/jobs/${encodeURIComponent(args.id)}/rerenders/${encodeURIComponent(args.rerender_id)}`);
|
|
207
266
|
} else {
|
|
208
267
|
throw new Error(`Unknown tool: ${name}`);
|
|
209
268
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "katto-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"mcpName": "io.github.miracleweasel/katto-mcp",
|
|
5
5
|
"description": "MCP server for Katto — turn long videos into scored, captioned 9:16 clips from any MCP client (Claude, Cursor, ...).",
|
|
6
6
|
"type": "module",
|