@clipform/mcp-server 5.5.2 → 5.7.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/README.md CHANGED
@@ -60,7 +60,7 @@ Your MCP client lists these automatically on connect (via `tools/list`). Full re
60
60
  | Tool | Description |
61
61
  |------|-------------|
62
62
  | `clipform_create_form` | Create a new Clipform (interactive video-style form). |
63
- | `clipform_import_form` | Copies the questions from a public Google Form, Typeform, or Tally form into a new Clipform draft. |
63
+ | `clipform_import_form` | Copies the questions from a public Google Form, Typeform, or Tally form into a new Clipform. |
64
64
  | `clipform_list_forms` | List forms in your workspace with optional filtering. |
65
65
  | `clipform_whoami` | Show the current identity: auth mode (api key, oauth, session, or anonymous), active workspace, and plan limits. |
66
66
  | `clipform_get_form` | Retrieve a form's details including all nodes in sequential order and their routing. |
@@ -6,7 +6,7 @@ import {
6
6
  recoveryHint,
7
7
  structuredResult,
8
8
  textResult
9
- } from "./chunk-5TIO2KYJ.js";
9
+ } from "./chunk-D65NJDP5.js";
10
10
  import "./chunk-ENVV65JX.js";
11
11
  import "./chunk-PBQ5BQWD.js";
12
12
  import "./chunk-PZ5AY32C.js";
@@ -31,7 +31,7 @@ import {
31
31
  union,
32
32
  unknown,
33
33
  url
34
- } from "./chunk-XDWEWZEP.js";
34
+ } from "./chunk-S4S6H7GF.js";
35
35
  import {
36
36
  GUIDE_TYPES,
37
37
  QUIZ_VARIANTS,
@@ -40,7 +40,7 @@ import {
40
40
  getGuideUri,
41
41
  guideFallbackText,
42
42
  registerResources
43
- } from "./chunk-CB2TLXLT.js";
43
+ } from "./chunk-7UIXBPTS.js";
44
44
  import {
45
45
  ANON_PREVIEW_LINK_LABEL,
46
46
  ANON_PREVIEW_NOTICE,
@@ -54,7 +54,7 @@ import {
54
54
  isPreviewViewerUrl,
55
55
  previewOnlyNotice,
56
56
  withAdoptedNotice
57
- } from "./chunk-XUCSUWGX.js";
57
+ } from "./chunk-7M2APEB6.js";
58
58
  import {
59
59
  ACTIVE_NODE_TYPES,
60
60
  ANON_MCP_BLOCKED_NODE_TYPES,
@@ -95,7 +95,7 @@ import {
95
95
  stripGatedConfigKeys,
96
96
  structuredResult,
97
97
  textResult
98
- } from "./chunk-5TIO2KYJ.js";
98
+ } from "./chunk-D65NJDP5.js";
99
99
  import {
100
100
  getMcpAuth,
101
101
  runWithMcpAuth,
@@ -16110,7 +16110,7 @@ function joinJobs(labels, conjunction = "and") {
16110
16110
  return `${labels.slice(0, -1).join(", ")}, ${conjunction} ${labels[labels.length - 1]}`;
16111
16111
  }
16112
16112
  var ACTIVE_JOBS_PHRASE = joinJobs(ACTIVE_JOB_LABELS);
16113
- var IMPORT_FORM_LEAD = "Copies the questions from a public Google Form, Typeform, or Tally form into a new Clipform draft. The source form and its responses stay where they are.";
16113
+ var IMPORT_FORM_LEAD = "Copies the questions from a public Google Form, Typeform, or Tally form into a new Clipform. The source form and its responses stay where they are.";
16114
16114
  var INSTRUCTIONS_LEAD = `Clipform builds interactive video-style forms that other people fill in, with their answers (video, audio, or text) stored for the owner to read back: ${ACTIVE_JOBS_PHRASE}. Drafting questions as text to review or paste is a chat task, not a Clipform build.`;
16115
16115
 
16116
16116
  // src/lib/onboarding-copy.ts
@@ -16234,7 +16234,7 @@ var CaptionSchema = external_exports.object({
16234
16234
  var OptionSchema = external_exports.object({
16235
16235
  content: external_exports.string().describe("Option text"),
16236
16236
  is_correct: external_exports.boolean().optional().describe("Mark this option as a correct answer for a quiz. Stored as the answer key; when score is not given it also sets score 1 (or 0 on the others)."),
16237
- score: external_exports.number().optional().describe("Score value for this option (for scored quizzes). Use 1 for correct, 0 for wrong. Scored options automatically enable correct-answer marking (record_scores) and correct/incorrect answer feedback on the node; set config.choice.show_answer_feedback: false to hide the feedback."),
16237
+ score: external_exports.number().int().min(0).max(999).optional().describe("Score value for this option (for scored quizzes). Use 1 for correct, 0 for wrong. Scored options automatically enable correct-answer marking (record_scores) and correct/incorrect answer feedback on the node; set config.choice.show_answer_feedback: false to hide the feedback."),
16238
16238
  // `scores` (category-based) is gated behind custom_scores (planned, #767) -
16239
16239
  // omitted from the schema while off so the MCP doesn't accept a not-live field.
16240
16240
  ...FEATURE_FLAGS.ENABLE_CUSTOM_SCORES ? { scores: external_exports.record(external_exports.string(), external_exports.number()).optional().describe("Category-based scores keyed by category name (personality quizzes).") } : {}
@@ -16851,7 +16851,7 @@ function detectFormToolLabel(url2) {
16851
16851
  return "other";
16852
16852
  }
16853
16853
 
16854
- // ../form-sources/dist/index.js
16854
+ // ../form-sources/dist/detect.js
16855
16855
  var IMPORTABLE_PROVIDERS = ["google", "typeform", "tally"];
16856
16856
  function detectProvider(url2) {
16857
16857
  let parsed;
@@ -16893,14 +16893,19 @@ function registerImportFormTool(server) {
16893
16893
  "clipform_import_form",
16894
16894
  {
16895
16895
  title: "Import Form",
16896
- description: `${IMPORT_FORM_LEAD} Supported URLs: Google Forms (docs.google.com or forms.gle - must be shared as "Anyone with the link"), Typeform (form.typeform.com/to/...), and Tally (tally.so - must be public). The source form must be publicly accessible; a private form's questions cannot be read. The new Clipform is created as a DRAFT - review it, then republish with clipform_update_form (is_live: true) once it's ready. Some question types don't map cleanly to a Clipform node and are skipped rather than guessed at; the result always reports exactly what was imported vs skipped, and why.`,
16896
+ description: `${IMPORT_FORM_LEAD} Supported URLs: Google Forms (docs.google.com or forms.gle - must be shared as "Anyone with the link"), Typeform (form.typeform.com/to/...), and Tally (tally.so - must be public). The source form must be publicly accessible; a private form's questions cannot be read. The new Clipform goes live straight away unless you pass is_live: false (then it stays a draft with a preview link, and clipform_update_form with is_live: true publishes it later). An anonymous guest's import is checked first and stays a draft with a preview link if that check refuses it. Some question types don't map cleanly to a Clipform node and are skipped rather than guessed at; the result always reports exactly what was imported vs skipped, and why.`,
16897
16897
  inputSchema: external_exports.object({
16898
16898
  workspace_id: workspaceIdInput,
16899
- url: external_exports.string().url().describe("Public URL of the Google Form, Typeform, or Tally form to import")
16899
+ url: external_exports.string().url().describe("Public URL of the Google Form, Typeform, or Tally form to import"),
16900
+ is_live: external_exports.boolean().optional().describe("Publish the imported form right away. Default true. Pass false to keep it a draft (use preview_url to review it).")
16900
16901
  }),
16901
16902
  outputSchema: external_exports.object({
16902
16903
  form_id: external_exports.string().nullable().describe("New form's UUID - pass to follow-up tools. Null when no importable questions were found (nothing was created)."),
16903
- viewer_url: external_exports.string().nullable().describe("The address this form WILL be live at once published (clipform_update_form with is_live: true) - it is a draft and is NOT viewable by anyone yet; opening it now shows a maintenance screen, not the form. Null when no importable questions were found."),
16904
+ viewer_url: external_exports.string().nullable().describe("The form's public address. It is live now when is_live is true; otherwise it is where the form WILL be live once published (clipform_update_form with is_live: true), and opening it now shows a maintenance screen. Null when no importable questions were found."),
16905
+ is_live: external_exports.boolean().nullable().describe("True when the imported form is live at viewer_url. False for a draft, and also false when nothing was created. Null only when the API did not say (treat as a draft)."),
16906
+ preview_url: external_exports.string().nullable().describe("A time-limited link to view the unpublished draft right now - open this one to review a draft. Null when the form is live or nothing was created."),
16907
+ builder_url: external_exports.string().nullable().describe("Link to edit the form in the Clipform builder. Null for an anonymous session or when nothing was created."),
16908
+ live_refused_reason: external_exports.string().nullable().describe("Why an anonymous guest's import was kept as a draft instead of going live. Null otherwise."),
16904
16909
  import_summary: external_exports.object({
16905
16910
  title: external_exports.string().describe("Title of the source form"),
16906
16911
  total_questions: external_exports.number().describe("Total questions found in the source form"),
@@ -16920,7 +16925,7 @@ function registerImportFormTool(server) {
16920
16925
  openWorldHint: true
16921
16926
  }
16922
16927
  },
16923
- async ({ url: url2 }) => {
16928
+ async ({ url: url2, is_live }) => {
16924
16929
  const platform = detectImportPlatform(url2);
16925
16930
  if (!platform) {
16926
16931
  return errorResult(unsupportedUrlMessage(detectFormToolLabel(url2)));
@@ -16937,7 +16942,8 @@ function registerImportFormTool(server) {
16937
16942
  "No workspace available. This usually means authentication is misconfigured - check your API key or OAuth connection."
16938
16943
  );
16939
16944
  }
16940
- const importResult = platform === "google" ? await callApi("/forms/import/google", { method: "POST", body: { url: url2, workspace_id: workspaceId } }) : platform === "typeform" ? await callApi("/forms/import/typeform", { method: "POST", body: { url: url2, workspace_id: workspaceId } }) : await callApi("/forms/import/tally", { method: "POST", body: { url: url2, workspace_id: workspaceId } });
16945
+ const body = { url: url2, workspace_id: workspaceId, ...is_live !== void 0 ? { is_live } : {} };
16946
+ const importResult = platform === "google" ? await callApi("/forms/import/google", { method: "POST", body }) : platform === "typeform" ? await callApi("/forms/import/typeform", { method: "POST", body }) : await callApi("/forms/import/tally", { method: "POST", body });
16941
16947
  if (!importResult.ok) {
16942
16948
  return errorResult(importResult.error);
16943
16949
  }
@@ -16945,6 +16951,10 @@ function registerImportFormTool(server) {
16945
16951
  const summary = data.import_summary;
16946
16952
  const formId = data.form_id;
16947
16953
  const viewerUrl = data.url;
16954
+ const isLive = data.is_live ?? null;
16955
+ const previewUrl = data.preview_url ?? null;
16956
+ const builderUrl = data.builder_url ?? null;
16957
+ const liveRefusedReason = data.live_refused_reason ?? null;
16948
16958
  const lines = [];
16949
16959
  if (!formId) {
16950
16960
  lines.push(
@@ -16966,19 +16976,29 @@ function registerImportFormTool(server) {
16966
16976
  lines.push(``, `Warnings:`, ...summary.warnings.map((w) => `- ${w}`));
16967
16977
  }
16968
16978
  if (formId) {
16969
- lines.push(
16970
- ``,
16971
- `Form ID: ${formId}`,
16972
- `FUTURE LIVE URL (not viewable yet - the form is a draft; opening this now shows a maintenance screen): ${viewerUrl}`,
16973
- `This form was created as a DRAFT. Review it, then publish with clipform_update_form (is_live: true) - only then does the URL above start serving the form to respondents.`,
16974
- `Pass form_id (the UUID above, not a share_id) to follow-up tools (get_form, add_node, update_node, etc.).`
16975
- );
16979
+ lines.push(``, `Form ID: ${formId}`);
16980
+ if (isLive === true) {
16981
+ lines.push(`Live at: ${viewerUrl}`);
16982
+ } else {
16983
+ if (previewUrl) lines.push(`Preview the draft now: ${previewUrl}`);
16984
+ lines.push(
16985
+ `FUTURE LIVE URL (not viewable yet - the form is a draft; opening this now shows a maintenance screen): ${viewerUrl}`,
16986
+ `This form is a DRAFT. Review it, then publish with clipform_update_form (is_live: true) - only then does the URL above start serving the form to respondents.`
16987
+ );
16988
+ if (liveRefusedReason) lines.push(`Not live because: ${liveRefusedReason}`);
16989
+ }
16990
+ if (builderUrl) lines.push(`Edit it in the builder: ${builderUrl}`);
16991
+ lines.push(`Pass form_id (the UUID above, not a share_id) to follow-up tools (get_form, add_node, update_node, etc.).`);
16976
16992
  }
16977
16993
  if (formId && workspaceName) lines.push(``, `Created in workspace '${workspaceName}'.`);
16978
16994
  return structuredResult(lines.join("\n"), {
16979
16995
  ...workspaceName ? { workspace_name: workspaceName } : {},
16980
16996
  form_id: formId,
16981
16997
  viewer_url: viewerUrl,
16998
+ is_live: isLive,
16999
+ preview_url: previewUrl,
17000
+ builder_url: builderUrl,
17001
+ live_refused_reason: liveRefusedReason,
16982
17002
  import_summary: {
16983
17003
  title: summary.title,
16984
17004
  total_questions: summary.total_questions,
@@ -20645,4 +20665,4 @@ export {
20645
20665
  * MIT Licensed
20646
20666
  *)
20647
20667
  */
20648
- //# sourceMappingURL=chunk-F3BS23QG.js.map
20668
+ //# sourceMappingURL=chunk-7F36T6AQ.js.map