@lumibase/mcp-server 0.21.0 → 0.22.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/dist/index.cjs +275 -210
- package/dist/index.js +275 -210
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -719,47 +719,111 @@ function registerApiKeyTools(server, client) {
|
|
|
719
719
|
);
|
|
720
720
|
}
|
|
721
721
|
|
|
722
|
-
// src/tools/
|
|
722
|
+
// src/tools/cdc.ts
|
|
723
723
|
var import_zod7 = require("zod");
|
|
724
|
-
var
|
|
724
|
+
var subscriptionSchema = import_zod7.z.object({
|
|
725
|
+
name: import_zod7.z.string().min(1).max(128),
|
|
726
|
+
kind: import_zod7.z.enum(["pull", "webhook", "extension"]),
|
|
727
|
+
collections: import_zod7.z.array(import_zod7.z.string()).optional().describe("Collections to include; empty = all."),
|
|
728
|
+
operations: import_zod7.z.array(import_zod7.z.enum(["create", "update", "delete"])).optional().describe("Operations to include; empty = all."),
|
|
729
|
+
payload_mode: import_zod7.z.enum(["reference", "snapshot"]).optional().describe("reference = ids only (consumer re-fetches); snapshot = masked data inline."),
|
|
730
|
+
webhook_id: import_zod7.z.string().optional().describe("Required for kind=webhook (must have a secret)."),
|
|
731
|
+
extension_name: import_zod7.z.string().optional().describe("Required for kind=extension.")
|
|
732
|
+
});
|
|
733
|
+
function registerCdcTools(server, client) {
|
|
734
|
+
registerCrud(server, client, {
|
|
735
|
+
basePath: "/cdc/subscriptions",
|
|
736
|
+
resource: "CDC change-feed subscription",
|
|
737
|
+
namePrefix: "cdc_subscription",
|
|
738
|
+
createSchema: subscriptionSchema.shape,
|
|
739
|
+
updateSchema: subscriptionSchema.partial().shape
|
|
740
|
+
});
|
|
741
|
+
server.registerTool(
|
|
742
|
+
"cdc_events_read",
|
|
743
|
+
{
|
|
744
|
+
description: "Read the change feed (keyset pagination). Pass the previous meta.nextCursor to continue; filter by collections/operations CSV.",
|
|
745
|
+
inputSchema: {
|
|
746
|
+
cursor: import_zod7.z.string().optional().describe("Opaque cursor from meta.nextCursor."),
|
|
747
|
+
collections: import_zod7.z.string().optional().describe("CSV of collections to include."),
|
|
748
|
+
operations: import_zod7.z.string().optional().describe("CSV of create,update,delete."),
|
|
749
|
+
limit: import_zod7.z.number().int().min(1).max(500).optional()
|
|
750
|
+
}
|
|
751
|
+
},
|
|
752
|
+
async (args) => {
|
|
753
|
+
const params = new URLSearchParams();
|
|
754
|
+
if (args.cursor) params.set("cursor", args.cursor);
|
|
755
|
+
if (args.collections) params.set("collections", args.collections);
|
|
756
|
+
if (args.operations) params.set("operations", args.operations);
|
|
757
|
+
if (args.limit) params.set("limit", String(args.limit));
|
|
758
|
+
const qs = params.size > 0 ? `?${params.toString()}` : "";
|
|
759
|
+
const result = await client.get(`/cdc/events${qs}`);
|
|
760
|
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
761
|
+
}
|
|
762
|
+
);
|
|
763
|
+
server.registerTool(
|
|
764
|
+
"cdc_subscription_replay",
|
|
765
|
+
{
|
|
766
|
+
description: "Rewind a subscription checkpoint inside the retention window (resets dead/stale back to active).",
|
|
767
|
+
inputSchema: {
|
|
768
|
+
subscription_id: import_zod7.z.string().describe("Subscription id."),
|
|
769
|
+
occurred_after: import_zod7.z.string().optional().describe("ISO timestamp to rewind to (within retention)."),
|
|
770
|
+
cursor: import_zod7.z.string().optional().describe("Exact cursor token to rewind to.")
|
|
771
|
+
}
|
|
772
|
+
},
|
|
773
|
+
async (args) => {
|
|
774
|
+
const body = {};
|
|
775
|
+
if (args.cursor) body.cursor = args.cursor;
|
|
776
|
+
if (args.occurred_after) body.occurred_after = args.occurred_after;
|
|
777
|
+
const result = await client.post(
|
|
778
|
+
`/cdc/subscriptions/${encodeURIComponent(args.subscription_id)}/replay`,
|
|
779
|
+
body
|
|
780
|
+
);
|
|
781
|
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
782
|
+
}
|
|
783
|
+
);
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
// src/tools/collections.ts
|
|
787
|
+
var import_zod8 = require("zod");
|
|
788
|
+
var collectionInputSchema = import_zod8.z.object({
|
|
725
789
|
name: collectionNameSchema,
|
|
726
|
-
label:
|
|
727
|
-
pluralLabel:
|
|
728
|
-
hidden:
|
|
729
|
-
singleton:
|
|
730
|
-
icon:
|
|
731
|
-
color:
|
|
732
|
-
note:
|
|
733
|
-
primaryKeyField:
|
|
734
|
-
primaryKeyType:
|
|
735
|
-
storageMode:
|
|
736
|
-
displayTemplate:
|
|
737
|
-
sortField:
|
|
738
|
-
archiveField:
|
|
739
|
-
archiveValue:
|
|
740
|
-
unarchiveValue:
|
|
741
|
-
accountability:
|
|
742
|
-
versioning:
|
|
790
|
+
label: import_zod8.z.string().optional(),
|
|
791
|
+
pluralLabel: import_zod8.z.string().optional(),
|
|
792
|
+
hidden: import_zod8.z.boolean().optional(),
|
|
793
|
+
singleton: import_zod8.z.boolean().optional(),
|
|
794
|
+
icon: import_zod8.z.string().optional(),
|
|
795
|
+
color: import_zod8.z.string().optional(),
|
|
796
|
+
note: import_zod8.z.string().optional(),
|
|
797
|
+
primaryKeyField: import_zod8.z.string().optional(),
|
|
798
|
+
primaryKeyType: import_zod8.z.enum(["nanoid", "uuid", "integer", "bigInteger", "string"]).optional(),
|
|
799
|
+
storageMode: import_zod8.z.enum(["jsonb", "materialized", "physical", "external"]).optional(),
|
|
800
|
+
displayTemplate: import_zod8.z.string().optional(),
|
|
801
|
+
sortField: import_zod8.z.string().optional(),
|
|
802
|
+
archiveField: import_zod8.z.string().optional(),
|
|
803
|
+
archiveValue: import_zod8.z.string().optional(),
|
|
804
|
+
unarchiveValue: import_zod8.z.string().optional(),
|
|
805
|
+
accountability: import_zod8.z.enum(["all", "activity", "none"]).optional(),
|
|
806
|
+
versioning: import_zod8.z.boolean().optional()
|
|
743
807
|
});
|
|
744
|
-
var fieldInputSchema =
|
|
808
|
+
var fieldInputSchema = import_zod8.z.object({
|
|
745
809
|
name: fieldNameSchema,
|
|
746
|
-
type:
|
|
747
|
-
interface:
|
|
748
|
-
display:
|
|
749
|
-
label:
|
|
750
|
-
note:
|
|
751
|
-
nullable:
|
|
752
|
-
unique:
|
|
753
|
-
indexed:
|
|
754
|
-
searchable:
|
|
755
|
-
required:
|
|
756
|
-
readonly:
|
|
757
|
-
hidden:
|
|
758
|
-
width:
|
|
759
|
-
sortOrder:
|
|
760
|
-
group:
|
|
761
|
-
options:
|
|
762
|
-
defaultValue:
|
|
810
|
+
type: import_zod8.z.string().min(1),
|
|
811
|
+
interface: import_zod8.z.string().min(1),
|
|
812
|
+
display: import_zod8.z.string().optional(),
|
|
813
|
+
label: import_zod8.z.string().optional(),
|
|
814
|
+
note: import_zod8.z.string().optional(),
|
|
815
|
+
nullable: import_zod8.z.boolean().optional(),
|
|
816
|
+
unique: import_zod8.z.boolean().optional(),
|
|
817
|
+
indexed: import_zod8.z.boolean().optional(),
|
|
818
|
+
searchable: import_zod8.z.boolean().optional(),
|
|
819
|
+
required: import_zod8.z.boolean().optional(),
|
|
820
|
+
readonly: import_zod8.z.boolean().optional(),
|
|
821
|
+
hidden: import_zod8.z.boolean().optional(),
|
|
822
|
+
width: import_zod8.z.enum(["half", "full", "fill"]).optional(),
|
|
823
|
+
sortOrder: import_zod8.z.number().int().optional(),
|
|
824
|
+
group: import_zod8.z.string().optional(),
|
|
825
|
+
options: import_zod8.z.record(import_zod8.z.unknown()).optional(),
|
|
826
|
+
defaultValue: import_zod8.z.unknown().optional()
|
|
763
827
|
});
|
|
764
828
|
function formatError2(err) {
|
|
765
829
|
if (err instanceof LumiBaseApiError) {
|
|
@@ -837,7 +901,7 @@ function registerCollectionTools(server, client) {
|
|
|
837
901
|
description: "Delete a collection and all its items. DESTRUCTIVE \u2014 cannot be undone. You MUST pass confirm=true explicitly after warning the user.",
|
|
838
902
|
inputSchema: {
|
|
839
903
|
name: collectionNameSchema,
|
|
840
|
-
confirm:
|
|
904
|
+
confirm: import_zod8.z.literal(true).describe("Must be true to confirm destructive operation")
|
|
841
905
|
}
|
|
842
906
|
},
|
|
843
907
|
async ({ name, confirm: _ }) => {
|
|
@@ -855,9 +919,9 @@ function registerCollectionTools(server, client) {
|
|
|
855
919
|
description: "Preview what would change if you applied a schema update. Returns added/modified/removed fields and any risky changes. Always call this before apply_schema to check for breaking changes.",
|
|
856
920
|
inputSchema: {
|
|
857
921
|
name: collectionNameSchema,
|
|
858
|
-
fields:
|
|
859
|
-
label:
|
|
860
|
-
note:
|
|
922
|
+
fields: import_zod8.z.array(fieldInputSchema).optional(),
|
|
923
|
+
label: import_zod8.z.string().optional(),
|
|
924
|
+
note: import_zod8.z.string().optional()
|
|
861
925
|
}
|
|
862
926
|
},
|
|
863
927
|
async (input) => {
|
|
@@ -875,16 +939,16 @@ function registerCollectionTools(server, client) {
|
|
|
875
939
|
description: "Atomically apply a schema migration to a collection (add/update/remove fields and relations). Call diff_schema first to preview changes. Pass confirmRiskyChange=true on field inputs that have risky changes.",
|
|
876
940
|
inputSchema: {
|
|
877
941
|
name: collectionNameSchema,
|
|
878
|
-
fields:
|
|
942
|
+
fields: import_zod8.z.array(
|
|
879
943
|
fieldInputSchema.extend({
|
|
880
944
|
renameFrom: fieldNameSchema.optional(),
|
|
881
|
-
confirmRiskyChange:
|
|
945
|
+
confirmRiskyChange: import_zod8.z.boolean().optional()
|
|
882
946
|
})
|
|
883
947
|
).optional(),
|
|
884
|
-
label:
|
|
885
|
-
note:
|
|
886
|
-
accountability:
|
|
887
|
-
versioning:
|
|
948
|
+
label: import_zod8.z.string().optional(),
|
|
949
|
+
note: import_zod8.z.string().optional(),
|
|
950
|
+
accountability: import_zod8.z.enum(["all", "activity", "none"]).optional(),
|
|
951
|
+
versioning: import_zod8.z.boolean().optional()
|
|
888
952
|
}
|
|
889
953
|
},
|
|
890
954
|
async (input) => {
|
|
@@ -903,34 +967,34 @@ function registerCollectionTools(server, client) {
|
|
|
903
967
|
}
|
|
904
968
|
|
|
905
969
|
// src/tools/content-config.ts
|
|
906
|
-
var
|
|
907
|
-
var presetSchema =
|
|
908
|
-
bookmark:
|
|
909
|
-
collection:
|
|
910
|
-
userId:
|
|
911
|
-
roleId:
|
|
912
|
-
layout:
|
|
913
|
-
layoutQuery:
|
|
914
|
-
layoutOptions:
|
|
915
|
-
search:
|
|
916
|
-
filter:
|
|
917
|
-
icon:
|
|
918
|
-
color:
|
|
919
|
-
refreshInterval:
|
|
970
|
+
var import_zod9 = require("zod");
|
|
971
|
+
var presetSchema = import_zod9.z.object({
|
|
972
|
+
bookmark: import_zod9.z.string().nullable().optional(),
|
|
973
|
+
collection: import_zod9.z.string(),
|
|
974
|
+
userId: import_zod9.z.string().nullable().optional(),
|
|
975
|
+
roleId: import_zod9.z.string().nullable().optional(),
|
|
976
|
+
layout: import_zod9.z.string().optional(),
|
|
977
|
+
layoutQuery: import_zod9.z.record(import_zod9.z.unknown()).optional(),
|
|
978
|
+
layoutOptions: import_zod9.z.record(import_zod9.z.unknown()).optional(),
|
|
979
|
+
search: import_zod9.z.string().nullable().optional(),
|
|
980
|
+
filter: import_zod9.z.record(import_zod9.z.unknown()).optional(),
|
|
981
|
+
icon: import_zod9.z.string().nullable().optional(),
|
|
982
|
+
color: import_zod9.z.string().nullable().optional(),
|
|
983
|
+
refreshInterval: import_zod9.z.number().int().min(0).optional()
|
|
920
984
|
});
|
|
921
|
-
var translationSchema =
|
|
922
|
-
language:
|
|
923
|
-
namespace:
|
|
924
|
-
key:
|
|
925
|
-
value:
|
|
926
|
-
status:
|
|
985
|
+
var translationSchema = import_zod9.z.object({
|
|
986
|
+
language: import_zod9.z.string(),
|
|
987
|
+
namespace: import_zod9.z.string(),
|
|
988
|
+
key: import_zod9.z.string(),
|
|
989
|
+
value: import_zod9.z.string(),
|
|
990
|
+
status: import_zod9.z.string().optional()
|
|
927
991
|
});
|
|
928
992
|
function registerContentConfigTools(server, client) {
|
|
929
993
|
registerCrud(server, client, {
|
|
930
994
|
basePath: "/presets",
|
|
931
995
|
resource: "preset",
|
|
932
996
|
namePrefix: "preset",
|
|
933
|
-
listQuery: { collection:
|
|
997
|
+
listQuery: { collection: import_zod9.z.string().optional() },
|
|
934
998
|
createSchema: presetSchema.shape,
|
|
935
999
|
updateSchema: presetSchema.partial().shape
|
|
936
1000
|
});
|
|
@@ -939,8 +1003,8 @@ function registerContentConfigTools(server, client) {
|
|
|
939
1003
|
resource: "translation",
|
|
940
1004
|
namePrefix: "translation",
|
|
941
1005
|
listQuery: {
|
|
942
|
-
namespace:
|
|
943
|
-
language:
|
|
1006
|
+
namespace: import_zod9.z.string().optional(),
|
|
1007
|
+
language: import_zod9.z.string().optional()
|
|
944
1008
|
},
|
|
945
1009
|
createSchema: translationSchema.shape,
|
|
946
1010
|
updateSchema: translationSchema.partial().shape
|
|
@@ -949,7 +1013,7 @@ function registerContentConfigTools(server, client) {
|
|
|
949
1013
|
"list_settings",
|
|
950
1014
|
{
|
|
951
1015
|
description: "List site settings, optionally filtered by scope.",
|
|
952
|
-
inputSchema: { scope:
|
|
1016
|
+
inputSchema: { scope: import_zod9.z.string().optional() }
|
|
953
1017
|
},
|
|
954
1018
|
async ({ scope }) => run(() => client.get(`/settings${scope ? `?scope=${encodeURIComponent(scope)}` : ""}`))
|
|
955
1019
|
);
|
|
@@ -967,8 +1031,8 @@ function registerContentConfigTools(server, client) {
|
|
|
967
1031
|
description: "Create or update a setting (upsert by key).",
|
|
968
1032
|
inputSchema: {
|
|
969
1033
|
key: idPathSegmentSchema,
|
|
970
|
-
value:
|
|
971
|
-
scope:
|
|
1034
|
+
value: import_zod9.z.record(import_zod9.z.unknown()).describe("Arbitrary JSON value object for the setting."),
|
|
1035
|
+
scope: import_zod9.z.string().optional()
|
|
972
1036
|
}
|
|
973
1037
|
},
|
|
974
1038
|
async (input) => run(() => client.post("/settings", input))
|
|
@@ -979,7 +1043,7 @@ function registerContentConfigTools(server, client) {
|
|
|
979
1043
|
description: "Delete a setting by key. DESTRUCTIVE \u2014 warn the user first and pass confirm=true.",
|
|
980
1044
|
inputSchema: {
|
|
981
1045
|
key: idPathSegmentSchema,
|
|
982
|
-
confirm:
|
|
1046
|
+
confirm: import_zod9.z.literal(true).describe(confirmDescription)
|
|
983
1047
|
}
|
|
984
1048
|
},
|
|
985
1049
|
async ({ key }) => run(async () => {
|
|
@@ -990,17 +1054,17 @@ function registerContentConfigTools(server, client) {
|
|
|
990
1054
|
}
|
|
991
1055
|
|
|
992
1056
|
// src/tools/extensions.ts
|
|
993
|
-
var
|
|
1057
|
+
var import_zod10 = require("zod");
|
|
994
1058
|
var EXTENSION_TYPES = ["interface", "display", "layout", "panel", "module", "hook", "endpoint"];
|
|
995
|
-
var extensionSchema =
|
|
996
|
-
key:
|
|
997
|
-
name:
|
|
998
|
-
version:
|
|
999
|
-
type:
|
|
1000
|
-
enabled:
|
|
1001
|
-
bundleUrl:
|
|
1002
|
-
manifest:
|
|
1003
|
-
capabilities:
|
|
1059
|
+
var extensionSchema = import_zod10.z.object({
|
|
1060
|
+
key: import_zod10.z.string().regex(/^[a-z0-9_:-]+$/).optional(),
|
|
1061
|
+
name: import_zod10.z.string().min(1),
|
|
1062
|
+
version: import_zod10.z.string().min(1),
|
|
1063
|
+
type: import_zod10.z.enum(EXTENSION_TYPES),
|
|
1064
|
+
enabled: import_zod10.z.boolean().optional(),
|
|
1065
|
+
bundleUrl: import_zod10.z.string().min(1).describe("https:, http:, or data:text/javascript bundle URL."),
|
|
1066
|
+
manifest: import_zod10.z.record(import_zod10.z.string()).optional(),
|
|
1067
|
+
capabilities: import_zod10.z.array(import_zod10.z.string()).optional()
|
|
1004
1068
|
});
|
|
1005
1069
|
function registerExtensionTools(server, client) {
|
|
1006
1070
|
server.registerTool(
|
|
@@ -1028,7 +1092,7 @@ function registerExtensionTools(server, client) {
|
|
|
1028
1092
|
"uninstall_extension",
|
|
1029
1093
|
{
|
|
1030
1094
|
description: "Uninstall an extension from the site. DESTRUCTIVE \u2014 pass confirm=true.",
|
|
1031
|
-
inputSchema: { id: idPathSegmentSchema, confirm:
|
|
1095
|
+
inputSchema: { id: idPathSegmentSchema, confirm: import_zod10.z.literal(true).describe(confirmDescription) }
|
|
1032
1096
|
},
|
|
1033
1097
|
async ({ id }) => run(async () => {
|
|
1034
1098
|
await client.delete(`/extensions/${encodePathSegment(id)}`);
|
|
@@ -1040,12 +1104,12 @@ function registerExtensionTools(server, client) {
|
|
|
1040
1104
|
{
|
|
1041
1105
|
description: "Browse the published extension marketplace.",
|
|
1042
1106
|
inputSchema: {
|
|
1043
|
-
q:
|
|
1044
|
-
category:
|
|
1045
|
-
tags:
|
|
1046
|
-
sort:
|
|
1047
|
-
page:
|
|
1048
|
-
perPage:
|
|
1107
|
+
q: import_zod10.z.string().optional(),
|
|
1108
|
+
category: import_zod10.z.string().optional(),
|
|
1109
|
+
tags: import_zod10.z.string().optional().describe("Comma-separated tags."),
|
|
1110
|
+
sort: import_zod10.z.string().optional(),
|
|
1111
|
+
page: import_zod10.z.number().int().min(1).optional(),
|
|
1112
|
+
perPage: import_zod10.z.number().int().min(1).optional()
|
|
1049
1113
|
}
|
|
1050
1114
|
},
|
|
1051
1115
|
async (args) => run(
|
|
@@ -1080,13 +1144,13 @@ function registerExtensionTools(server, client) {
|
|
|
1080
1144
|
{
|
|
1081
1145
|
description: "Publish an extension to the marketplace (signs + marks it published).",
|
|
1082
1146
|
inputSchema: {
|
|
1083
|
-
extensionId:
|
|
1084
|
-
marketplaceSlug:
|
|
1085
|
-
publisher:
|
|
1086
|
-
signature:
|
|
1087
|
-
signatureAlg:
|
|
1088
|
-
publisherKeyId:
|
|
1089
|
-
bundleSha256:
|
|
1147
|
+
extensionId: import_zod10.z.string().min(1),
|
|
1148
|
+
marketplaceSlug: import_zod10.z.string().min(1),
|
|
1149
|
+
publisher: import_zod10.z.record(import_zod10.z.unknown()).optional(),
|
|
1150
|
+
signature: import_zod10.z.string().optional(),
|
|
1151
|
+
signatureAlg: import_zod10.z.string().optional(),
|
|
1152
|
+
publisherKeyId: import_zod10.z.string().optional(),
|
|
1153
|
+
bundleSha256: import_zod10.z.string().optional()
|
|
1090
1154
|
}
|
|
1091
1155
|
},
|
|
1092
1156
|
async (input) => run(() => client.post("/marketplace/publish", input))
|
|
@@ -1094,39 +1158,39 @@ function registerExtensionTools(server, client) {
|
|
|
1094
1158
|
}
|
|
1095
1159
|
|
|
1096
1160
|
// src/tools/fields.ts
|
|
1097
|
-
var
|
|
1098
|
-
var fieldInputSchema2 =
|
|
1099
|
-
type:
|
|
1161
|
+
var import_zod11 = require("zod");
|
|
1162
|
+
var fieldInputSchema2 = import_zod11.z.object({
|
|
1163
|
+
type: import_zod11.z.string().min(1).describe(
|
|
1100
1164
|
"Storage type: string, text, integer, bigInteger, float, decimal, boolean, date, dateTime, time, json, uuid, csv, hash, alias"
|
|
1101
1165
|
),
|
|
1102
|
-
interface:
|
|
1166
|
+
interface: import_zod11.z.string().min(1).describe(
|
|
1103
1167
|
"UI widget: input, textarea, select, toggle, datetime, file, image, repeater, relation-m2o, relation-o2m, relation-m2m, code, markdown, wysiwyg, \u2026"
|
|
1104
1168
|
),
|
|
1105
|
-
display:
|
|
1106
|
-
label:
|
|
1107
|
-
note:
|
|
1108
|
-
defaultValue:
|
|
1109
|
-
nullable:
|
|
1110
|
-
unique:
|
|
1111
|
-
indexed:
|
|
1112
|
-
searchable:
|
|
1113
|
-
length:
|
|
1114
|
-
precision:
|
|
1115
|
-
scale:
|
|
1116
|
-
special:
|
|
1117
|
-
options:
|
|
1118
|
-
displayOptions:
|
|
1119
|
-
conditions:
|
|
1120
|
-
required:
|
|
1121
|
-
readonly:
|
|
1122
|
-
hidden:
|
|
1123
|
-
encrypted:
|
|
1124
|
-
versioned:
|
|
1125
|
-
width:
|
|
1126
|
-
group:
|
|
1127
|
-
sortOrder:
|
|
1169
|
+
display: import_zod11.z.string().optional(),
|
|
1170
|
+
label: import_zod11.z.string().optional(),
|
|
1171
|
+
note: import_zod11.z.string().optional(),
|
|
1172
|
+
defaultValue: import_zod11.z.unknown().optional(),
|
|
1173
|
+
nullable: import_zod11.z.boolean().optional().default(true),
|
|
1174
|
+
unique: import_zod11.z.boolean().optional().default(false),
|
|
1175
|
+
indexed: import_zod11.z.boolean().optional().default(false),
|
|
1176
|
+
searchable: import_zod11.z.boolean().optional().default(false),
|
|
1177
|
+
length: import_zod11.z.number().int().positive().optional(),
|
|
1178
|
+
precision: import_zod11.z.number().int().positive().optional(),
|
|
1179
|
+
scale: import_zod11.z.number().int().min(0).optional(),
|
|
1180
|
+
special: import_zod11.z.array(import_zod11.z.string()).optional(),
|
|
1181
|
+
options: import_zod11.z.record(import_zod11.z.unknown()).optional(),
|
|
1182
|
+
displayOptions: import_zod11.z.record(import_zod11.z.unknown()).optional(),
|
|
1183
|
+
conditions: import_zod11.z.array(import_zod11.z.unknown()).optional(),
|
|
1184
|
+
required: import_zod11.z.boolean().optional().default(false),
|
|
1185
|
+
readonly: import_zod11.z.boolean().optional().default(false),
|
|
1186
|
+
hidden: import_zod11.z.boolean().optional().default(false),
|
|
1187
|
+
encrypted: import_zod11.z.boolean().optional().default(false),
|
|
1188
|
+
versioned: import_zod11.z.boolean().optional().default(false),
|
|
1189
|
+
width: import_zod11.z.enum(["half", "full", "fill"]).optional().default("full"),
|
|
1190
|
+
group: import_zod11.z.string().optional(),
|
|
1191
|
+
sortOrder: import_zod11.z.number().int().optional(),
|
|
1128
1192
|
renameFrom: fieldNameSchema.optional().describe("Previous field name if this is a rename operation"),
|
|
1129
|
-
confirmRiskyChange:
|
|
1193
|
+
confirmRiskyChange: import_zod11.z.boolean().optional().describe("Set true to confirm type-change or destructive migration")
|
|
1130
1194
|
});
|
|
1131
1195
|
function formatError3(err) {
|
|
1132
1196
|
if (err instanceof LumiBaseApiError) {
|
|
@@ -1181,8 +1245,8 @@ function registerFieldTools(server, client) {
|
|
|
1181
1245
|
inputSchema: {
|
|
1182
1246
|
collection: collectionNameSchema,
|
|
1183
1247
|
field_name: fieldNameSchema,
|
|
1184
|
-
confirm:
|
|
1185
|
-
force:
|
|
1248
|
+
confirm: import_zod11.z.literal(true).describe("Must be true to confirm destructive operation"),
|
|
1249
|
+
force: import_zod11.z.boolean().optional().describe("Force deletion even if risky (foreign keys, etc.)")
|
|
1186
1250
|
}
|
|
1187
1251
|
},
|
|
1188
1252
|
async ({ collection, field_name, force }) => {
|
|
@@ -1202,7 +1266,7 @@ function registerFieldTools(server, client) {
|
|
|
1202
1266
|
}
|
|
1203
1267
|
|
|
1204
1268
|
// src/tools/items.ts
|
|
1205
|
-
var
|
|
1269
|
+
var import_zod12 = require("zod");
|
|
1206
1270
|
function formatError4(err) {
|
|
1207
1271
|
if (err instanceof LumiBaseApiError) {
|
|
1208
1272
|
return err.errors.map((e) => `[${e.code}] ${e.message}`).join("; ");
|
|
@@ -1224,12 +1288,12 @@ function registerItemTools(server, client) {
|
|
|
1224
1288
|
description: "List items from a collection with optional filtering, sorting, and pagination.",
|
|
1225
1289
|
inputSchema: {
|
|
1226
1290
|
collection: collectionNameSchema,
|
|
1227
|
-
limit:
|
|
1228
|
-
offset:
|
|
1229
|
-
status:
|
|
1230
|
-
sort:
|
|
1231
|
-
fields:
|
|
1232
|
-
search:
|
|
1291
|
+
limit: import_zod12.z.number().int().min(1).max(200).optional().default(25),
|
|
1292
|
+
offset: import_zod12.z.number().int().min(0).optional().default(0),
|
|
1293
|
+
status: import_zod12.z.enum(["draft", "published", "archived"]).optional(),
|
|
1294
|
+
sort: import_zod12.z.string().optional().describe('Comma-separated field names; prefix with - for descending (e.g. "-created_at")'),
|
|
1295
|
+
fields: import_zod12.z.string().optional().describe('Comma-separated field names to return (e.g. "id,title,status")'),
|
|
1296
|
+
search: import_zod12.z.string().optional().describe("Full-text search across searchable fields")
|
|
1233
1297
|
}
|
|
1234
1298
|
},
|
|
1235
1299
|
async ({ collection, ...params }) => {
|
|
@@ -1249,7 +1313,7 @@ function registerItemTools(server, client) {
|
|
|
1249
1313
|
inputSchema: {
|
|
1250
1314
|
collection: collectionNameSchema,
|
|
1251
1315
|
id: idPathSegmentSchema,
|
|
1252
|
-
fields:
|
|
1316
|
+
fields: import_zod12.z.string().optional().describe("Comma-separated field names to return")
|
|
1253
1317
|
}
|
|
1254
1318
|
},
|
|
1255
1319
|
async ({ collection, id, fields }) => {
|
|
@@ -1270,8 +1334,8 @@ function registerItemTools(server, client) {
|
|
|
1270
1334
|
description: "Create a new item in a collection.",
|
|
1271
1335
|
inputSchema: {
|
|
1272
1336
|
collection: collectionNameSchema,
|
|
1273
|
-
data:
|
|
1274
|
-
status:
|
|
1337
|
+
data: import_zod12.z.record(import_zod12.z.unknown()).describe("Field values for the new item"),
|
|
1338
|
+
status: import_zod12.z.enum(["draft", "published"]).optional().default("draft")
|
|
1275
1339
|
}
|
|
1276
1340
|
},
|
|
1277
1341
|
async ({ collection, data: itemData, status }) => {
|
|
@@ -1293,7 +1357,7 @@ function registerItemTools(server, client) {
|
|
|
1293
1357
|
inputSchema: {
|
|
1294
1358
|
collection: collectionNameSchema,
|
|
1295
1359
|
id: idPathSegmentSchema,
|
|
1296
|
-
data:
|
|
1360
|
+
data: import_zod12.z.record(import_zod12.z.unknown()).describe("Fields to update")
|
|
1297
1361
|
}
|
|
1298
1362
|
},
|
|
1299
1363
|
async ({ collection, id, data: itemData }) => {
|
|
@@ -1315,7 +1379,7 @@ function registerItemTools(server, client) {
|
|
|
1315
1379
|
inputSchema: {
|
|
1316
1380
|
collection: collectionNameSchema,
|
|
1317
1381
|
id: idPathSegmentSchema,
|
|
1318
|
-
confirm:
|
|
1382
|
+
confirm: import_zod12.z.literal(true).describe("Must be true to confirm deletion")
|
|
1319
1383
|
}
|
|
1320
1384
|
},
|
|
1321
1385
|
async ({ collection, id }) => {
|
|
@@ -1330,15 +1394,15 @@ function registerItemTools(server, client) {
|
|
|
1330
1394
|
}
|
|
1331
1395
|
|
|
1332
1396
|
// src/tools/ops.ts
|
|
1333
|
-
var
|
|
1397
|
+
var import_zod13 = require("zod");
|
|
1334
1398
|
function registerOpsTools(server, client) {
|
|
1335
1399
|
server.registerTool(
|
|
1336
1400
|
"list_activity",
|
|
1337
1401
|
{
|
|
1338
1402
|
description: "List the site activity / audit trail (most recent first).",
|
|
1339
1403
|
inputSchema: {
|
|
1340
|
-
limit:
|
|
1341
|
-
offset:
|
|
1404
|
+
limit: import_zod13.z.number().int().min(1).max(500).optional(),
|
|
1405
|
+
offset: import_zod13.z.number().int().min(0).optional()
|
|
1342
1406
|
}
|
|
1343
1407
|
},
|
|
1344
1408
|
async (args) => run(
|
|
@@ -1360,7 +1424,7 @@ function registerOpsTools(server, client) {
|
|
|
1360
1424
|
}
|
|
1361
1425
|
|
|
1362
1426
|
// src/tools/permissions.ts
|
|
1363
|
-
var
|
|
1427
|
+
var import_zod14 = require("zod");
|
|
1364
1428
|
function registerPermissionTools(server, client) {
|
|
1365
1429
|
server.registerTool(
|
|
1366
1430
|
"get_my_permissions",
|
|
@@ -1375,9 +1439,9 @@ function registerPermissionTools(server, client) {
|
|
|
1375
1439
|
{
|
|
1376
1440
|
description: "Evaluate whether the current principal may perform an action on a collection (optionally against a specific item), returning { allowed, reason, fields }.",
|
|
1377
1441
|
inputSchema: {
|
|
1378
|
-
collection:
|
|
1379
|
-
action:
|
|
1380
|
-
item:
|
|
1442
|
+
collection: import_zod14.z.string().min(1),
|
|
1443
|
+
action: import_zod14.z.enum(["create", "read", "update", "delete", "share"]),
|
|
1444
|
+
item: import_zod14.z.record(import_zod14.z.unknown()).optional().describe("Item payload to evaluate row-level rules against.")
|
|
1381
1445
|
}
|
|
1382
1446
|
},
|
|
1383
1447
|
async (input) => run(() => client.post("/permissions/check", input))
|
|
@@ -1385,21 +1449,21 @@ function registerPermissionTools(server, client) {
|
|
|
1385
1449
|
}
|
|
1386
1450
|
|
|
1387
1451
|
// src/tools/relations.ts
|
|
1388
|
-
var
|
|
1452
|
+
var import_zod15 = require("zod");
|
|
1389
1453
|
var relationInputSchema = {
|
|
1390
|
-
manyCollection:
|
|
1391
|
-
manyField:
|
|
1392
|
-
oneCollection:
|
|
1393
|
-
oneField:
|
|
1394
|
-
junctionCollection:
|
|
1395
|
-
type:
|
|
1396
|
-
aliasField:
|
|
1397
|
-
relatedDisplayTemplate:
|
|
1398
|
-
junctionManyField:
|
|
1399
|
-
junctionOneField:
|
|
1400
|
-
sortField:
|
|
1401
|
-
onDelete:
|
|
1402
|
-
meta:
|
|
1454
|
+
manyCollection: import_zod15.z.string().min(1).describe('Collection that holds the foreign key (the "many" side).'),
|
|
1455
|
+
manyField: import_zod15.z.string().min(1).describe("Field on manyCollection that stores the relation."),
|
|
1456
|
+
oneCollection: import_zod15.z.string().min(1).describe('Related collection (the "one" side).'),
|
|
1457
|
+
oneField: import_zod15.z.string().nullable().optional(),
|
|
1458
|
+
junctionCollection: import_zod15.z.string().nullable().optional().describe("Junction table for m2m relations."),
|
|
1459
|
+
type: import_zod15.z.enum(["m2o", "o2m", "m2m", "m2a"]).optional(),
|
|
1460
|
+
aliasField: import_zod15.z.string().nullable().optional(),
|
|
1461
|
+
relatedDisplayTemplate: import_zod15.z.string().nullable().optional(),
|
|
1462
|
+
junctionManyField: import_zod15.z.string().nullable().optional(),
|
|
1463
|
+
junctionOneField: import_zod15.z.string().nullable().optional(),
|
|
1464
|
+
sortField: import_zod15.z.string().nullable().optional(),
|
|
1465
|
+
onDelete: import_zod15.z.enum(["restrict", "cascade", "set null", "no action"]).optional(),
|
|
1466
|
+
meta: import_zod15.z.record(import_zod15.z.unknown()).optional()
|
|
1403
1467
|
};
|
|
1404
1468
|
function registerRelationTools(server, client) {
|
|
1405
1469
|
server.registerTool(
|
|
@@ -1421,7 +1485,7 @@ function registerRelationTools(server, client) {
|
|
|
1421
1485
|
description: "Delete a relation by id. DESTRUCTIVE \u2014 warn the user first and pass confirm=true.",
|
|
1422
1486
|
inputSchema: {
|
|
1423
1487
|
id: idPathSegmentSchema,
|
|
1424
|
-
confirm:
|
|
1488
|
+
confirm: import_zod15.z.literal(true).describe(confirmDescription)
|
|
1425
1489
|
}
|
|
1426
1490
|
},
|
|
1427
1491
|
async ({ id }) => run(async () => {
|
|
@@ -1432,19 +1496,19 @@ function registerRelationTools(server, client) {
|
|
|
1432
1496
|
}
|
|
1433
1497
|
|
|
1434
1498
|
// src/tools/search-media.ts
|
|
1435
|
-
var
|
|
1499
|
+
var import_zod16 = require("zod");
|
|
1436
1500
|
function registerSearchMediaTools(server, client) {
|
|
1437
1501
|
server.registerTool(
|
|
1438
1502
|
"search",
|
|
1439
1503
|
{
|
|
1440
1504
|
description: "Full-text search within a collection. Returns ranked hits from the search backend. The `collection` parameter is required.",
|
|
1441
1505
|
inputSchema: {
|
|
1442
|
-
q:
|
|
1443
|
-
collection:
|
|
1444
|
-
filter:
|
|
1445
|
-
sort:
|
|
1446
|
-
limit:
|
|
1447
|
-
offset:
|
|
1506
|
+
q: import_zod16.z.string().min(1).describe("Query string."),
|
|
1507
|
+
collection: import_zod16.z.string().min(1).describe("Collection to search."),
|
|
1508
|
+
filter: import_zod16.z.string().optional().describe("Backend filter expression."),
|
|
1509
|
+
sort: import_zod16.z.string().optional().describe("Comma-separated sort fields."),
|
|
1510
|
+
limit: import_zod16.z.number().int().min(1).max(200).optional(),
|
|
1511
|
+
offset: import_zod16.z.number().int().min(0).optional()
|
|
1448
1512
|
}
|
|
1449
1513
|
},
|
|
1450
1514
|
async (args) => run(
|
|
@@ -1457,7 +1521,7 @@ function registerSearchMediaTools(server, client) {
|
|
|
1457
1521
|
"list_media",
|
|
1458
1522
|
{
|
|
1459
1523
|
description: "List media asset keys, optionally filtered by key prefix.",
|
|
1460
|
-
inputSchema: { prefix:
|
|
1524
|
+
inputSchema: { prefix: import_zod16.z.string().optional() }
|
|
1461
1525
|
},
|
|
1462
1526
|
async ({ prefix }) => run(() => client.get(`/media${prefix ? `?prefix=${encodeURIComponent(prefix)}` : ""}`))
|
|
1463
1527
|
);
|
|
@@ -1467,7 +1531,7 @@ function registerSearchMediaTools(server, client) {
|
|
|
1467
1531
|
description: "Delete a media asset by key. DESTRUCTIVE \u2014 warn the user first and pass confirm=true.",
|
|
1468
1532
|
inputSchema: {
|
|
1469
1533
|
key: mediaKeySchema.describe("Full storage key of the asset."),
|
|
1470
|
-
confirm:
|
|
1534
|
+
confirm: import_zod16.z.literal(true).describe(confirmDescription)
|
|
1471
1535
|
}
|
|
1472
1536
|
},
|
|
1473
1537
|
async ({ key }) => run(async () => {
|
|
@@ -1478,15 +1542,15 @@ function registerSearchMediaTools(server, client) {
|
|
|
1478
1542
|
}
|
|
1479
1543
|
|
|
1480
1544
|
// src/tools/translation-memory.ts
|
|
1481
|
-
var
|
|
1545
|
+
var import_zod17 = require("zod");
|
|
1482
1546
|
function registerTranslationMemoryTools(server, client) {
|
|
1483
1547
|
server.registerTool(
|
|
1484
1548
|
"list_tm",
|
|
1485
1549
|
{
|
|
1486
1550
|
description: "List translation-memory entries, optionally filtered by source/target language.",
|
|
1487
1551
|
inputSchema: {
|
|
1488
|
-
source:
|
|
1489
|
-
target:
|
|
1552
|
+
source: import_zod17.z.string().optional().describe("Source language code."),
|
|
1553
|
+
target: import_zod17.z.string().optional().describe("Target language code.")
|
|
1490
1554
|
}
|
|
1491
1555
|
},
|
|
1492
1556
|
async (args) => run(
|
|
@@ -1498,14 +1562,14 @@ function registerTranslationMemoryTools(server, client) {
|
|
|
1498
1562
|
{
|
|
1499
1563
|
description: "Add or update a translation-memory entry.",
|
|
1500
1564
|
inputSchema: {
|
|
1501
|
-
sourceLang:
|
|
1502
|
-
targetLang:
|
|
1503
|
-
sourceText:
|
|
1504
|
-
targetText:
|
|
1505
|
-
context:
|
|
1506
|
-
quality:
|
|
1507
|
-
source:
|
|
1508
|
-
provider:
|
|
1565
|
+
sourceLang: import_zod17.z.string().min(2),
|
|
1566
|
+
targetLang: import_zod17.z.string().min(2),
|
|
1567
|
+
sourceText: import_zod17.z.string().min(1),
|
|
1568
|
+
targetText: import_zod17.z.string().min(1),
|
|
1569
|
+
context: import_zod17.z.string().optional(),
|
|
1570
|
+
quality: import_zod17.z.number().min(0).max(100).optional(),
|
|
1571
|
+
source: import_zod17.z.enum(["human", "mt", "imported"]).optional(),
|
|
1572
|
+
provider: import_zod17.z.string().optional()
|
|
1509
1573
|
}
|
|
1510
1574
|
},
|
|
1511
1575
|
async (input) => run(() => client.post("/tm", input))
|
|
@@ -1515,10 +1579,10 @@ function registerTranslationMemoryTools(server, client) {
|
|
|
1515
1579
|
{
|
|
1516
1580
|
description: "Fuzzy-match a query string against translation memory for a language pair.",
|
|
1517
1581
|
inputSchema: {
|
|
1518
|
-
query:
|
|
1519
|
-
sourceLang:
|
|
1520
|
-
targetLang:
|
|
1521
|
-
threshold:
|
|
1582
|
+
query: import_zod17.z.string().min(1),
|
|
1583
|
+
sourceLang: import_zod17.z.string().min(2),
|
|
1584
|
+
targetLang: import_zod17.z.string().min(2),
|
|
1585
|
+
threshold: import_zod17.z.number().min(0).max(100).optional().describe("Minimum match score (default 75).")
|
|
1522
1586
|
}
|
|
1523
1587
|
},
|
|
1524
1588
|
async (input) => run(() => client.post("/tm/lookup", input))
|
|
@@ -1528,10 +1592,10 @@ function registerTranslationMemoryTools(server, client) {
|
|
|
1528
1592
|
{
|
|
1529
1593
|
description: "Run the full translation pipeline (TM + glossary + MT provider) for a text.",
|
|
1530
1594
|
inputSchema: {
|
|
1531
|
-
text:
|
|
1532
|
-
from:
|
|
1533
|
-
to:
|
|
1534
|
-
provider:
|
|
1595
|
+
text: import_zod17.z.string().min(1),
|
|
1596
|
+
from: import_zod17.z.string().min(2),
|
|
1597
|
+
to: import_zod17.z.string().min(2),
|
|
1598
|
+
provider: import_zod17.z.string().optional()
|
|
1535
1599
|
}
|
|
1536
1600
|
},
|
|
1537
1601
|
async (input) => run(() => client.post("/tm/translate", input))
|
|
@@ -1539,7 +1603,7 @@ function registerTranslationMemoryTools(server, client) {
|
|
|
1539
1603
|
}
|
|
1540
1604
|
|
|
1541
1605
|
// src/tools/users-teams.ts
|
|
1542
|
-
var
|
|
1606
|
+
var import_zod18 = require("zod");
|
|
1543
1607
|
function registerUsersTeamsTools(server, client) {
|
|
1544
1608
|
server.registerTool(
|
|
1545
1609
|
"list_users",
|
|
@@ -1556,8 +1620,8 @@ function registerUsersTeamsTools(server, client) {
|
|
|
1556
1620
|
{
|
|
1557
1621
|
description: "Invite a user to the site by email, optionally assigning a role. Sends an invite email.",
|
|
1558
1622
|
inputSchema: {
|
|
1559
|
-
email:
|
|
1560
|
-
roleId:
|
|
1623
|
+
email: import_zod18.z.string().email(),
|
|
1624
|
+
roleId: import_zod18.z.string().optional()
|
|
1561
1625
|
}
|
|
1562
1626
|
},
|
|
1563
1627
|
async (input) => run(() => client.post("/users/invite", input))
|
|
@@ -1568,8 +1632,8 @@ function registerUsersTeamsTools(server, client) {
|
|
|
1568
1632
|
description: "Update a user's site membership (role and/or status).",
|
|
1569
1633
|
inputSchema: {
|
|
1570
1634
|
id: idPathSegmentSchema,
|
|
1571
|
-
roleId:
|
|
1572
|
-
status:
|
|
1635
|
+
roleId: import_zod18.z.string().nullable().optional(),
|
|
1636
|
+
status: import_zod18.z.string().optional().describe("e.g. active, suspended.")
|
|
1573
1637
|
}
|
|
1574
1638
|
},
|
|
1575
1639
|
async ({ id, ...patch }) => run(() => client.patch(`/users/${encodePathSegment(id)}`, patch))
|
|
@@ -1578,7 +1642,7 @@ function registerUsersTeamsTools(server, client) {
|
|
|
1578
1642
|
"remove_user",
|
|
1579
1643
|
{
|
|
1580
1644
|
description: "Remove a user from the site. DESTRUCTIVE \u2014 pass confirm=true.",
|
|
1581
|
-
inputSchema: { id: idPathSegmentSchema, confirm:
|
|
1645
|
+
inputSchema: { id: idPathSegmentSchema, confirm: import_zod18.z.literal(true).describe(confirmDescription) }
|
|
1582
1646
|
},
|
|
1583
1647
|
async ({ id }) => run(async () => {
|
|
1584
1648
|
await client.delete(`/users/${encodePathSegment(id)}`);
|
|
@@ -1599,7 +1663,7 @@ function registerUsersTeamsTools(server, client) {
|
|
|
1599
1663
|
"create_team",
|
|
1600
1664
|
{
|
|
1601
1665
|
description: "Create a team.",
|
|
1602
|
-
inputSchema: { name:
|
|
1666
|
+
inputSchema: { name: import_zod18.z.string().min(1).max(128), description: import_zod18.z.string().nullable().optional() }
|
|
1603
1667
|
},
|
|
1604
1668
|
async (input) => run(() => client.post("/teams", input))
|
|
1605
1669
|
);
|
|
@@ -1609,8 +1673,8 @@ function registerUsersTeamsTools(server, client) {
|
|
|
1609
1673
|
description: "Update a team (partial PATCH).",
|
|
1610
1674
|
inputSchema: {
|
|
1611
1675
|
id: idPathSegmentSchema,
|
|
1612
|
-
name:
|
|
1613
|
-
description:
|
|
1676
|
+
name: import_zod18.z.string().min(1).max(128).optional(),
|
|
1677
|
+
description: import_zod18.z.string().nullable().optional()
|
|
1614
1678
|
}
|
|
1615
1679
|
},
|
|
1616
1680
|
async ({ id, ...patch }) => run(() => client.patch(`/teams/${encodePathSegment(id)}`, patch))
|
|
@@ -1619,7 +1683,7 @@ function registerUsersTeamsTools(server, client) {
|
|
|
1619
1683
|
"delete_team",
|
|
1620
1684
|
{
|
|
1621
1685
|
description: "Delete a team. DESTRUCTIVE \u2014 pass confirm=true.",
|
|
1622
|
-
inputSchema: { id: idPathSegmentSchema, confirm:
|
|
1686
|
+
inputSchema: { id: idPathSegmentSchema, confirm: import_zod18.z.literal(true).describe(confirmDescription) }
|
|
1623
1687
|
},
|
|
1624
1688
|
async ({ id }) => run(async () => {
|
|
1625
1689
|
await client.delete(`/teams/${encodePathSegment(id)}`);
|
|
@@ -1646,7 +1710,7 @@ function registerUsersTeamsTools(server, client) {
|
|
|
1646
1710
|
inputSchema: {
|
|
1647
1711
|
id: idPathSegmentSchema.describe("Team id."),
|
|
1648
1712
|
userId: idPathSegmentSchema,
|
|
1649
|
-
confirm:
|
|
1713
|
+
confirm: import_zod18.z.literal(true).describe(confirmDescription)
|
|
1650
1714
|
}
|
|
1651
1715
|
},
|
|
1652
1716
|
async ({ id, userId }) => run(async () => {
|
|
@@ -1657,15 +1721,15 @@ function registerUsersTeamsTools(server, client) {
|
|
|
1657
1721
|
}
|
|
1658
1722
|
|
|
1659
1723
|
// src/tools/webhooks.ts
|
|
1660
|
-
var
|
|
1661
|
-
var webhookSchema =
|
|
1662
|
-
name:
|
|
1663
|
-
url:
|
|
1664
|
-
actions:
|
|
1665
|
-
collections:
|
|
1666
|
-
headers:
|
|
1667
|
-
status:
|
|
1668
|
-
secret:
|
|
1724
|
+
var import_zod19 = require("zod");
|
|
1725
|
+
var webhookSchema = import_zod19.z.object({
|
|
1726
|
+
name: import_zod19.z.string().min(1).max(255),
|
|
1727
|
+
url: import_zod19.z.string().url(),
|
|
1728
|
+
actions: import_zod19.z.array(import_zod19.z.string()).optional().describe("Item events that trigger the webhook (e.g. create, update, delete)."),
|
|
1729
|
+
collections: import_zod19.z.array(import_zod19.z.string()).optional().describe("Collections to filter on (empty = all)."),
|
|
1730
|
+
headers: import_zod19.z.record(import_zod19.z.string()).optional(),
|
|
1731
|
+
status: import_zod19.z.enum(["active", "inactive"]).optional(),
|
|
1732
|
+
secret: import_zod19.z.string().nullable().optional()
|
|
1669
1733
|
});
|
|
1670
1734
|
function registerWebhookTools(server, client) {
|
|
1671
1735
|
registerCrud(server, client, {
|
|
@@ -1693,6 +1757,7 @@ function registerAllTools(server, client) {
|
|
|
1693
1757
|
registerApiKeyTools(server, client);
|
|
1694
1758
|
registerUsersTeamsTools(server, client);
|
|
1695
1759
|
registerWebhookTools(server, client);
|
|
1760
|
+
registerCdcTools(server, client);
|
|
1696
1761
|
registerAgentTools(server, client);
|
|
1697
1762
|
registerOpsTools(server, client);
|
|
1698
1763
|
registerAdminTools(server, client);
|