@clipform/mcp-server 1.8.1 → 1.9.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/dist/auth-context.js +9 -0
- package/dist/auth-context.js.map +1 -0
- package/dist/chunk-ESDD3WVD.js +24686 -0
- package/dist/chunk-ESDD3WVD.js.map +1 -0
- package/dist/chunk-YEDU3G7I.js +48 -0
- package/dist/chunk-YEDU3G7I.js.map +1 -0
- package/dist/index.js +108 -11
- package/dist/index.js.map +1 -1
- package/dist/server.js +7 -74
- package/dist/server.js.map +1 -1
- package/package.json +7 -8
- package/dist/__tests__/api-parity.test.d.ts +0 -1
- package/dist/__tests__/api-parity.test.js +0 -157
- package/dist/__tests__/api-parity.test.js.map +0 -1
- package/dist/__tests__/config-sync.test.d.ts +0 -1
- package/dist/__tests__/config-sync.test.js +0 -16
- package/dist/__tests__/config-sync.test.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/lib/api-client.d.ts +0 -35
- package/dist/lib/api-client.js +0 -126
- package/dist/lib/api-client.js.map +0 -1
- package/dist/lib/auth-context.d.ts +0 -17
- package/dist/lib/auth-context.js +0 -9
- package/dist/lib/auth-context.js.map +0 -1
- package/dist/lib/config.d.ts +0 -23
- package/dist/lib/config.js +0 -6
- package/dist/lib/config.js.map +0 -1
- package/dist/lib/format-form.d.ts +0 -2
- package/dist/lib/format-form.js +0 -32
- package/dist/lib/format-form.js.map +0 -1
- package/dist/lib/render-jobs.d.ts +0 -17
- package/dist/lib/render-jobs.js +0 -44
- package/dist/lib/render-jobs.js.map +0 -1
- package/dist/lib/schemas.d.ts +0 -64
- package/dist/lib/schemas.js +0 -140
- package/dist/lib/schemas.js.map +0 -1
- package/dist/lib/session-context.d.ts +0 -1
- package/dist/lib/session-context.js +0 -38
- package/dist/lib/session-context.js.map +0 -1
- package/dist/prompts.d.ts +0 -2
- package/dist/prompts.js +0 -272
- package/dist/prompts.js.map +0 -1
- package/dist/resources.d.ts +0 -2
- package/dist/resources.js +0 -336
- package/dist/resources.js.map +0 -1
- package/dist/server.d.ts +0 -2
- package/dist/tools/add-node.d.ts +0 -2
- package/dist/tools/add-node.js +0 -48
- package/dist/tools/add-node.js.map +0 -1
- package/dist/tools/attach-node-audio.d.ts +0 -2
- package/dist/tools/attach-node-audio.js +0 -35
- package/dist/tools/attach-node-audio.js.map +0 -1
- package/dist/tools/check-render.d.ts +0 -2
- package/dist/tools/check-render.js +0 -47
- package/dist/tools/check-render.js.map +0 -1
- package/dist/tools/create-form.d.ts +0 -2
- package/dist/tools/create-form.js +0 -199
- package/dist/tools/create-form.js.map +0 -1
- package/dist/tools/delete-form.d.ts +0 -2
- package/dist/tools/delete-form.js +0 -26
- package/dist/tools/delete-form.js.map +0 -1
- package/dist/tools/delete-node-media.d.ts +0 -2
- package/dist/tools/delete-node-media.js +0 -25
- package/dist/tools/delete-node-media.js.map +0 -1
- package/dist/tools/delete-node.d.ts +0 -2
- package/dist/tools/delete-node.js +0 -28
- package/dist/tools/delete-node.js.map +0 -1
- package/dist/tools/generate-slideshow.d.ts +0 -2
- package/dist/tools/generate-slideshow.js +0 -155
- package/dist/tools/generate-slideshow.js.map +0 -1
- package/dist/tools/generate-tts.d.ts +0 -2
- package/dist/tools/generate-tts.js +0 -73
- package/dist/tools/generate-tts.js.map +0 -1
- package/dist/tools/generate-video.d.ts +0 -2
- package/dist/tools/generate-video.js +0 -119
- package/dist/tools/generate-video.js.map +0 -1
- package/dist/tools/get-form.d.ts +0 -2
- package/dist/tools/get-form.js +0 -25
- package/dist/tools/get-form.js.map +0 -1
- package/dist/tools/get-node-media.d.ts +0 -2
- package/dist/tools/get-node-media.js +0 -35
- package/dist/tools/get-node-media.js.map +0 -1
- package/dist/tools/list-assets.d.ts +0 -2
- package/dist/tools/list-assets.js +0 -45
- package/dist/tools/list-assets.js.map +0 -1
- package/dist/tools/list-compositions.d.ts +0 -2
- package/dist/tools/list-compositions.js +0 -34
- package/dist/tools/list-compositions.js.map +0 -1
- package/dist/tools/list-forms.d.ts +0 -2
- package/dist/tools/list-forms.js +0 -86
- package/dist/tools/list-forms.js.map +0 -1
- package/dist/tools/log-generation.d.ts +0 -2
- package/dist/tools/log-generation.js +0 -33
- package/dist/tools/log-generation.js.map +0 -1
- package/dist/tools/render-composition.d.ts +0 -2
- package/dist/tools/render-composition.js +0 -50
- package/dist/tools/render-composition.js.map +0 -1
- package/dist/tools/search-media.d.ts +0 -2
- package/dist/tools/search-media.js +0 -40
- package/dist/tools/search-media.js.map +0 -1
- package/dist/tools/search-music.d.ts +0 -2
- package/dist/tools/search-music.js +0 -40
- package/dist/tools/search-music.js.map +0 -1
- package/dist/tools/search-news.d.ts +0 -2
- package/dist/tools/search-news.js +0 -47
- package/dist/tools/search-news.js.map +0 -1
- package/dist/tools/set-node-logic.d.ts +0 -2
- package/dist/tools/set-node-logic.js +0 -54
- package/dist/tools/set-node-logic.js.map +0 -1
- package/dist/tools/update-form.d.ts +0 -2
- package/dist/tools/update-form.js +0 -155
- package/dist/tools/update-form.js.map +0 -1
- package/dist/tools/update-node.d.ts +0 -2
- package/dist/tools/update-node.js +0 -70
- package/dist/tools/update-node.js.map +0 -1
- package/dist/tools/upload-node-media.d.ts +0 -2
- package/dist/tools/upload-node-media.js +0 -105
- package/dist/tools/upload-node-media.js.map +0 -1
package/dist/tools/list-forms.js
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { callApi, errorResult, textResult } from "../lib/api-client.js";
|
|
3
|
-
export function registerListFormsTool(server) {
|
|
4
|
-
server.registerTool("clipform_list_forms", {
|
|
5
|
-
title: "List Clipforms",
|
|
6
|
-
description: `List forms in your workspace with optional filtering. Returns paginated results (cursor-based). Use the next_cursor value to fetch the next page.`,
|
|
7
|
-
inputSchema: {
|
|
8
|
-
limit: z
|
|
9
|
-
.number()
|
|
10
|
-
.int()
|
|
11
|
-
.min(1)
|
|
12
|
-
.max(100)
|
|
13
|
-
.optional()
|
|
14
|
-
.describe("Number of forms to return (default 25, max 100)"),
|
|
15
|
-
cursor: z
|
|
16
|
-
.string()
|
|
17
|
-
.optional()
|
|
18
|
-
.describe("Pagination cursor from previous response's next_cursor"),
|
|
19
|
-
tag: z
|
|
20
|
-
.string()
|
|
21
|
-
.optional()
|
|
22
|
-
.describe("Filter by tag name(s), comma-separated. AND logic: only forms with ALL tags are returned."),
|
|
23
|
-
published: z
|
|
24
|
-
.enum(["true", "false"])
|
|
25
|
-
.optional()
|
|
26
|
-
.describe("Filter by publish status"),
|
|
27
|
-
search: z
|
|
28
|
-
.string()
|
|
29
|
-
.optional()
|
|
30
|
-
.describe("Search forms by title (case-insensitive substring match)"),
|
|
31
|
-
sort: z
|
|
32
|
-
.enum(["created_at", "updated_at"])
|
|
33
|
-
.optional()
|
|
34
|
-
.describe("Sort field (default: created_at)"),
|
|
35
|
-
order: z
|
|
36
|
-
.enum(["asc", "desc"])
|
|
37
|
-
.optional()
|
|
38
|
-
.describe("Sort order (default: desc, newest first)"),
|
|
39
|
-
},
|
|
40
|
-
annotations: {
|
|
41
|
-
readOnlyHint: true,
|
|
42
|
-
destructiveHint: false,
|
|
43
|
-
idempotentHint: true,
|
|
44
|
-
openWorldHint: true,
|
|
45
|
-
},
|
|
46
|
-
}, async ({ limit, cursor, tag, published, search, sort, order }) => {
|
|
47
|
-
const params = { include: "tags" };
|
|
48
|
-
if (limit !== undefined)
|
|
49
|
-
params.limit = String(limit);
|
|
50
|
-
if (cursor)
|
|
51
|
-
params.cursor = cursor;
|
|
52
|
-
if (tag)
|
|
53
|
-
params.tag = tag;
|
|
54
|
-
if (published)
|
|
55
|
-
params.published = published;
|
|
56
|
-
if (search)
|
|
57
|
-
params.search = search;
|
|
58
|
-
if (sort)
|
|
59
|
-
params.sort = sort;
|
|
60
|
-
if (order)
|
|
61
|
-
params.order = order;
|
|
62
|
-
const result = await callApi("/forms", { params });
|
|
63
|
-
if (!result.ok) {
|
|
64
|
-
return errorResult(result.error);
|
|
65
|
-
}
|
|
66
|
-
const data = result.data;
|
|
67
|
-
if (data.forms.length === 0) {
|
|
68
|
-
return textResult("No forms found matching the criteria.");
|
|
69
|
-
}
|
|
70
|
-
const lines = [`Found ${data.forms.length} form(s):\n`];
|
|
71
|
-
for (const f of data.forms) {
|
|
72
|
-
const status = f.is_published ? "published" : "draft";
|
|
73
|
-
const tagStr = f.tags.length > 0 ? ` [${f.tags.map((t) => t.name).join(", ")}]` : "";
|
|
74
|
-
lines.push(`- **${f.title || "(untitled)"}** [${status}]${tagStr}`);
|
|
75
|
-
lines.push(` ID: ${f.id}`);
|
|
76
|
-
lines.push(` Share ID: ${f.share_id}`);
|
|
77
|
-
lines.push(` Created: ${f.created_at}`);
|
|
78
|
-
lines.push("");
|
|
79
|
-
}
|
|
80
|
-
if (data.next_cursor) {
|
|
81
|
-
lines.push(`More results available. Pass cursor: "${data.next_cursor}" to get the next page.`);
|
|
82
|
-
}
|
|
83
|
-
return textResult(lines.join("\n"));
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
//# sourceMappingURL=list-forms.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-forms.js","sourceRoot":"","sources":["../../src/tools/list-forms.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAExE,MAAM,UAAU,qBAAqB,CAAC,MAAiB;IACrD,MAAM,CAAC,YAAY,CACjB,qBAAqB,EACrB;QACE,KAAK,EAAE,gBAAgB;QACvB,WAAW,EAAE,mJAAmJ;QAChK,WAAW,EAAE;YACX,KAAK,EAAE,CAAC;iBACL,MAAM,EAAE;iBACR,GAAG,EAAE;iBACL,GAAG,CAAC,CAAC,CAAC;iBACN,GAAG,CAAC,GAAG,CAAC;iBACR,QAAQ,EAAE;iBACV,QAAQ,CAAC,iDAAiD,CAAC;YA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EAAE,EAAE,CAAC,CAAC;YAC5B,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;YACxC,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC;YACzC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjB,CAAC;QAED,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,KAAK,CAAC,IAAI,CACR,yCAAyC,IAAI,CAAC,WAAW,yBAAyB,CACnF,CAAC;QACJ,CAAC;QAED,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACtC,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { callInternalApi, errorResult, textResult } from "../lib/api-client.js";
|
|
3
|
-
export function registerLogGenerationTool(server) {
|
|
4
|
-
server.registerTool("clipform_log_generation", {
|
|
5
|
-
title: "Log Form Generation Audit",
|
|
6
|
-
description: `Save an audit trail for a generated form. Records where content came from - the sources and image attributions. Call this as the final step after building a form or quiz.`,
|
|
7
|
-
inputSchema: {
|
|
8
|
-
form_id: z.string().uuid().describe("The form ID (UUID format, not the share ID)"),
|
|
9
|
-
summary: z.string().describe("Short description of what was generated"),
|
|
10
|
-
details: z.object({
|
|
11
|
-
sources: z.array(z.object({
|
|
12
|
-
title: z.string(),
|
|
13
|
-
url: z.string().optional(),
|
|
14
|
-
type: z.string().optional(),
|
|
15
|
-
})).optional().describe("Knowledge sources used"),
|
|
16
|
-
images: z.array(z.object({
|
|
17
|
-
url: z.string(),
|
|
18
|
-
attribution: z.string().optional(),
|
|
19
|
-
license: z.string().optional(),
|
|
20
|
-
})).optional().describe("Images used with attribution"),
|
|
21
|
-
}).describe("Content sources and attributions"),
|
|
22
|
-
},
|
|
23
|
-
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
24
|
-
}, async ({ form_id, summary, details }) => {
|
|
25
|
-
const result = await callInternalApi("/internal/log-generation", {
|
|
26
|
-
body: { form_id, summary, details },
|
|
27
|
-
});
|
|
28
|
-
if (!result.ok)
|
|
29
|
-
return errorResult(result.error);
|
|
30
|
-
return textResult(`Audit log saved for form ${form_id}\nSummary: ${summary}`);
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=log-generation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log-generation.js","sourceRoot":"","sources":["../../src/tools/log-generation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhF,MAAM,UAAU,yBAAyB,CAAC,MAAiB;IACzD,MAAM,CAAC,YAAY,CACjB,yBAAyB,EACzB;QACE,KAAK,EAAE,2BAA2B;QAClC,WAAW,EAAE,4KAA4K;QACzL,WAAW,EAAE;YACX,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;YAClF,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;YACvE,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC;gBAChB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;oBACxB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;oBACjB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;oBAC1B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;iBAC5B,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;gBACjD,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;oBACvB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;oBACf,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;oBAClC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;iBAC/B,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;aACxD,CAAC,CAAC,QAAQ,CAAC,kCAAkC,CAAC;SAChD;QACD,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE;KAC1G,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE;QACtC,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,0BAA0B,EAAE;YAC/D,IAAI,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE;SACpC,CAAC,CAAC;QACH,IAAI,CAAC,MAAM,CAAC,EAAE;YAAE,OAAO,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAEjD,OAAO,UAAU,CAAC,4BAA4B,OAAO,cAAc,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { callInternalApi, textResult } from "../lib/api-client.js";
|
|
3
|
-
import { createJob, completeJob, failJob, RENDER_TIMING } from "../lib/render-jobs.js";
|
|
4
|
-
export function registerRenderCompositionTool(server) {
|
|
5
|
-
server.registerTool("clipform_render_composition", {
|
|
6
|
-
title: "Render Composition",
|
|
7
|
-
description: `Render a Remotion composition to MP4, PNG, or GIF. MP4 renders use AWS Lambda in production for fast, scalable rendering. PNG and GIF render locally.
|
|
8
|
-
|
|
9
|
-
Output formats:
|
|
10
|
-
- mp4: Video file (H.264 codec, best for social media)
|
|
11
|
-
- png: Still image (single frame)
|
|
12
|
-
- gif: Animated GIF (looping)
|
|
13
|
-
|
|
14
|
-
For narrated quiz slideshows, prefer clipform_generate_slideshow which handles the full workflow (focal point detection, audio sync, storage upload). Use this tool for custom compositions like ScorecardQuiz, ShortFormQuiz, or PresenterDirected.`,
|
|
15
|
-
inputSchema: {
|
|
16
|
-
compositionId: z.string().describe("The composition ID (e.g. 'ScorecardQuiz', 'ShortFormQuiz', 'PresenterDirected')"),
|
|
17
|
-
outputFormat: z.enum(["mp4", "png", "gif"]).default("mp4").describe("Output format (default: mp4)"),
|
|
18
|
-
inputProps: z.record(z.unknown()).optional().describe("Props object matching the composition's expected schema"),
|
|
19
|
-
},
|
|
20
|
-
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
21
|
-
}, async ({ compositionId, outputFormat, inputProps }) => {
|
|
22
|
-
const job = createJob("clipform_render_composition");
|
|
23
|
-
callInternalApi("/internal/render", {
|
|
24
|
-
body: {
|
|
25
|
-
compositionId,
|
|
26
|
-
outputFormat,
|
|
27
|
-
inputProps: inputProps ?? {},
|
|
28
|
-
},
|
|
29
|
-
}).then((result) => {
|
|
30
|
-
if (!result.ok) {
|
|
31
|
-
failJob(job.id, result.error);
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
completeJob(job.id, result.data);
|
|
35
|
-
}
|
|
36
|
-
}).catch((err) => {
|
|
37
|
-
failJob(job.id, err instanceof Error ? err.message : String(err));
|
|
38
|
-
});
|
|
39
|
-
return textResult([
|
|
40
|
-
`Render started.`,
|
|
41
|
-
``,
|
|
42
|
-
`Composition: ${compositionId}`,
|
|
43
|
-
`Format: ${outputFormat}`,
|
|
44
|
-
`Job ID: ${job.id}`,
|
|
45
|
-
``,
|
|
46
|
-
`Renders typically take ${RENDER_TIMING.expectedRange}. Use clipform_check_render with this job ID to check status.`,
|
|
47
|
-
].join("\n"));
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
//# sourceMappingURL=render-composition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"render-composition.js","sourceRoot":"","sources":["../../src/tools/render-composition.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAe,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEvF,MAAM,UAAU,6BAA6B,CAAC,MAAiB;IAC7D,MAAM,CAAC,YAAY,CACjB,6BAA6B,EAC7B;QACE,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EAAE;;;;;;;qPAOkO;QAC/O,WAAW,EAAE;YACX,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iFAAiF,CAAC;YACrH,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,8BAA8B,CAAC;YACnG,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yDAAyD,CAAC;SACjH;QACD,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE;KAC1G,EACD,KAAK,EAAE,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE,EAAE;QACpD,MAAM,GAAG,GAAG,SAAS,CAAC,6BAA6B,CAAC,CAAC;QAErD,eAAe,CAAC,kBAAkB,EAAE;YAClC,IAAI,EAAE;gBACJ,aAAa;gBACb,YAAY;gBACZ,UAAU,EAAE,UAAU,IAAI,EAAE;aAC7B;SACF,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;YACjB,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;gBACf,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;YAChC,CAAC;iBAAM,CAAC;gBACN,WAAW,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;YACnC,CAAC;QACH,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;YACf,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;QACpE,CAAC,CAAC,CAAC;QAEH,OAAO,UAAU,CACf;YACE,iBAAiB;YACjB,EAAE;YACF,gBAAgB,aAAa,EAAE;YAC/B,WAAW,YAAY,EAAE;YACzB,WAAW,GAAG,CAAC,EAAE,EAAE;YACnB,EAAE;YACF,0BAA0B,aAAa,CAAC,aAAa,+DAA+D;SACrH,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { callInternalApi, errorResult, textResult } from "../lib/api-client.js";
|
|
3
|
-
export function registerSearchMediaTool(server) {
|
|
4
|
-
server.registerTool("clipform_search_media", {
|
|
5
|
-
title: "Search Media",
|
|
6
|
-
description: `Search royalty-free images or stock video clips to attach to a node. Routes across Pexels, Unsplash, Pixabay, Wikimedia, NASA, and iNaturalist for images; Pexels and Pixabay for video. The router picks relevant providers based on the topic (space → NASA, nature → iNaturalist, general → stock libraries). Returns URLs you can pass to clipform_upload_node_media or clipform_generate_slideshow.`,
|
|
7
|
-
inputSchema: {
|
|
8
|
-
query: z.string().describe("What to search for (e.g. 'african lion', 'saturn rings', 'city timelapse')"),
|
|
9
|
-
kind: z.enum(["image", "video"]).describe("image = stock photos, video = stock clips"),
|
|
10
|
-
count: z.number().min(1).max(20).default(6).optional()
|
|
11
|
-
.describe("Max results per provider (default 6 for image, 3 for video)"),
|
|
12
|
-
},
|
|
13
|
-
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
14
|
-
}, async ({ query, kind, count }) => {
|
|
15
|
-
const result = await callInternalApi("/internal/search-media", {
|
|
16
|
-
body: { query, kind, count },
|
|
17
|
-
});
|
|
18
|
-
if (!result.ok)
|
|
19
|
-
return errorResult(result.error);
|
|
20
|
-
const results = result.data.results;
|
|
21
|
-
if (!results.length)
|
|
22
|
-
return textResult(`No ${kind}s found for "${query}".`);
|
|
23
|
-
const lines = [`Found ${results.length} ${kind}s for "${query}":\n`];
|
|
24
|
-
for (const item of results.slice(0, 15)) {
|
|
25
|
-
lines.push(`- [${item.source}] ${item.title}`);
|
|
26
|
-
lines.push(` URL: ${item.url}`);
|
|
27
|
-
if (item.width && item.height)
|
|
28
|
-
lines.push(` Size: ${item.width}x${item.height}`);
|
|
29
|
-
if (kind === "video" && item.duration)
|
|
30
|
-
lines.push(` Duration: ${item.duration}s`);
|
|
31
|
-
if (item.attribution)
|
|
32
|
-
lines.push(` Attribution: ${item.attribution}`);
|
|
33
|
-
if (item.license)
|
|
34
|
-
lines.push(` License: ${item.license}`);
|
|
35
|
-
lines.push("");
|
|
36
|
-
}
|
|
37
|
-
return textResult(lines.join("\n"));
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=search-media.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search-media.js","sourceRoot":"","sources":["../../src/tools/search-media.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE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,KAAK,MAAM,CAAC,CAAC;QACrE,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;YACxC,KAAK,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;YAC/C,KAAK,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;YACjC,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM;gBAAE,KAAK,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;YAClF,IAAI,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,QAAQ;gBAAE,KAAK,CAAC,IAAI,CAAC,eAAe,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;YACnF,IAAI,IAAI,CAAC,WAAW;gBAAE,KAAK,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;YACvE,IAAI,IAAI,CAAC,OAAO;gBAAE,KAAK,CAAC,IAAI,CAAC,cAAc,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;YAC3D,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjB,CAAC;QACD,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACtC,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { callInternalApi, errorResult, textResult } from "../lib/api-client.js";
|
|
3
|
-
export function registerSearchMusicTool(server) {
|
|
4
|
-
server.registerTool("clipform_search_music", {
|
|
5
|
-
title: "Search Music",
|
|
6
|
-
description: `Search for royalty-free music tracks and ambient sounds via Jamendo and Freesound. Returns download URLs for background music, quiz soundtracks, or ambient audio.`,
|
|
7
|
-
inputSchema: {
|
|
8
|
-
query: z.string().describe("What to search for (e.g. 'upbeat quiz background', 'calm ambient', 'playful pizzicato')"),
|
|
9
|
-
count: z.number().min(1).max(10).default(5).optional().describe("Max results (default: 5)"),
|
|
10
|
-
instrumentalOnly: z.boolean().optional().default(true).describe("Only instrumental tracks (default: true)"),
|
|
11
|
-
minDuration: z.number().optional().describe("Minimum duration in seconds"),
|
|
12
|
-
maxDuration: z.number().optional().describe("Maximum duration in seconds"),
|
|
13
|
-
tags: z.array(z.string()).optional().describe("Genre/mood tags to filter by"),
|
|
14
|
-
},
|
|
15
|
-
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
16
|
-
}, async ({ query, count, instrumentalOnly, minDuration, maxDuration, tags }) => {
|
|
17
|
-
const result = await callInternalApi("/internal/search-music", {
|
|
18
|
-
body: { query, count, instrumentalOnly, minDuration, maxDuration, tags },
|
|
19
|
-
});
|
|
20
|
-
if (!result.ok)
|
|
21
|
-
return errorResult(result.error);
|
|
22
|
-
const results = result.data.results;
|
|
23
|
-
if (!results.length)
|
|
24
|
-
return textResult(`No music found for "${query}".`);
|
|
25
|
-
const lines = [`Found ${results.length} tracks for "${query}":\n`];
|
|
26
|
-
for (const item of results) {
|
|
27
|
-
lines.push(`- ${item.title} by ${item.artist}`);
|
|
28
|
-
lines.push(` URL: ${item.url}`);
|
|
29
|
-
if (item.duration)
|
|
30
|
-
lines.push(` Duration: ${item.duration}s`);
|
|
31
|
-
if (item.source)
|
|
32
|
-
lines.push(` Source: ${item.source}`);
|
|
33
|
-
if (item.license)
|
|
34
|
-
lines.push(` License: ${item.license}`);
|
|
35
|
-
lines.push("");
|
|
36
|
-
}
|
|
37
|
-
return textResult(lines.join("\n"));
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=search-music.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search-music.js","sourceRoot":"","sources":["../../src/tools/search-music.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 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { callInternalApi, errorResult, textResult } from "../lib/api-client.js";
|
|
3
|
-
export function registerSearchNewsTool(server) {
|
|
4
|
-
server.registerTool("clipform_search_news", {
|
|
5
|
-
title: "Search News (fallback)",
|
|
6
|
-
description: `FALLBACK news lookup for clients without native web search. Returns structured current-news articles from NewsAPI and The Guardian.
|
|
7
|
-
|
|
8
|
-
WHEN TO USE:
|
|
9
|
-
- The user asks for a quiz about an event, person, or topic that is recent (post-May-2025) or that you are not confident you know accurately.
|
|
10
|
-
- Your client does NOT already expose a native web search / web fetch tool. If it does (e.g. WebSearch in Claude Code, web search in Claude Desktop), prefer that - it is broader and more current than this tool.
|
|
11
|
-
- You would otherwise be at risk of hallucinating facts.
|
|
12
|
-
|
|
13
|
-
DO NOT USE for timeless topics you already know well (history, geography, science, general knowledge) - write those from your own knowledge, it is faster and the result is better.
|
|
14
|
-
|
|
15
|
-
If neither native web search nor this tool is available and the topic is post-cutoff or uncertain, REFUSE rather than fabricate.`,
|
|
16
|
-
inputSchema: {
|
|
17
|
-
query: z.string().describe("News search query (e.g. 'Iran war 2026', 'Australian Open final', 'UK election')"),
|
|
18
|
-
count: z.number().min(1).max(15).default(5).optional()
|
|
19
|
-
.describe("Max results per provider (default 5)"),
|
|
20
|
-
},
|
|
21
|
-
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
22
|
-
}, async ({ query, count }) => {
|
|
23
|
-
const result = await callInternalApi("/internal/search-news", {
|
|
24
|
-
body: { query, count },
|
|
25
|
-
});
|
|
26
|
-
if (!result.ok)
|
|
27
|
-
return errorResult(result.error);
|
|
28
|
-
const results = result.data.results;
|
|
29
|
-
if (!results.length)
|
|
30
|
-
return textResult(`No news articles found for "${query}".`);
|
|
31
|
-
const lines = [`Found ${results.length} articles for "${query}":\n`];
|
|
32
|
-
for (const article of results) {
|
|
33
|
-
lines.push(`- [${article.source}] ${article.title}`);
|
|
34
|
-
if (article.description)
|
|
35
|
-
lines.push(` ${article.description}`);
|
|
36
|
-
if (article.author)
|
|
37
|
-
lines.push(` Author: ${article.author}`);
|
|
38
|
-
lines.push(` Date: ${article.publishedAt}`);
|
|
39
|
-
lines.push(` URL: ${article.url}`);
|
|
40
|
-
if (article.imageUrl)
|
|
41
|
-
lines.push(` Image: ${article.imageUrl}`);
|
|
42
|
-
lines.push("");
|
|
43
|
-
}
|
|
44
|
-
return textResult(lines.join("\n"));
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=search-news.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search-news.js","sourceRoot":"","sources":["../../src/tools/search-news.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhF,MAAM,UAAU,sBAAsB,CAAC,MAAiB;IACtD,MAAM,CAAC,YAAY,CACjB,sBAAsB,EACtB;QACE,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EAAE;;;;;;;;;iIAS8G;QAC3H,WAAW,EAAE;YACX,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kFAAkF,CAAC;YAC9G,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;iBACnD,QAAQ,CAAC,sCAAsC,CAAC;SACpD;QACD,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;KACvG,EACD,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;QACzB,MAAM,MAAM,GAA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|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { callApi, errorResult, textResult } from "../lib/api-client.js";
|
|
3
|
-
import { fetchAndFormatFormState } from "../lib/format-form.js";
|
|
4
|
-
const LogicRuleSchema = z.object({
|
|
5
|
-
option_content: z
|
|
6
|
-
.string()
|
|
7
|
-
.optional()
|
|
8
|
-
.describe("The option text to match. Omit for a default rule (applies to all unmatched options)."),
|
|
9
|
-
target_node_id: z
|
|
10
|
-
.string()
|
|
11
|
-
.describe("The node ID to jump to when this rule matches"),
|
|
12
|
-
});
|
|
13
|
-
export function registerSetNodeLogicTool(server) {
|
|
14
|
-
server.registerTool("clipform_set_logic", {
|
|
15
|
-
title: "Set Node Logic",
|
|
16
|
-
description: `Set branching logic on a node. Routes respondents to different nodes based on their answer.
|
|
17
|
-
|
|
18
|
-
Each rule maps an option (by its text content) to a target node. Rules without option_content are "default" rules applied to all unmatched options.
|
|
19
|
-
|
|
20
|
-
Example: Route correct answer to a "Well done" node, everything else to "Wrong":
|
|
21
|
-
rules: [
|
|
22
|
-
{ option_content: "42", target_node_id: "well-done-id" },
|
|
23
|
-
{ target_node_id: "wrong-id" }
|
|
24
|
-
]`,
|
|
25
|
-
inputSchema: {
|
|
26
|
-
form_id: z.string().uuid().describe("The form UUID (returned by clipform_create_form, not the short share_id from the URL)"),
|
|
27
|
-
node_id: z
|
|
28
|
-
.string()
|
|
29
|
-
.describe("The node ID to set logic on"),
|
|
30
|
-
rules: z
|
|
31
|
-
.array(LogicRuleSchema)
|
|
32
|
-
.min(1)
|
|
33
|
-
.describe("Branching rules. Each maps an option or default to a target node."),
|
|
34
|
-
},
|
|
35
|
-
annotations: {
|
|
36
|
-
readOnlyHint: false,
|
|
37
|
-
destructiveHint: false,
|
|
38
|
-
idempotentHint: true,
|
|
39
|
-
openWorldHint: true,
|
|
40
|
-
},
|
|
41
|
-
}, async ({ form_id, node_id, rules }) => {
|
|
42
|
-
const result = await callApi(`/forms/${form_id}/nodes/${node_id}/logic`, {
|
|
43
|
-
method: "PUT",
|
|
44
|
-
body: { rules },
|
|
45
|
-
});
|
|
46
|
-
if (!result.ok) {
|
|
47
|
-
return errorResult(result.error);
|
|
48
|
-
}
|
|
49
|
-
const confirmMsg = `Logic set on node ${node_id}.\nRules created: ${result.data.rules_count}`;
|
|
50
|
-
const formState = await fetchAndFormatFormState(form_id);
|
|
51
|
-
return textResult(formState ? `${confirmMsg}\n\n---\n\n${formState}` : confirmMsg);
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=set-node-logic.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"set-node-logic.js","sourceRoot":"","sources":["../../src/tools/set-node-logic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/B,cAAc,EAAE,CAAC;SACd,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,uFAAuF,CACxF;IACH,cAAc,EAAE,CAAC;SACd,MAAM,EAAE;SACR,QAAQ,CAAC,+CAA+C,CAAC;CAC7D,CAAC,CAAC;AAEH,MAAM,UAAU,wBAAwB,CAAC,MAAiB;IACxD,MAAM,CAAC,YAAY,CACjB,oBAAoB,EACpB;QACE,KAAK,EAAE,gBAAgB;QACvB,WAAW,EAAE;;;;;;;;IAQf;QACE,WAAW,EAAE;YACX,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,uFAAuF,CAAC;YAC5H,OAAO,EAAE,CAAC;iBACP,MAAM,EAAE;iBACR,QAAQ,CAAC,6BAA6B,CAAC;YAC1C,KAAK,EAAE,CAAC;iBACL,KAAK,CAAC,eAAe,CAAC;iBACtB,GAAG,CAAC,CAAC,CAAC;iBACN,QAAQ,CAAC,mEAAmE,CAAC;SACjF;QACD,WAAW,EAAE;YACX,YAAY,EAAE,KAAK;YACnB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,IAAI;SACpB;KACF,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE;QACpC,MAAM,MAAM,GAAG,MAAM,OAAO,CAC1B,UAAU,OAAO,UAAU,OAAO,QAAQ,EAC1C;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,EAAE,KAAK,EAAE;SAChB,CACF,CAAC;QAEF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,OAAO,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACnC,CAAC;QAED,MAAM,UAAU,GAAG,qBAAqB,OAAO,qBAAqB,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;QAC9F,MAAM,SAAS,GAAG,MAAM,uBAAuB,CAAC,OAAO,CAAC,CAAC;QACzD,OAAO,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,UAAU,cAAc,SAAS,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IACrF,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { callApi, errorResult, textResult } from "../lib/api-client.js";
|
|
3
|
-
import { fetchAndFormatFormState } from "../lib/format-form.js";
|
|
4
|
-
export function registerUpdateFormTool(server) {
|
|
5
|
-
server.registerTool("clipform_update_form", {
|
|
6
|
-
title: "Update Clipform",
|
|
7
|
-
description: `Update a form's title, publish status, settings, or tags. Use clipform_get_form first to see current values.`,
|
|
8
|
-
inputSchema: {
|
|
9
|
-
form_id: z.string().uuid().describe("The form UUID (returned by clipform_create_form, not the short share_id from the URL)"),
|
|
10
|
-
title: z.string().optional().describe("New form title"),
|
|
11
|
-
is_published: z
|
|
12
|
-
.boolean()
|
|
13
|
-
.optional()
|
|
14
|
-
.describe("Set to true to publish, false to unpublish"),
|
|
15
|
-
show_step_counter: z
|
|
16
|
-
.boolean()
|
|
17
|
-
.optional()
|
|
18
|
-
.describe("Show step counter (e.g. '1/5'). Recommended for quizzes."),
|
|
19
|
-
disable_back_navigation: z
|
|
20
|
-
.boolean()
|
|
21
|
-
.optional()
|
|
22
|
-
.describe("Prevent respondents from going back. Recommended for quizzes."),
|
|
23
|
-
total_steps: z
|
|
24
|
-
.number()
|
|
25
|
-
.nullable()
|
|
26
|
-
.optional()
|
|
27
|
-
.describe("Override the total step count shown in the step counter. Set null to auto-calculate."),
|
|
28
|
-
primary_color: z
|
|
29
|
-
.string()
|
|
30
|
-
.optional()
|
|
31
|
-
.describe("Primary/brand color (hex or CSS color). Used for buttons and accents."),
|
|
32
|
-
background_color: z
|
|
33
|
-
.string()
|
|
34
|
-
.optional()
|
|
35
|
-
.describe("Background color (hex, rgba, or CSS color)."),
|
|
36
|
-
font_family: z
|
|
37
|
-
.string()
|
|
38
|
-
.optional()
|
|
39
|
-
.describe("Font family name (e.g. 'Inter', 'Roboto', 'Playfair Display')."),
|
|
40
|
-
embed_autoplay: z
|
|
41
|
-
.boolean()
|
|
42
|
-
.optional()
|
|
43
|
-
.describe("Auto-play video when embedded (default: false). When off, embeds show a thumbnail + play button."),
|
|
44
|
-
description: z
|
|
45
|
-
.string()
|
|
46
|
-
.nullable()
|
|
47
|
-
.optional()
|
|
48
|
-
.describe("SEO description (meta description, og:description). Set null to clear."),
|
|
49
|
-
author: z
|
|
50
|
-
.string()
|
|
51
|
-
.nullable()
|
|
52
|
-
.optional()
|
|
53
|
-
.describe("Author/brand name shown to respondents. Set null to clear."),
|
|
54
|
-
brand_name: z
|
|
55
|
-
.string()
|
|
56
|
-
.nullable()
|
|
57
|
-
.optional()
|
|
58
|
-
.describe("Brand name shown alongside the logo in the viewer. Set null to clear."),
|
|
59
|
-
logo_url: z
|
|
60
|
-
.string()
|
|
61
|
-
.nullable()
|
|
62
|
-
.optional()
|
|
63
|
-
.describe("URL to a logo image shown in the viewer header. Set null to clear."),
|
|
64
|
-
tags: z
|
|
65
|
-
.array(z.string())
|
|
66
|
-
.optional()
|
|
67
|
-
.describe("Replace all tags on this form. Pass the full desired set (e.g. ['quiz', 'trivia', 'slug:elephants']). Omit to leave tags unchanged."),
|
|
68
|
-
},
|
|
69
|
-
annotations: {
|
|
70
|
-
readOnlyHint: false,
|
|
71
|
-
destructiveHint: false,
|
|
72
|
-
idempotentHint: true,
|
|
73
|
-
openWorldHint: true,
|
|
74
|
-
},
|
|
75
|
-
}, async ({ form_id, title, is_published, show_step_counter, disable_back_navigation, total_steps, primary_color, background_color, font_family, embed_autoplay, description, author, brand_name, logo_url, tags }) => {
|
|
76
|
-
const body = {};
|
|
77
|
-
if (title !== undefined)
|
|
78
|
-
body.title = title;
|
|
79
|
-
if (is_published !== undefined)
|
|
80
|
-
body.is_published = is_published;
|
|
81
|
-
if (show_step_counter !== undefined)
|
|
82
|
-
body.show_step_counter = show_step_counter;
|
|
83
|
-
if (disable_back_navigation !== undefined)
|
|
84
|
-
body.disable_back_navigation = disable_back_navigation;
|
|
85
|
-
if (total_steps !== undefined)
|
|
86
|
-
body.total_steps = total_steps;
|
|
87
|
-
if (primary_color !== undefined)
|
|
88
|
-
body.primary_color = primary_color;
|
|
89
|
-
if (background_color !== undefined)
|
|
90
|
-
body.background_color = background_color;
|
|
91
|
-
if (font_family !== undefined)
|
|
92
|
-
body.font_family = font_family;
|
|
93
|
-
if (embed_autoplay !== undefined)
|
|
94
|
-
body.embed_autoplay = embed_autoplay;
|
|
95
|
-
if (description !== undefined)
|
|
96
|
-
body.description = description;
|
|
97
|
-
if (author !== undefined)
|
|
98
|
-
body.author = author;
|
|
99
|
-
if (brand_name !== undefined)
|
|
100
|
-
body.brand_name = brand_name;
|
|
101
|
-
if (logo_url !== undefined)
|
|
102
|
-
body.logo_url = logo_url;
|
|
103
|
-
if (Object.keys(body).length > 0) {
|
|
104
|
-
const result = await callApi(`/forms/${form_id}`, {
|
|
105
|
-
method: "PATCH",
|
|
106
|
-
body,
|
|
107
|
-
});
|
|
108
|
-
if (!result.ok) {
|
|
109
|
-
return errorResult(result.error);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
if (tags) {
|
|
113
|
-
const tagResult = await callApi(`/forms/${form_id}/tags`, {
|
|
114
|
-
method: "PUT",
|
|
115
|
-
body: { tags },
|
|
116
|
-
});
|
|
117
|
-
if (!tagResult.ok) {
|
|
118
|
-
return errorResult(tagResult.error);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
const updates = [];
|
|
122
|
-
if (title !== undefined)
|
|
123
|
-
updates.push(`Title → "${title}"`);
|
|
124
|
-
if (is_published !== undefined)
|
|
125
|
-
updates.push(`Published → ${is_published}`);
|
|
126
|
-
if (show_step_counter !== undefined)
|
|
127
|
-
updates.push(`Step counter → ${show_step_counter}`);
|
|
128
|
-
if (disable_back_navigation !== undefined)
|
|
129
|
-
updates.push(`Back navigation → ${disable_back_navigation ? "disabled" : "enabled"}`);
|
|
130
|
-
if (total_steps !== undefined)
|
|
131
|
-
updates.push(`Total steps → ${total_steps === null ? "auto" : total_steps}`);
|
|
132
|
-
if (primary_color !== undefined)
|
|
133
|
-
updates.push(`Primary color → ${primary_color}`);
|
|
134
|
-
if (background_color !== undefined)
|
|
135
|
-
updates.push(`Background color → ${background_color}`);
|
|
136
|
-
if (font_family !== undefined)
|
|
137
|
-
updates.push(`Font → ${font_family}`);
|
|
138
|
-
if (embed_autoplay !== undefined)
|
|
139
|
-
updates.push(`Embed autoplay → ${embed_autoplay}`);
|
|
140
|
-
if (description !== undefined)
|
|
141
|
-
updates.push(`Description → ${description === null ? "cleared" : `"${description}"`}`);
|
|
142
|
-
if (author !== undefined)
|
|
143
|
-
updates.push(`Author → ${author === null ? "cleared" : `"${author}"`}`);
|
|
144
|
-
if (brand_name !== undefined)
|
|
145
|
-
updates.push(`Brand name → ${brand_name === null ? "cleared" : `"${brand_name}"`}`);
|
|
146
|
-
if (logo_url !== undefined)
|
|
147
|
-
updates.push(`Logo URL → ${logo_url === null ? "cleared" : logo_url}`);
|
|
148
|
-
if (tags)
|
|
149
|
-
updates.push(`Tags → [${tags.join(", ")}]`);
|
|
150
|
-
const confirmMsg = `Form updated:\n${updates.join("\n")}`;
|
|
151
|
-
const formState = await fetchAndFormatFormState(form_id);
|
|
152
|
-
return textResult(formState ? `${confirmMsg}\n\n---\n\n${formState}` : confirmMsg);
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
//# sourceMappingURL=update-form.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-form.js","sourceRoot":"","sources":["../../src/tools/update-form.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,MAAM,UAAU,sBAAsB,CAAC,MAAiB;IACtD,MAAM,CAAC,YAAY,CACjB,sBAAsB,EACtB;QACE,KAAK,EAAE,iBAAiB;QACxB,WAAW,EAAE,8GAA8G;QAC3H,WAAW,EAAE;YACX,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,uFAAuF,CAAC;YAC5H,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;YACvD,YAAY,EAAE,CAAC;iBACZ,OAAO,EAAE;iBACT,QAAQ,EAAE;iBACV,QAAQ,CAAC,4CAA4C,CAAC;YACzD,iBAAiB,EAAE,CAAC;iBACjB,OAAO,EAAE;iBACT,QAAQ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