@clipform/mcp-server 1.42.0 → 1.44.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.
@@ -6,7 +6,7 @@ import {
6
6
  getWorkflowText,
7
7
  objectType,
8
8
  registerPrompts
9
- } from "./chunk-UGVXQM5S.js";
9
+ } from "./chunk-T6B4O3O7.js";
10
10
  import {
11
11
  GUIDE_TYPES,
12
12
  QUIZ_VARIANTS,
@@ -14,11 +14,10 @@ import {
14
14
  getGuideUri,
15
15
  guideFallbackText,
16
16
  registerResources
17
- } from "./chunk-EZHJR3UM.js";
17
+ } from "./chunk-GAAMMQM3.js";
18
18
  import {
19
19
  BUSINESS,
20
20
  CONTACT_FIELDS,
21
- FEATURES,
22
21
  FORM_TYPE_ALIASES,
23
22
  KEN_BURNS_EFFECTS,
24
23
  KEN_BURNS_FIT_MODES,
@@ -34,7 +33,7 @@ import {
34
33
  errorResult,
35
34
  resolveFormType,
36
35
  textResult
37
- } from "./chunk-WCC65GB5.js";
36
+ } from "./chunk-PCCTN3T7.js";
38
37
  import {
39
38
  __commonJS,
40
39
  __export,
@@ -17070,22 +17069,7 @@ var NODE_TYPES_DESCRIPTION = (() => {
17070
17069
  }
17071
17070
  return lines.join("\n");
17072
17071
  })();
17073
- var CONFIG_DESCRIPTION = (() => {
17074
- const lines = ["Type-specific configuration. Omit to use defaults. Per-type keys:"];
17075
- for (const type of ACTIVE_NODE_TYPES) {
17076
- const def = NODE_TYPES[type];
17077
- const summary = generateConfigSummary(def.config_schema, type);
17078
- if (summary) {
17079
- let line = ` ${type}: ${summary}`;
17080
- const defaultStr = formatDefaultConfig(def.default_config);
17081
- if (defaultStr) {
17082
- line += `. Defaults: ${defaultStr}`;
17083
- }
17084
- lines.push(line);
17085
- }
17086
- }
17087
- return lines.join("\n");
17088
- })();
17072
+ var CONFIG_FIELD_DESCRIPTION = "Type-specific configuration keyed by node type. Omit to use defaults. Per-type keys, shapes, and defaults are listed in the clipform_create_form description; craft guidance via clipform_get_guide.";
17089
17073
  var STYLE_PRESET_ENUM = external_exports.enum(KEN_BURNS_PRESETS).describe(`Ken Burns style preset: ${KEN_BURNS_PRESETS.join(", ")}`);
17090
17074
  var OptionSchema = external_exports.object({
17091
17075
  content: external_exports.string().describe("Option text"),
@@ -17110,7 +17094,7 @@ var NodeSchema = external_exports.object({
17110
17094
  prompt: external_exports.string().describe("The text shown to the respondent"),
17111
17095
  label: external_exports.string().optional().describe("Short label for the node (used in logic builder). Defaults to the prompt text."),
17112
17096
  required: external_exports.boolean().optional().default(true),
17113
- config: external_exports.record(external_exports.unknown()).optional().describe(CONFIG_DESCRIPTION),
17097
+ config: external_exports.record(external_exports.unknown()).optional().describe(CONFIG_FIELD_DESCRIPTION),
17114
17098
  options: external_exports.array(OptionSchema).optional().describe(OPTIONS_DESCRIPTION)
17115
17099
  });
17116
17100
  function applyNodeDefaults(node) {
@@ -17640,7 +17624,7 @@ var NodeUpdateSchema = external_exports.object({
17640
17624
  label: external_exports.string().optional().describe("Short label for the node (used in logic builder)"),
17641
17625
  type: external_exports.enum(ACTIVE_NODE_TYPES).optional().describe("Change the node type"),
17642
17626
  required: external_exports.boolean().optional().describe("Whether an answer is required"),
17643
- config: external_exports.record(external_exports.unknown()).optional().describe(CONFIG_DESCRIPTION),
17627
+ config: external_exports.record(external_exports.unknown()).optional().describe(CONFIG_FIELD_DESCRIPTION),
17644
17628
  options: external_exports.array(OptionSchema).optional().describe(
17645
17629
  "Replace all options (for choice nodes). Omit to keep existing options."
17646
17630
  )
@@ -17912,42 +17896,6 @@ function registerDeleteNodeMediaTool(server) {
17912
17896
  );
17913
17897
  }
17914
17898
 
17915
- // src/tools/attach-node-audio.ts
17916
- function registerAttachNodeAudioTool(server) {
17917
- if (!FEATURES.audio_attachments.enabled) return;
17918
- server.registerTool(
17919
- "clipform_attach_audio",
17920
- {
17921
- title: "Attach Audio to Node",
17922
- description: `Attach an audio file to a form node - takes a URL from clipform_search_music or any public audio file. Use this for quiz answer sound effects, ambient audio on welcome screens, or background music on any node. The audio auto-plays once when a respondent reaches the node (replays if they return). Accepts WAV, MP3, or OGG. The node must already have an image or video attached via clipform_upload_node_media.`,
17923
- inputSchema: {
17924
- form_id: external_exports.string().uuid().describe("The form UUID (returned by clipform_create_form, not the short share_id from the URL)"),
17925
- node_id: external_exports.string().describe("The node ID (must already have media attached)"),
17926
- url: external_exports.string().url().describe("Public URL to the audio file (WAV, MP3, or OGG)")
17927
- },
17928
- annotations: {
17929
- readOnlyHint: false,
17930
- destructiveHint: false,
17931
- idempotentHint: true,
17932
- openWorldHint: true
17933
- }
17934
- },
17935
- async ({ form_id, node_id, url }) => {
17936
- const result = await callApi(
17937
- `/forms/${form_id}/nodes/${node_id}/audio`,
17938
- {
17939
- method: "PUT",
17940
- body: { url }
17941
- }
17942
- );
17943
- if (!result.ok) {
17944
- return errorResult(result.error);
17945
- }
17946
- return textResult(`Audio attached to node ${node_id}.`);
17947
- }
17948
- );
17949
- }
17950
-
17951
17899
  // src/tools/set-node-logic.ts
17952
17900
  var LogicRuleSchema = external_exports.object({
17953
17901
  option_content: external_exports.string().optional().describe(
@@ -18411,7 +18359,7 @@ function registerSearchMusicTool(server) {
18411
18359
  "clipform_search_music",
18412
18360
  {
18413
18361
  title: "Search Music",
18414
- description: `Search for royalty-free music tracks and ambient sounds. Quiz forms especially benefit from background music - it keeps energy up between questions. Also consider it for multi-step surveys and longer forms. Use with clipform_attach_audio to add a track to a form node. Returns download URLs, duration, artist, and license info.`,
18362
+ description: `Search for royalty-free music tracks and ambient sounds. Quiz forms especially benefit from background music - it keeps energy up between questions. Also consider it for multi-step surveys and longer forms. Pass the returned URL as the audio track to clipform_generate_video or clipform_generate_slideshow. Returns download URLs, duration, artist, and license info.`,
18415
18363
  inputSchema: {
18416
18364
  query: external_exports.string().describe("What to search for (e.g. 'upbeat quiz background', 'calm ambient', 'playful pizzicato')"),
18417
18365
  count: external_exports.number().min(1).max(10).default(5).optional().describe("Max results (default: 5)"),
@@ -18450,6 +18398,14 @@ function summarizeSchema(schema) {
18450
18398
  return "none (renders built-in defaults only - omit inputProps)";
18451
18399
  }
18452
18400
  const required2 = new Set(schema.required ?? []);
18401
+ const keysOf = (prop) => {
18402
+ const props = prop.properties;
18403
+ if (!props) return "object";
18404
+ const req = new Set(prop.required ?? []);
18405
+ const keys = Object.keys(props).map((k) => `${k}${req.has(k) ? "" : "?"}`);
18406
+ const shown = keys.length > 10 ? [...keys.slice(0, 10), `+${keys.length - 10} more`] : keys;
18407
+ return `{${shown.join(", ")}}`;
18408
+ };
18453
18409
  const typeOf = (prop) => {
18454
18410
  if (prop.enum) {
18455
18411
  return prop.enum.length <= 8 ? prop.enum.map((v) => JSON.stringify(v)).join("|") : `enum(${prop.enum.length} values, e.g. ${JSON.stringify(prop.enum[0])})`;
@@ -18457,6 +18413,7 @@ function summarizeSchema(schema) {
18457
18413
  if (prop.anyOf) return prop.anyOf.map(typeOf).join(" | ");
18458
18414
  if (Array.isArray(prop.type)) return prop.type.join("|");
18459
18415
  if (prop.type === "array") return `${typeOf(prop.items ?? {})}[]`;
18416
+ if (prop.type === "object" || prop.properties) return keysOf(prop);
18460
18417
  return prop.type ?? "object";
18461
18418
  };
18462
18419
  const parts = Object.entries(schema.properties).map(
@@ -18667,7 +18624,14 @@ Returns the current status and, when complete, the output URL. Typical render ti
18667
18624
  pruneJobs();
18668
18625
  const job = getJob(job_id);
18669
18626
  if (!job) {
18670
- return errorResult(`No render job found with ID ${job_id}. Jobs expire after 30 minutes.`);
18627
+ return errorResult(
18628
+ [
18629
+ `No render job found with ID ${job_id}. Jobs expire after 30 minutes and are lost if the server restarts - the render itself may still have completed.`,
18630
+ `To recover, re-run the original render call with identical arguments:`,
18631
+ `- clipform_render_composition results are content-cached: a finished render returns its URL immediately without re-rendering.`,
18632
+ `- clipform_generate_video is not cached and will re-render.`
18633
+ ].join("\n")
18634
+ );
18671
18635
  }
18672
18636
  if (job.status === "rendering") {
18673
18637
  const elapsed = Math.round((Date.now() - job.createdAt) / 1e3);
@@ -18944,6 +18908,7 @@ function createServer(options) {
18944
18908
  instructions: [
18945
18909
  "Clipform builds interactive video-style forms. When the brief is clear, build the form directly; when it's vague, ask one or two short questions first.",
18946
18910
  "Prefer rich media: video over images over plain text.",
18911
+ "Before building, derive a register from the topic and audience (e.g. hype, playful, warm, considered, elegant, sombre); if the user states a mood explicitly, that wins. State the register once, then apply it to every rendering choice - narration tone, motion preset, music, pacing. Never mix registers in one form.",
18947
18912
  "At the start of a build, call clipform_get_workflow to load the recipe for the form type, and clipform_get_guide for craft detail.",
18948
18913
  "Every *_id argument is a UUID returned by the tools - not the short share_id from a form URL.",
18949
18914
  "Deleting a form, node, or its media is permanent; those tools ask the user to confirm before running."
@@ -18981,7 +18946,6 @@ function createServer(options) {
18981
18946
  registerUploadNodeMediaTool(server);
18982
18947
  registerGetNodeMediaTool(server);
18983
18948
  registerDeleteNodeMediaTool(server);
18984
- registerAttachNodeAudioTool(server);
18985
18949
  registerSetNodeLogicTool(server);
18986
18950
  registerLogGenerationTool(server);
18987
18951
  registerSearchNewsTool(server);
@@ -19006,4 +18970,4 @@ export {
19006
18970
  JSONRPCMessageSchema,
19007
18971
  createServer
19008
18972
  };
19009
- //# sourceMappingURL=chunk-GP5MEBVL.js.map
18973
+ //# sourceMappingURL=chunk-VW2HF4TZ.js.map