@clipform/mcp-server 1.23.0 → 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.
@@ -6,14 +6,14 @@ import {
6
6
  getWorkflowText,
7
7
  objectType,
8
8
  registerPrompts
9
- } from "./chunk-UW6HXM2U.js";
9
+ } from "./chunk-P46TFJ3P.js";
10
10
  import {
11
11
  GUIDE_TYPES,
12
12
  QUIZ_VARIANTS,
13
13
  getGuideContent,
14
14
  getGuideUri,
15
15
  registerResources
16
- } from "./chunk-ZJJBZGO6.js";
16
+ } from "./chunk-U4BWWHDU.js";
17
17
  import {
18
18
  BUSINESS,
19
19
  CONTACT_FIELDS,
@@ -29,7 +29,7 @@ import {
29
29
  errorResult,
30
30
  resolveFormType,
31
31
  textResult
32
- } from "./chunk-4EXXG7OF.js";
32
+ } from "./chunk-HIINYZLX.js";
33
33
  import {
34
34
  __commonJS,
35
35
  __export,
@@ -3114,6 +3114,9 @@ var require_utils = __commonJS({
3114
3114
  "use strict";
3115
3115
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
3116
3116
  var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
3117
+ var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
3118
+ var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
3119
+ var isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
3117
3120
  function stringArrayToHexStripped(input) {
3118
3121
  let acc = "";
3119
3122
  let code = 0;
@@ -3306,27 +3309,77 @@ var require_utils = __commonJS({
3306
3309
  }
3307
3310
  return output.join("");
3308
3311
  }
3309
- function normalizeComponentEncoding(component, esc2) {
3310
- const func = esc2 !== true ? escape : unescape;
3311
- if (component.scheme !== void 0) {
3312
- component.scheme = func(component.scheme);
3313
- }
3314
- if (component.userinfo !== void 0) {
3315
- component.userinfo = func(component.userinfo);
3316
- }
3317
- if (component.host !== void 0) {
3318
- component.host = func(component.host);
3312
+ var HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" };
3313
+ var HOST_DELIM_RE = /[@/?#:]/g;
3314
+ var HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
3315
+ function reescapeHostDelimiters(host, isIP) {
3316
+ const re = isIP ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE;
3317
+ re.lastIndex = 0;
3318
+ return host.replace(re, (ch) => HOST_DELIMS[ch]);
3319
+ }
3320
+ function normalizePercentEncoding(input, decodeUnreserved = false) {
3321
+ if (input.indexOf("%") === -1) {
3322
+ return input;
3319
3323
  }
3320
- if (component.path !== void 0) {
3321
- component.path = func(component.path);
3324
+ let output = "";
3325
+ for (let i = 0; i < input.length; i++) {
3326
+ if (input[i] === "%" && i + 2 < input.length) {
3327
+ const hex = input.slice(i + 1, i + 3);
3328
+ if (isHexPair(hex)) {
3329
+ const normalizedHex = hex.toUpperCase();
3330
+ const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
3331
+ if (decodeUnreserved && isUnreserved(decoded)) {
3332
+ output += decoded;
3333
+ } else {
3334
+ output += "%" + normalizedHex;
3335
+ }
3336
+ i += 2;
3337
+ continue;
3338
+ }
3339
+ }
3340
+ output += input[i];
3322
3341
  }
3323
- if (component.query !== void 0) {
3324
- component.query = func(component.query);
3342
+ return output;
3343
+ }
3344
+ function normalizePathEncoding(input) {
3345
+ let output = "";
3346
+ for (let i = 0; i < input.length; i++) {
3347
+ if (input[i] === "%" && i + 2 < input.length) {
3348
+ const hex = input.slice(i + 1, i + 3);
3349
+ if (isHexPair(hex)) {
3350
+ const normalizedHex = hex.toUpperCase();
3351
+ const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
3352
+ if (decoded !== "." && isUnreserved(decoded)) {
3353
+ output += decoded;
3354
+ } else {
3355
+ output += "%" + normalizedHex;
3356
+ }
3357
+ i += 2;
3358
+ continue;
3359
+ }
3360
+ }
3361
+ if (isPathCharacter(input[i])) {
3362
+ output += input[i];
3363
+ } else {
3364
+ output += escape(input[i]);
3365
+ }
3325
3366
  }
3326
- if (component.fragment !== void 0) {
3327
- component.fragment = func(component.fragment);
3367
+ return output;
3368
+ }
3369
+ function escapePreservingEscapes(input) {
3370
+ let output = "";
3371
+ for (let i = 0; i < input.length; i++) {
3372
+ if (input[i] === "%" && i + 2 < input.length) {
3373
+ const hex = input.slice(i + 1, i + 3);
3374
+ if (isHexPair(hex)) {
3375
+ output += "%" + hex.toUpperCase();
3376
+ i += 2;
3377
+ continue;
3378
+ }
3379
+ }
3380
+ output += escape(input[i]);
3328
3381
  }
3329
- return component;
3382
+ return output;
3330
3383
  }
3331
3384
  function recomposeAuthority(component) {
3332
3385
  const uriTokens = [];
@@ -3341,7 +3394,7 @@ var require_utils = __commonJS({
3341
3394
  if (ipV6res.isIPV6 === true) {
3342
3395
  host = `[${ipV6res.escapedHost}]`;
3343
3396
  } else {
3344
- host = component.host;
3397
+ host = reescapeHostDelimiters(host, false);
3345
3398
  }
3346
3399
  }
3347
3400
  uriTokens.push(host);
@@ -3355,7 +3408,10 @@ var require_utils = __commonJS({
3355
3408
  module.exports = {
3356
3409
  nonSimpleDomain,
3357
3410
  recomposeAuthority,
3358
- normalizeComponentEncoding,
3411
+ reescapeHostDelimiters,
3412
+ normalizePercentEncoding,
3413
+ normalizePathEncoding,
3414
+ escapePreservingEscapes,
3359
3415
  removeDotSegments,
3360
3416
  isIPv4,
3361
3417
  isUUID,
@@ -3579,12 +3635,12 @@ var require_schemes = __commonJS({
3579
3635
  var require_fast_uri = __commonJS({
3580
3636
  "../../node_modules/fast-uri/index.js"(exports, module) {
3581
3637
  "use strict";
3582
- var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils();
3638
+ var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
3583
3639
  var { SCHEMES, getSchemeHandler } = require_schemes();
3584
3640
  function normalize(uri, options) {
3585
3641
  if (typeof uri === "string") {
3586
3642
  uri = /** @type {T} */
3587
- serialize(parse3(uri, options), options);
3643
+ normalizeString(uri, options);
3588
3644
  } else if (typeof uri === "object") {
3589
3645
  uri = /** @type {T} */
3590
3646
  parse3(serialize(uri, options), options);
@@ -3651,19 +3707,9 @@ var require_fast_uri = __commonJS({
3651
3707
  return target;
3652
3708
  }
3653
3709
  function equal(uriA, uriB, options) {
3654
- if (typeof uriA === "string") {
3655
- uriA = unescape(uriA);
3656
- uriA = serialize(normalizeComponentEncoding(parse3(uriA, options), true), { ...options, skipEscape: true });
3657
- } else if (typeof uriA === "object") {
3658
- uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true });
3659
- }
3660
- if (typeof uriB === "string") {
3661
- uriB = unescape(uriB);
3662
- uriB = serialize(normalizeComponentEncoding(parse3(uriB, options), true), { ...options, skipEscape: true });
3663
- } else if (typeof uriB === "object") {
3664
- uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true });
3665
- }
3666
- return uriA.toLowerCase() === uriB.toLowerCase();
3710
+ const normalizedA = normalizeComparableURI(uriA, options);
3711
+ const normalizedB = normalizeComparableURI(uriB, options);
3712
+ return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA.toLowerCase() === normalizedB.toLowerCase();
3667
3713
  }
3668
3714
  function serialize(cmpts, opts) {
3669
3715
  const component = {
@@ -3688,12 +3734,12 @@ var require_fast_uri = __commonJS({
3688
3734
  if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
3689
3735
  if (component.path !== void 0) {
3690
3736
  if (!options.skipEscape) {
3691
- component.path = escape(component.path);
3737
+ component.path = escapePreservingEscapes(component.path);
3692
3738
  if (component.scheme !== void 0) {
3693
3739
  component.path = component.path.split("%3A").join(":");
3694
3740
  }
3695
3741
  } else {
3696
- component.path = unescape(component.path);
3742
+ component.path = normalizePercentEncoding(component.path);
3697
3743
  }
3698
3744
  }
3699
3745
  if (options.reference !== "suffix" && component.scheme) {
@@ -3728,7 +3774,16 @@ var require_fast_uri = __commonJS({
3728
3774
  return uriTokens.join("");
3729
3775
  }
3730
3776
  var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
3731
- function parse3(uri, opts) {
3777
+ function getParseError(parsed, matches) {
3778
+ if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") {
3779
+ return 'URI path must start with "/" when authority is present.';
3780
+ }
3781
+ if (typeof parsed.port === "number" && (parsed.port < 0 || parsed.port > 65535)) {
3782
+ return "URI port is malformed.";
3783
+ }
3784
+ return void 0;
3785
+ }
3786
+ function parseWithStatus(uri, opts) {
3732
3787
  const options = Object.assign({}, opts);
3733
3788
  const parsed = {
3734
3789
  scheme: void 0,
@@ -3739,6 +3794,7 @@ var require_fast_uri = __commonJS({
3739
3794
  query: void 0,
3740
3795
  fragment: void 0
3741
3796
  };
3797
+ let malformedAuthorityOrPort = false;
3742
3798
  let isIP = false;
3743
3799
  if (options.reference === "suffix") {
3744
3800
  if (options.scheme) {
@@ -3759,6 +3815,11 @@ var require_fast_uri = __commonJS({
3759
3815
  if (isNaN(parsed.port)) {
3760
3816
  parsed.port = matches[5];
3761
3817
  }
3818
+ const parseError = getParseError(parsed, matches);
3819
+ if (parseError !== void 0) {
3820
+ parsed.error = parsed.error || parseError;
3821
+ malformedAuthorityOrPort = true;
3822
+ }
3762
3823
  if (parsed.host) {
3763
3824
  const ipv4result = isIPv4(parsed.host);
3764
3825
  if (ipv4result === false) {
@@ -3797,14 +3858,18 @@ var require_fast_uri = __commonJS({
3797
3858
  parsed.scheme = unescape(parsed.scheme);
3798
3859
  }
3799
3860
  if (parsed.host !== void 0) {
3800
- parsed.host = unescape(parsed.host);
3861
+ parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP);
3801
3862
  }
3802
3863
  }
3803
3864
  if (parsed.path) {
3804
- parsed.path = escape(unescape(parsed.path));
3865
+ parsed.path = normalizePathEncoding(parsed.path);
3805
3866
  }
3806
3867
  if (parsed.fragment) {
3807
- parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
3868
+ try {
3869
+ parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
3870
+ } catch {
3871
+ parsed.error = parsed.error || "URI malformed";
3872
+ }
3808
3873
  }
3809
3874
  }
3810
3875
  if (schemeHandler && schemeHandler.parse) {
@@ -3813,7 +3878,29 @@ var require_fast_uri = __commonJS({
3813
3878
  } else {
3814
3879
  parsed.error = parsed.error || "URI can not be parsed.";
3815
3880
  }
3816
- return parsed;
3881
+ return { parsed, malformedAuthorityOrPort };
3882
+ }
3883
+ function parse3(uri, opts) {
3884
+ return parseWithStatus(uri, opts).parsed;
3885
+ }
3886
+ function normalizeString(uri, opts) {
3887
+ return normalizeStringWithStatus(uri, opts).normalized;
3888
+ }
3889
+ function normalizeStringWithStatus(uri, opts) {
3890
+ const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts);
3891
+ return {
3892
+ normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),
3893
+ malformedAuthorityOrPort
3894
+ };
3895
+ }
3896
+ function normalizeComparableURI(uri, opts) {
3897
+ if (typeof uri === "string") {
3898
+ const { normalized, malformedAuthorityOrPort } = normalizeStringWithStatus(uri, opts);
3899
+ return malformedAuthorityOrPort ? void 0 : normalized;
3900
+ }
3901
+ if (typeof uri === "object") {
3902
+ return serialize(uri, opts);
3903
+ }
3817
3904
  }
3818
3905
  var fastUri = {
3819
3906
  SCHEMES,
@@ -17226,11 +17313,7 @@ function registerListFormsTool(server) {
17226
17313
  for (const f of data.forms) {
17227
17314
  const status = f.is_live ? "live" : "draft";
17228
17315
  const tagStr = f.tags.length > 0 ? ` [${f.tags.map((t) => t.name).join(", ")}]` : "";
17229
- lines.push(`- **${f.title || "(untitled)"}** [${status}]${tagStr}`);
17230
- lines.push(` ID: ${f.id}`);
17231
- lines.push(` Share ID: ${f.share_id}`);
17232
- lines.push(` Created: ${f.created_at}`);
17233
- lines.push("");
17316
+ lines.push(`- ${f.title || "(untitled)"} (${status})${tagStr} \u2014 ${f.id}`);
17234
17317
  }
17235
17318
  if (data.next_cursor) {
17236
17319
  lines.push(
@@ -17268,11 +17351,6 @@ function formatFormState(data) {
17268
17351
  }
17269
17352
  return lines.join("\n");
17270
17353
  }
17271
- async function fetchAndFormatFormState(formId) {
17272
- const result = await callApi(`/forms/${formId}`);
17273
- if (!result.ok) return null;
17274
- return formatFormState(result.data);
17275
- }
17276
17354
 
17277
17355
  // src/tools/get-form.ts
17278
17356
  function registerGetFormTool(server) {
@@ -17321,6 +17399,9 @@ function registerUpdateFormTool(server) {
17321
17399
  description: external_exports.string().nullable().optional().describe("SEO description (meta description, og:description). Set null to clear."),
17322
17400
  author: external_exports.string().nullable().optional().describe("AI-PROTECTED: Only set when the user explicitly provides an author name. Set null to clear."),
17323
17401
  logo_url: external_exports.string().nullable().optional().describe("AI-PROTECTED: Only set when the user explicitly provides a logo URL. Set null to clear."),
17402
+ embed_autoplay: external_exports.boolean().optional().describe("Auto-play video when embed loads. Default false."),
17403
+ show_branding: external_exports.boolean().optional().describe("Show Clipform branding. Set false to remove (Pro plan)."),
17404
+ brand_name: external_exports.string().nullable().optional().describe("AI-PROTECTED: Custom brand name shown in footer. Only set when user explicitly provides."),
17324
17405
  tags: external_exports.array(external_exports.string()).optional().describe("Replace all tags on this form. Pass the full desired set (e.g. ['quiz', 'trivia', 'slug:elephants']). Omit to leave tags unchanged.")
17325
17406
  },
17326
17407
  annotations: {
@@ -17330,7 +17411,7 @@ function registerUpdateFormTool(server) {
17330
17411
  openWorldHint: true
17331
17412
  }
17332
17413
  },
17333
- async ({ form_id, title, is_live, show_step_counter, disable_back_navigation, total_steps, primary_color, background_color, font_family, description, author, logo_url, tags }) => {
17414
+ async ({ form_id, title, is_live, show_step_counter, disable_back_navigation, total_steps, primary_color, background_color, font_family, description, author, logo_url, embed_autoplay, show_branding, brand_name, tags }) => {
17334
17415
  const body = {};
17335
17416
  if (title !== void 0) body.title = title;
17336
17417
  if (is_live !== void 0) body.is_live = is_live;
@@ -17343,6 +17424,9 @@ function registerUpdateFormTool(server) {
17343
17424
  if (description !== void 0) body.description = description;
17344
17425
  if (author !== void 0) body.author = author;
17345
17426
  if (logo_url !== void 0) body.logo_url = logo_url;
17427
+ if (embed_autoplay !== void 0 && FEATURES.embed_autoplay.enabled) body.embed_autoplay = embed_autoplay;
17428
+ if (show_branding !== void 0) body.show_branding = show_branding;
17429
+ if (brand_name !== void 0) body.brand_name = brand_name;
17346
17430
  if (Object.keys(body).length > 0) {
17347
17431
  const result = await callApi(`/forms/${form_id}`, {
17348
17432
  method: "PATCH",
@@ -17383,16 +17467,15 @@ function registerUpdateFormTool(server) {
17383
17467
  updates.push(`Author \u2192 ${author === null ? "cleared" : `"${author}"`}`);
17384
17468
  if (logo_url !== void 0)
17385
17469
  updates.push(`Logo URL \u2192 ${logo_url === null ? "cleared" : logo_url}`);
17470
+ if (embed_autoplay !== void 0)
17471
+ updates.push(`Embed autoplay \u2192 ${embed_autoplay}`);
17472
+ if (show_branding !== void 0)
17473
+ updates.push(`Show branding \u2192 ${show_branding}`);
17474
+ if (brand_name !== void 0)
17475
+ updates.push(`Brand name \u2192 ${brand_name === null ? "cleared" : `"${brand_name}"`}`);
17386
17476
  if (tags)
17387
17477
  updates.push(`Tags \u2192 [${tags.join(", ")}]`);
17388
- const confirmMsg = `Form updated:
17389
- ${updates.join("\n")}`;
17390
- const formState = await fetchAndFormatFormState(form_id);
17391
- return textResult(formState ? `${confirmMsg}
17392
-
17393
- ---
17394
-
17395
- ${formState}` : confirmMsg);
17478
+ return textResult(`Form updated: ${updates.join(", ")}`);
17396
17479
  }
17397
17480
  );
17398
17481
  }
@@ -17462,18 +17545,9 @@ function registerAddNodeTool(server) {
17462
17545
  if (!result.ok) {
17463
17546
  return errorResult(result.error);
17464
17547
  }
17465
- const confirmMsg = [
17466
- `Node added successfully!`,
17467
- `Node ID: ${result.data.node_id}`,
17468
- `Type: ${node.type}`,
17469
- `Prompt: ${node.prompt}`
17470
- ].join("\n");
17471
- const formState = await fetchAndFormatFormState(form_id);
17472
- return textResult(formState ? `${confirmMsg}
17473
-
17474
- ---
17475
-
17476
- ${formState}` : confirmMsg);
17548
+ return textResult(
17549
+ `Node added. ID: ${result.data.node_id} | Type: ${node.type}`
17550
+ );
17477
17551
  }
17478
17552
  );
17479
17553
  }
@@ -17535,13 +17609,7 @@ function registerUpdateNodeTool(server) {
17535
17609
  changes.push(`Options \u2192 ${options.map((o) => o.content).join(", ")}`);
17536
17610
  allLines.push(`Node ${node_id} updated: ${changes.join(", ")}`);
17537
17611
  }
17538
- const confirmMsg = allLines.join("\n");
17539
- const formState = await fetchAndFormatFormState(form_id);
17540
- return textResult(formState ? `${confirmMsg}
17541
-
17542
- ---
17543
-
17544
- ${formState}` : confirmMsg);
17612
+ return textResult(allLines.join("\n"));
17545
17613
  }
17546
17614
  );
17547
17615
  }
@@ -17572,13 +17640,7 @@ function registerDeleteNodeTool(server) {
17572
17640
  if (!result.ok) {
17573
17641
  return errorResult(result.error);
17574
17642
  }
17575
- const confirmMsg = `Node ${node_id} deleted. The logic chain has been re-linked.`;
17576
- const formState = await fetchAndFormatFormState(form_id);
17577
- return textResult(formState ? `${confirmMsg}
17578
-
17579
- ---
17580
-
17581
- ${formState}` : confirmMsg);
17643
+ return textResult(`Node ${node_id} deleted.`);
17582
17644
  }
17583
17645
  );
17584
17646
  }
@@ -17703,13 +17765,12 @@ function registerGetNodeMediaTool(server) {
17703
17765
  return textResult("No media attached to this node.");
17704
17766
  }
17705
17767
  return textResult(
17706
- `Media ID: ${media.id}
17707
- Type: ${media.media_type}
17708
- Status: ${media.status}
17709
- ` + (media.playback_id ? `Playback ID: ${media.playback_id}
17710
- ` : "") + (media.storage_path ? `Storage path: ${media.storage_path}
17711
- ` : "") + (media.duration ? `Duration: ${media.duration}s
17712
- ` : "") + `Transcription: ${media.transcription_status}`
17768
+ [
17769
+ `Type: ${media.media_type}`,
17770
+ `Status: ${media.status}`,
17771
+ media.duration ? `Duration: ${media.duration}s` : "",
17772
+ `Transcription: ${media.transcription_status}`
17773
+ ].filter(Boolean).join("\n")
17713
17774
  );
17714
17775
  }
17715
17776
  );
@@ -17777,10 +17838,7 @@ function registerAttachNodeAudioTool(server) {
17777
17838
  if (!result.ok) {
17778
17839
  return errorResult(result.error);
17779
17840
  }
17780
- return textResult(
17781
- `Audio attached to node ${node_id}.
17782
- Audio path: ${result.data.audio_storage_path}`
17783
- );
17841
+ return textResult(`Audio attached to node ${node_id}.`);
17784
17842
  }
17785
17843
  );
17786
17844
  }
@@ -17837,13 +17895,7 @@ Example:
17837
17895
  }
17838
17896
  allLines.push(`Node ${node_id}: logic set (${result.data.rules_count} rules)`);
17839
17897
  }
17840
- const confirmMsg = allLines.join("\n");
17841
- const formState = await fetchAndFormatFormState(form_id);
17842
- return textResult(formState ? `${confirmMsg}
17843
-
17844
- ---
17845
-
17846
- ${formState}` : confirmMsg);
17898
+ return textResult(allLines.join("\n"));
17847
17899
  }
17848
17900
  );
17849
17901
  }
@@ -18015,9 +18067,7 @@ Pass one item or many (max 10) - multiple items run in parallel. Returns audio U
18015
18067
  if (r.status === "fulfilled" && r.value.ok) {
18016
18068
  successCount++;
18017
18069
  const data = r.value.data;
18018
- lines.push(`Voice: ${data.voice}`);
18019
18070
  lines.push(`Audio URL: ${data.audioUrl}`);
18020
- lines.push(`Storage path: ${data.storagePath}`);
18021
18071
  lines.push(`Captions: ${JSON.stringify(data.captions)}`);
18022
18072
  } else {
18023
18073
  const error2 = r.status === "rejected" ? r.reason?.message || String(r.reason) : r.value.error;
@@ -18031,9 +18081,7 @@ Pass one item or many (max 10) - multiple items run in parallel. Returns audio U
18031
18081
  lines.unshift(`TTS: ${successCount}/${items.length} succeeded
18032
18082
  `);
18033
18083
  }
18034
- lines.push(
18035
- `IMPORTANT: When uploading the final video with clipform_upload_node_media, pass the COMPLETE Captions JSON above as the "captions" parameter \u2014 including the "words" arrays inside each segment. Do NOT strip or simplify the JSON. The viewer needs word-level timing data to display captions.`
18036
- );
18084
+ lines.push(`Pass the complete Captions JSON as the "captions" parameter when uploading.`);
18037
18085
  if (successCount === 0) return errorResult(lines.join("\n"));
18038
18086
  return textResult(lines.join("\n"));
18039
18087
  }
@@ -18046,7 +18094,7 @@ function registerSearchMediaTool(server) {
18046
18094
  "clipform_search_media",
18047
18095
  {
18048
18096
  title: "Search Media",
18049
- description: `Search royalty-free images or stock video clips. Pass one query or many (max 10) - multiple queries run in one call instead of separate tool calls. Use results to feed into clipform_generate_video for narrated slideshow videos, or upload directly as still images via clipform_upload_node_media. All results are royalty-free.`,
18097
+ description: `Search images or stock video clips. Pass one query or many (max 10) - multiple queries run in one call instead of separate tool calls. Use results to feed into clipform_generate_video for narrated slideshow videos, or upload directly as still images via clipform_upload_node_media. All results are pre-cleared for commercial use.`,
18050
18098
  inputSchema: {
18051
18099
  queries: external_exports.array(
18052
18100
  external_exports.object({
@@ -18077,12 +18125,10 @@ function registerSearchMediaTool(server) {
18077
18125
  allLines.push(`Found ${results.length} ${kind}s:
18078
18126
  `);
18079
18127
  for (const item of results.slice(0, 10)) {
18080
- allLines.push(`- [${item.source}] ${item.title}`);
18128
+ allLines.push(`- ${item.title}`);
18081
18129
  allLines.push(` URL: ${item.url}`);
18082
18130
  if (item.width && item.height) allLines.push(` Size: ${item.width}x${item.height}`);
18083
18131
  if (kind === "video" && item.duration) allLines.push(` Duration: ${item.duration}s`);
18084
- if (item.attribution) allLines.push(` Attribution: ${item.attribution}`);
18085
- if (item.license) allLines.push(` License: ${item.license}`);
18086
18132
  allLines.push("");
18087
18133
  }
18088
18134
  }
@@ -18122,16 +18168,7 @@ For narrated Ken Burns slideshows from images, use clipform_generate_video inste
18122
18168
  if (!result.ok) return errorResult(result.error);
18123
18169
  const data = result.data;
18124
18170
  return textResult(
18125
- [
18126
- `Render complete.`,
18127
- ``,
18128
- `Composition: ${compositionId}`,
18129
- `Format: ${data.format || outputFormat}`,
18130
- `Public URL: ${data.public_url}`,
18131
- `Storage path: ${data.storage_path}`,
18132
- ``,
18133
- `Use clipform_upload_node_media with the public URL to attach to a node.`
18134
- ].join("\n")
18171
+ `Render complete. Public URL: ${data.public_url}`
18135
18172
  );
18136
18173
  }
18137
18174
  );
@@ -18314,12 +18351,8 @@ Items: type "image" (Ken Burns motion) or "video" (cover-cropped, muted by defau
18314
18351
  return textResult(
18315
18352
  [
18316
18353
  `Video rendered (${items.length} item${items.length > 1 ? "s" : ""}).`,
18317
- ``,
18318
18354
  `Public URL: ${data.public_url}`,
18319
- `Storage path: ${data.storage_path}`,
18320
- data.duration_seconds ? `Duration: ${data.duration_seconds}s` : "",
18321
- ``,
18322
- `Use clipform_upload_node_media with the public URL to attach to a node.`
18355
+ data.duration_seconds ? `Duration: ${data.duration_seconds}s` : ""
18323
18356
  ].filter(Boolean).join("\n")
18324
18357
  );
18325
18358
  }
@@ -18380,16 +18413,9 @@ Returns the current status and, when complete, the output URL. Typical render ti
18380
18413
  const data = job.result;
18381
18414
  return textResult(
18382
18415
  [
18383
- `Status: complete`,
18384
- `Tool: ${job.tool}`,
18385
- ``,
18416
+ `Render complete.`,
18386
18417
  ...data.public_url ? [`Public URL: ${data.public_url}`] : [],
18387
- ...data.storage_path ? [`Storage path: ${data.storage_path}`] : [],
18388
- ...data.duration_seconds ? [`Duration: ${data.duration_seconds}s`] : [],
18389
- ...data.outputPath ? [`Output: ${data.outputPath}`] : [],
18390
- ...data.format ? [`Format: ${data.format}`] : [],
18391
- ``,
18392
- `Use clipform_upload_node_media with the public URL to attach this video to a node.`
18418
+ ...data.duration_seconds ? [`Duration: ${data.duration_seconds}s`] : []
18393
18419
  ].join("\n")
18394
18420
  );
18395
18421
  }
@@ -18685,4 +18711,4 @@ export {
18685
18711
  JSONRPCMessageSchema,
18686
18712
  createServer
18687
18713
  };
18688
- //# sourceMappingURL=chunk-M3G76QDR.js.map
18714
+ //# sourceMappingURL=chunk-GDPSZSHN.js.map