@avallon-labs/mcp 62.1.0-staging.1334 → 62.2.0-staging.1335

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/index.js CHANGED
@@ -56,5 +56,5 @@ function describeErrors(body) {
56
56
 
57
57
  // src/index.ts
58
58
  setupFetch();
59
- await import("./server-WNWHYNZ4.js");
59
+ await import("./server-OTXFMKP3.js");
60
60
  //# sourceMappingURL=index.js.map
@@ -2663,6 +2663,126 @@ var createForm = async (createFormBody, options) => {
2663
2663
  const data = body ? JSON.parse(body) : {};
2664
2664
  return { data, status: res.status, headers: res.headers };
2665
2665
  };
2666
+ var getListFormsUrl = (params) => {
2667
+ const normalizedParams = new URLSearchParams();
2668
+ Object.entries(params || {}).forEach(([key, value]) => {
2669
+ if (value !== void 0) {
2670
+ normalizedParams.append(key, value === null ? "null" : String(value));
2671
+ }
2672
+ });
2673
+ const stringifiedParams = normalizedParams.toString();
2674
+ return stringifiedParams.length > 0 ? `/v1/forms?${stringifiedParams}` : `/v1/forms`;
2675
+ };
2676
+ var listForms = async (params, options) => {
2677
+ const res = await fetch(
2678
+ getListFormsUrl(params),
2679
+ {
2680
+ ...options,
2681
+ method: "GET"
2682
+ }
2683
+ );
2684
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
2685
+ const data = body ? JSON.parse(body) : {};
2686
+ return { data, status: res.status, headers: res.headers };
2687
+ };
2688
+ var getGetFormUrl = (formId) => {
2689
+ return `/v1/forms/${formId}`;
2690
+ };
2691
+ var getForm = async (formId, options) => {
2692
+ const res = await fetch(
2693
+ getGetFormUrl(formId),
2694
+ {
2695
+ ...options,
2696
+ method: "GET"
2697
+ }
2698
+ );
2699
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
2700
+ const data = body ? JSON.parse(body) : {};
2701
+ return { data, status: res.status, headers: res.headers };
2702
+ };
2703
+ var getUpdateFormUrl = (formId) => {
2704
+ return `/v1/forms/${formId}`;
2705
+ };
2706
+ var updateForm = async (formId, updateFormBody, options) => {
2707
+ const getHeaders = (h) => {
2708
+ if (!h) return {};
2709
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
2710
+ if (Array.isArray(h)) return Object.fromEntries(h);
2711
+ return h;
2712
+ };
2713
+ const res = await fetch(
2714
+ getUpdateFormUrl(formId),
2715
+ {
2716
+ ...options,
2717
+ method: "PATCH",
2718
+ headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
2719
+ body: JSON.stringify(updateFormBody)
2720
+ }
2721
+ );
2722
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
2723
+ const data = body ? JSON.parse(body) : {};
2724
+ return { data, status: res.status, headers: res.headers };
2725
+ };
2726
+ var getListFormVersionsUrl = (formId, params) => {
2727
+ const normalizedParams = new URLSearchParams();
2728
+ Object.entries(params || {}).forEach(([key, value]) => {
2729
+ if (value !== void 0) {
2730
+ normalizedParams.append(key, value === null ? "null" : String(value));
2731
+ }
2732
+ });
2733
+ const stringifiedParams = normalizedParams.toString();
2734
+ return stringifiedParams.length > 0 ? `/v1/forms/${formId}/versions?${stringifiedParams}` : `/v1/forms/${formId}/versions`;
2735
+ };
2736
+ var listFormVersions = async (formId, params, options) => {
2737
+ const res = await fetch(
2738
+ getListFormVersionsUrl(formId, params),
2739
+ {
2740
+ ...options,
2741
+ method: "GET"
2742
+ }
2743
+ );
2744
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
2745
+ const data = body ? JSON.parse(body) : {};
2746
+ return { data, status: res.status, headers: res.headers };
2747
+ };
2748
+ var getGetFormVersionUrl = (formId, version) => {
2749
+ return `/v1/forms/${formId}/versions/${version}`;
2750
+ };
2751
+ var getFormVersion = async (formId, version, options) => {
2752
+ const res = await fetch(
2753
+ getGetFormVersionUrl(formId, version),
2754
+ {
2755
+ ...options,
2756
+ method: "GET"
2757
+ }
2758
+ );
2759
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
2760
+ const data = body ? JSON.parse(body) : {};
2761
+ return { data, status: res.status, headers: res.headers };
2762
+ };
2763
+ var getPromoteFormVersionUrl = (formId, version) => {
2764
+ return `/v1/forms/${formId}/versions/${version}/promote`;
2765
+ };
2766
+ var promoteFormVersion = async (formId, version, promoteFormVersionBody, options) => {
2767
+ const getHeaders = (h) => {
2768
+ if (!h) return {};
2769
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
2770
+ if (Array.isArray(h)) return Object.fromEntries(h);
2771
+ return h;
2772
+ };
2773
+ const res = await fetch(
2774
+ getPromoteFormVersionUrl(formId, version),
2775
+ {
2776
+ ...options,
2777
+ method: "POST",
2778
+ headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
2779
+ body: JSON.stringify(promoteFormVersionBody)
2780
+ }
2781
+ );
2782
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
2783
+ const data = body ? JSON.parse(body) : {};
2784
+ return { data, status: res.status, headers: res.headers };
2785
+ };
2666
2786
  var getCreateFormSubmissionUrl = () => {
2667
2787
  return `/v1/form-submissions`;
2668
2788
  };
@@ -7026,6 +7146,144 @@ var createFormHandler = async (args, options) => {
7026
7146
  structuredContent: res.data
7027
7147
  };
7028
7148
  };
7149
+ var listFormsHandler = async (args, options) => {
7150
+ const res = await listForms(args.queryParams, options);
7151
+ if (res.status >= 400) {
7152
+ return {
7153
+ content: [
7154
+ {
7155
+ type: "text",
7156
+ text: JSON.stringify(res.data ?? null)
7157
+ }
7158
+ ],
7159
+ isError: true
7160
+ };
7161
+ }
7162
+ return {
7163
+ content: [
7164
+ {
7165
+ type: "text",
7166
+ text: JSON.stringify(res.data ?? null)
7167
+ }
7168
+ ],
7169
+ structuredContent: res.data
7170
+ };
7171
+ };
7172
+ var getFormHandler = async (args, options) => {
7173
+ const res = await getForm(args.pathParams.form_id, options);
7174
+ if (res.status >= 400) {
7175
+ return {
7176
+ content: [
7177
+ {
7178
+ type: "text",
7179
+ text: JSON.stringify(res.data ?? null)
7180
+ }
7181
+ ],
7182
+ isError: true
7183
+ };
7184
+ }
7185
+ return {
7186
+ content: [
7187
+ {
7188
+ type: "text",
7189
+ text: JSON.stringify(res.data ?? null)
7190
+ }
7191
+ ],
7192
+ structuredContent: res.data
7193
+ };
7194
+ };
7195
+ var updateFormHandler = async (args, options) => {
7196
+ const res = await updateForm(args.pathParams.form_id, args.bodyParams, options);
7197
+ if (res.status >= 400) {
7198
+ return {
7199
+ content: [
7200
+ {
7201
+ type: "text",
7202
+ text: JSON.stringify(res.data ?? null)
7203
+ }
7204
+ ],
7205
+ isError: true
7206
+ };
7207
+ }
7208
+ return {
7209
+ content: [
7210
+ {
7211
+ type: "text",
7212
+ text: JSON.stringify(res.data ?? null)
7213
+ }
7214
+ ],
7215
+ structuredContent: res.data
7216
+ };
7217
+ };
7218
+ var listFormVersionsHandler = async (args, options) => {
7219
+ const res = await listFormVersions(args.pathParams.form_id, args.queryParams, options);
7220
+ if (res.status >= 400) {
7221
+ return {
7222
+ content: [
7223
+ {
7224
+ type: "text",
7225
+ text: JSON.stringify(res.data ?? null)
7226
+ }
7227
+ ],
7228
+ isError: true
7229
+ };
7230
+ }
7231
+ return {
7232
+ content: [
7233
+ {
7234
+ type: "text",
7235
+ text: JSON.stringify(res.data ?? null)
7236
+ }
7237
+ ],
7238
+ structuredContent: res.data
7239
+ };
7240
+ };
7241
+ var getFormVersionHandler = async (args, options) => {
7242
+ const res = await getFormVersion(args.pathParams.form_id, args.pathParams.version, options);
7243
+ if (res.status >= 400) {
7244
+ return {
7245
+ content: [
7246
+ {
7247
+ type: "text",
7248
+ text: JSON.stringify(res.data ?? null)
7249
+ }
7250
+ ],
7251
+ isError: true
7252
+ };
7253
+ }
7254
+ return {
7255
+ content: [
7256
+ {
7257
+ type: "text",
7258
+ text: JSON.stringify(res.data ?? null)
7259
+ }
7260
+ ],
7261
+ structuredContent: res.data
7262
+ };
7263
+ };
7264
+ var promoteFormVersionHandler = async (args, options) => {
7265
+ const res = await promoteFormVersion(args.pathParams.form_id, args.pathParams.version, args.bodyParams, options);
7266
+ if (res.status >= 400) {
7267
+ return {
7268
+ content: [
7269
+ {
7270
+ type: "text",
7271
+ text: JSON.stringify(res.data ?? null)
7272
+ }
7273
+ ],
7274
+ isError: true
7275
+ };
7276
+ }
7277
+ return {
7278
+ content: [
7279
+ {
7280
+ type: "text",
7281
+ text: JSON.stringify(res.data ?? null)
7282
+ }
7283
+ ],
7284
+ structuredContent: res.data
7285
+ };
7286
+ };
7029
7287
  var createFormSubmissionHandler = async (args, options) => {
7030
7288
  const res = await createFormSubmission(args.bodyParams, options);
7031
7289
  if (res.status >= 400) {
@@ -11820,7 +12078,7 @@ var GetMyAccessParams = zod.object({
11820
12078
  });
11821
12079
  var GetMyAccessResponse = zod.object({
11822
12080
  "data": zod.object({
11823
- "permissions": zod.array(zod.enum(["workers:read", "workers:run", "workers:write", "workers:promote", "case-types:read", "case-types:write", "forms:read", "forms:request", "forms:write", "voice-agents:read", "voice-agents:write", "voice-agents:promote"])).describe("What the caller may do with the entity, through their role or a grant on it. `workers:write` on a worker, `case-types:write` on a case type and `voice-agents:write` on a voice agent also let the caller share it.")
12081
+ "permissions": zod.array(zod.enum(["workers:read", "workers:run", "workers:write", "workers:promote", "case-types:read", "case-types:write", "forms:read", "forms:request", "forms:write", "forms:promote", "voice-agents:read", "voice-agents:write", "voice-agents:promote"])).describe("What the caller may do with the entity, through their role or a grant on it. `workers:write` on a worker, `case-types:write` on a case type and `voice-agents:write` on a voice agent also let the caller share it.")
11824
12082
  }),
11825
12083
  "message": zod.string()
11826
12084
  });
@@ -12507,6 +12765,157 @@ var CreateFormResponse = zod.object({
12507
12765
  }),
12508
12766
  "message": zod.string()
12509
12767
  });
12768
+ var listFormsQueryCountDefault = 50;
12769
+ var listFormsQueryCountMax = 100;
12770
+ var listFormsQueryOffsetDefault = 0;
12771
+ var listFormsQueryOffsetMin = 0;
12772
+ var listFormsQuerySortByDefault = `created_at`;
12773
+ var listFormsQuerySortOrderDefault = `desc`;
12774
+ var ListFormsQueryParams = zod.object({
12775
+ "count": zod.number().min(1).max(listFormsQueryCountMax).default(listFormsQueryCountDefault),
12776
+ "offset": zod.number().min(listFormsQueryOffsetMin).default(listFormsQueryOffsetDefault),
12777
+ "sort_by": zod.enum(["created_at"]).default(listFormsQuerySortByDefault),
12778
+ "sort_order": zod.enum(["asc", "desc"]).default(listFormsQuerySortOrderDefault)
12779
+ });
12780
+ var listFormsResponseMetaTotalMin = -9007199254740991;
12781
+ var listFormsResponseMetaTotalMax = 9007199254740991;
12782
+ var ListFormsResponse = zod.object({
12783
+ "data": zod.array(zod.object({
12784
+ "id": zod.string(),
12785
+ "title": zod.string(),
12786
+ "version": zod.number().describe("Version the schema below belongs to."),
12787
+ "versions": zod.object({
12788
+ "live": zod.number(),
12789
+ "test": zod.number()
12790
+ }),
12791
+ "schema": zod.record(zod.string(), zod.unknown()).describe("JSON Schema (draft 2020-12) of the form's fields, restricted to the renderer subset: a flat object of boolean, string and number fields with `title`, `additionalProperties: false`, optional `if`/`then`/`else`, `allOf`, `dependentRequired` and `$data` bounds. Property order is the display order."),
12792
+ "processor_type": zod.enum(["extractor", "worker"]),
12793
+ "processor_id": zod.string(),
12794
+ "created_at": zod.string().datetime({ "offset": true }),
12795
+ "updated_at": zod.string().datetime({ "offset": true })
12796
+ })),
12797
+ "message": zod.string(),
12798
+ "meta": zod.object({
12799
+ "total": zod.number().int().min(listFormsResponseMetaTotalMin).max(listFormsResponseMetaTotalMax)
12800
+ })
12801
+ });
12802
+ var GetFormParams = zod.object({
12803
+ "form_id": zod.string().uuid()
12804
+ });
12805
+ var GetFormResponse = zod.object({
12806
+ "data": zod.object({
12807
+ "id": zod.string(),
12808
+ "title": zod.string(),
12809
+ "version": zod.number().describe("Version the schema below belongs to."),
12810
+ "versions": zod.object({
12811
+ "live": zod.number(),
12812
+ "test": zod.number()
12813
+ }),
12814
+ "schema": zod.record(zod.string(), zod.unknown()).describe("JSON Schema (draft 2020-12) of the form's fields, restricted to the renderer subset: a flat object of boolean, string and number fields with `title`, `additionalProperties: false`, optional `if`/`then`/`else`, `allOf`, `dependentRequired` and `$data` bounds. Property order is the display order."),
12815
+ "processor_type": zod.enum(["extractor", "worker"]),
12816
+ "processor_id": zod.string(),
12817
+ "created_at": zod.string().datetime({ "offset": true }),
12818
+ "updated_at": zod.string().datetime({ "offset": true })
12819
+ }),
12820
+ "message": zod.string()
12821
+ });
12822
+ var UpdateFormParams = zod.object({
12823
+ "form_id": zod.string().uuid()
12824
+ });
12825
+ var UpdateFormBody = zod.object({
12826
+ "title": zod.string().min(1).optional(),
12827
+ "schema": zod.record(zod.string(), zod.unknown()).optional().describe("JSON Schema (draft 2020-12) of the form's fields, restricted to the renderer subset: a flat object of boolean, string and number fields with `title`, `additionalProperties: false`, optional `if`/`then`/`else`, `allOf`, `dependentRequired` and `$data` bounds. Property order is the display order."),
12828
+ "processor_id": zod.string().uuid().optional().describe("Id of the worker that processes each submission.")
12829
+ });
12830
+ var UpdateFormResponse = zod.object({
12831
+ "data": zod.object({
12832
+ "id": zod.string(),
12833
+ "title": zod.string(),
12834
+ "version": zod.number().describe("Version the schema below belongs to."),
12835
+ "versions": zod.object({
12836
+ "live": zod.number(),
12837
+ "test": zod.number()
12838
+ }),
12839
+ "schema": zod.record(zod.string(), zod.unknown()).describe("JSON Schema (draft 2020-12) of the form's fields, restricted to the renderer subset: a flat object of boolean, string and number fields with `title`, `additionalProperties: false`, optional `if`/`then`/`else`, `allOf`, `dependentRequired` and `$data` bounds. Property order is the display order."),
12840
+ "processor_type": zod.enum(["extractor", "worker"]),
12841
+ "processor_id": zod.string(),
12842
+ "created_at": zod.string().datetime({ "offset": true }),
12843
+ "updated_at": zod.string().datetime({ "offset": true })
12844
+ }),
12845
+ "message": zod.string()
12846
+ });
12847
+ var ListFormVersionsParams = zod.object({
12848
+ "form_id": zod.string().uuid()
12849
+ });
12850
+ var listFormVersionsQueryCountDefault = 50;
12851
+ var listFormVersionsQueryCountMax = 100;
12852
+ var listFormVersionsQueryOffsetDefault = 0;
12853
+ var listFormVersionsQueryOffsetMin = 0;
12854
+ var listFormVersionsQuerySortByDefault = `version`;
12855
+ var listFormVersionsQuerySortOrderDefault = `desc`;
12856
+ var ListFormVersionsQueryParams = zod.object({
12857
+ "count": zod.number().min(1).max(listFormVersionsQueryCountMax).default(listFormVersionsQueryCountDefault),
12858
+ "offset": zod.number().min(listFormVersionsQueryOffsetMin).default(listFormVersionsQueryOffsetDefault),
12859
+ "sort_by": zod.enum(["version"]).default(listFormVersionsQuerySortByDefault),
12860
+ "sort_order": zod.enum(["asc", "desc"]).default(listFormVersionsQuerySortOrderDefault)
12861
+ });
12862
+ var listFormVersionsResponseDataItemVersionMin = -9007199254740991;
12863
+ var listFormVersionsResponseDataItemVersionMax = 9007199254740991;
12864
+ var listFormVersionsResponseMetaTotalMin = -9007199254740991;
12865
+ var listFormVersionsResponseMetaTotalMax = 9007199254740991;
12866
+ var ListFormVersionsResponse = zod.object({
12867
+ "data": zod.array(zod.object({
12868
+ "version": zod.number().int().min(listFormVersionsResponseDataItemVersionMin).max(listFormVersionsResponseDataItemVersionMax),
12869
+ "title": zod.string(),
12870
+ "processor_type": zod.enum(["extractor", "worker"]),
12871
+ "processor_id": zod.string(),
12872
+ "created_by": zod.string(),
12873
+ "created_at": zod.string().datetime({ "offset": true })
12874
+ })),
12875
+ "message": zod.string(),
12876
+ "meta": zod.object({
12877
+ "total": zod.number().int().min(listFormVersionsResponseMetaTotalMin).max(listFormVersionsResponseMetaTotalMax)
12878
+ })
12879
+ });
12880
+ var getFormVersionPathVersionMax = 9007199254740991;
12881
+ var GetFormVersionParams = zod.object({
12882
+ "form_id": zod.string().uuid(),
12883
+ "version": zod.number().int().min(1).max(getFormVersionPathVersionMax)
12884
+ });
12885
+ var GetFormVersionResponse = zod.object({
12886
+ "data": zod.object({
12887
+ "id": zod.string(),
12888
+ "title": zod.string(),
12889
+ "version": zod.number().describe("Version the schema below belongs to."),
12890
+ "versions": zod.object({
12891
+ "live": zod.number(),
12892
+ "test": zod.number()
12893
+ }),
12894
+ "schema": zod.record(zod.string(), zod.unknown()).describe("JSON Schema (draft 2020-12) of the form's fields, restricted to the renderer subset: a flat object of boolean, string and number fields with `title`, `additionalProperties: false`, optional `if`/`then`/`else`, `allOf`, `dependentRequired` and `$data` bounds. Property order is the display order."),
12895
+ "processor_type": zod.enum(["extractor", "worker"]),
12896
+ "processor_id": zod.string(),
12897
+ "created_at": zod.string().datetime({ "offset": true }),
12898
+ "updated_at": zod.string().datetime({ "offset": true })
12899
+ }),
12900
+ "message": zod.string()
12901
+ });
12902
+ var promoteFormVersionPathVersionMax = 9007199254740991;
12903
+ var PromoteFormVersionParams = zod.object({
12904
+ "form_id": zod.string().uuid(),
12905
+ "version": zod.number().int().min(1).max(promoteFormVersionPathVersionMax)
12906
+ });
12907
+ var PromoteFormVersionBody = zod.object({
12908
+ "environment": zod.enum(["live", "test"])
12909
+ });
12910
+ var promoteFormVersionResponseDataVersionMin = -9007199254740991;
12911
+ var promoteFormVersionResponseDataVersionMax = 9007199254740991;
12912
+ var PromoteFormVersionResponse = zod.object({
12913
+ "data": zod.object({
12914
+ "version": zod.number().int().min(promoteFormVersionResponseDataVersionMin).max(promoteFormVersionResponseDataVersionMax),
12915
+ "environment": zod.enum(["live", "test"])
12916
+ }),
12917
+ "message": zod.string()
12918
+ });
12510
12919
  var CreateFormSubmissionBody = zod.object({
12511
12920
  "form_id": zod.string().uuid(),
12512
12921
  "environment": zod.enum(["live", "test"])
@@ -12625,7 +13034,7 @@ var GetProfileResponse = zod.object({
12625
13034
  "last_name": zod.union([zod.string(), zod.null()]),
12626
13035
  "email": zod.string(),
12627
13036
  "role": zod.enum(["admin", "avallon_admin", "member"]),
12628
- "permissions": zod.array(zod.enum(["voice-agents:read", "voice-agents:write", "voice-agents:promote", "tools:write", "tools:execute", "tools:promote", "tool-calls:read", "extractors:write", "inboxes:write", "inboxes:send", "artifacts:write", "api-keys:write", "teams:write", "cases:write", "cases:delete", "case-types:read", "case-types:create", "case-types:write", "forms:read", "forms:create", "forms:write", "forms:request", "information-requests:write", "information-requests:resolve", "information-requests:delete", "feedback:write", "outbound-jobs:write", "outbound-jobs:schedule", "calls:monitor", "workers:read", "workers:create", "workers:write", "workers:execute", "workers:write-mcp", "workers:run", "workers:promote", "chat-agents:write", "notifications:write", "prompts:read", "prompts:write", "secrets:read", "secrets:write", "schedules:read", "schedules:write", "tenants:write", "analytics:view-cost"])),
13037
+ "permissions": zod.array(zod.enum(["voice-agents:read", "voice-agents:write", "voice-agents:promote", "tools:write", "tools:execute", "tools:promote", "tool-calls:read", "extractors:write", "inboxes:write", "inboxes:send", "artifacts:write", "api-keys:write", "teams:write", "cases:write", "cases:delete", "case-types:read", "case-types:create", "case-types:write", "forms:read", "forms:create", "forms:write", "forms:request", "forms:promote", "information-requests:write", "information-requests:resolve", "information-requests:delete", "feedback:write", "outbound-jobs:write", "outbound-jobs:schedule", "calls:monitor", "workers:read", "workers:create", "workers:write", "workers:execute", "workers:write-mcp", "workers:run", "workers:promote", "chat-agents:write", "notifications:write", "prompts:read", "prompts:write", "secrets:read", "secrets:write", "schedules:read", "schedules:write", "tenants:write", "analytics:view-cost"])),
12629
13038
  "tenants": zod.object({
12630
13039
  "active": zod.object({
12631
13040
  "id": zod.string(),
@@ -16745,6 +17154,105 @@ var createMcpServer = (options) => {
16745
17154
  signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
16746
17155
  })
16747
17156
  );
17157
+ tools.listForms = server2.registerTool(
17158
+ "listForms",
17159
+ {
17160
+ title: "List forms",
17161
+ description: "List the forms shared with the caller, each at its latest version.",
17162
+ inputSchema: {
17163
+ queryParams: ListFormsQueryParams
17164
+ },
17165
+ outputSchema: ListFormsResponse,
17166
+ annotations: { readOnlyHint: true }
17167
+ },
17168
+ (args, ctx) => listFormsHandler(args, {
17169
+ ...options,
17170
+ signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
17171
+ })
17172
+ );
17173
+ tools.getForm = server2.registerTool(
17174
+ "getForm",
17175
+ {
17176
+ title: "Get form",
17177
+ description: "Retrieve a form at its latest version.",
17178
+ inputSchema: {
17179
+ pathParams: GetFormParams
17180
+ },
17181
+ outputSchema: GetFormResponse,
17182
+ annotations: { readOnlyHint: true }
17183
+ },
17184
+ (args, ctx) => getFormHandler(args, {
17185
+ ...options,
17186
+ signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
17187
+ })
17188
+ );
17189
+ tools.updateForm = server2.registerTool(
17190
+ "updateForm",
17191
+ {
17192
+ title: "Update form",
17193
+ description: "Partially update a form. Omitted fields are left unchanged, and one request creates at most one new version \u2014 none when nothing changed. Live and test keep pointing at their versions until promoted.",
17194
+ inputSchema: {
17195
+ pathParams: UpdateFormParams,
17196
+ bodyParams: UpdateFormBody.optional()
17197
+ },
17198
+ outputSchema: UpdateFormResponse,
17199
+ annotations: { destructiveHint: true }
17200
+ },
17201
+ (args, ctx) => updateFormHandler(args, {
17202
+ ...options,
17203
+ signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
17204
+ })
17205
+ );
17206
+ tools.listFormVersions = server2.registerTool(
17207
+ "listFormVersions",
17208
+ {
17209
+ title: "List form versions",
17210
+ description: "List a form's versions without their schemas, newest first by default. Fetch a version's schema with the form version endpoint.",
17211
+ inputSchema: {
17212
+ pathParams: ListFormVersionsParams,
17213
+ queryParams: ListFormVersionsQueryParams
17214
+ },
17215
+ outputSchema: ListFormVersionsResponse,
17216
+ annotations: { readOnlyHint: true }
17217
+ },
17218
+ (args, ctx) => listFormVersionsHandler(args, {
17219
+ ...options,
17220
+ signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
17221
+ })
17222
+ );
17223
+ tools.getFormVersion = server2.registerTool(
17224
+ "getFormVersion",
17225
+ {
17226
+ title: "Get form version",
17227
+ description: "Retrieve a form at the given version, including that version's schema.",
17228
+ inputSchema: {
17229
+ pathParams: GetFormVersionParams
17230
+ },
17231
+ outputSchema: GetFormVersionResponse,
17232
+ annotations: { readOnlyHint: true }
17233
+ },
17234
+ (args, ctx) => getFormVersionHandler(args, {
17235
+ ...options,
17236
+ signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
17237
+ })
17238
+ );
17239
+ tools.promoteFormVersion = server2.registerTool(
17240
+ "promoteFormVersion",
17241
+ {
17242
+ title: "Promote form version",
17243
+ description: "Point the live or test environment at an existing form version. New submission links for that environment are pinned to it; open links keep their version.",
17244
+ inputSchema: {
17245
+ pathParams: PromoteFormVersionParams,
17246
+ bodyParams: PromoteFormVersionBody.optional()
17247
+ },
17248
+ outputSchema: PromoteFormVersionResponse,
17249
+ annotations: { destructiveHint: true }
17250
+ },
17251
+ (args, ctx) => promoteFormVersionHandler(args, {
17252
+ ...options,
17253
+ signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
17254
+ })
17255
+ );
16748
17256
  tools.createFormSubmission = server2.registerTool(
16749
17257
  "createFormSubmission",
16750
17258
  {
@@ -17926,4 +18434,4 @@ var transport = new StdioServerTransport();
17926
18434
  server.connect(transport).then(() => {
17927
18435
  console.error("MCP server running on stdio");
17928
18436
  }).catch(console.error);
17929
- //# sourceMappingURL=server-WNWHYNZ4.js.map
18437
+ //# sourceMappingURL=server-OTXFMKP3.js.map