@plitzi/sdk-server 0.30.19 → 0.31.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.
- package/CHANGELOG.md +21 -0
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/helpers/cache/TtlCache.js +2 -0
- package/dist/index.js +6 -1
- package/dist/modules/ai/AIEngine.js +120 -0
- package/dist/modules/mcp/handler.js +35 -16
- package/dist/modules/mcp/helpers.js +75 -0
- package/dist/modules/mcp/resources/glossary/binding.js +73 -0
- package/dist/modules/mcp/resources/glossary/collection.js +76 -0
- package/dist/modules/mcp/resources/glossary/displayMode.js +50 -0
- package/dist/modules/mcp/resources/glossary/element.js +68 -0
- package/dist/modules/mcp/resources/glossary/environment.js +48 -0
- package/dist/modules/mcp/resources/glossary/interaction.js +62 -0
- package/dist/modules/mcp/resources/glossary/page.js +70 -0
- package/dist/modules/mcp/resources/glossary/plugin.js +96 -0
- package/dist/modules/mcp/resources/glossary/resource.js +75 -0
- package/dist/modules/mcp/resources/glossary/schema.js +69 -0
- package/dist/modules/mcp/resources/glossary/schemaVariable.js +60 -0
- package/dist/modules/mcp/resources/glossary/segment.js +59 -0
- package/dist/modules/mcp/resources/glossary/space.js +73 -0
- package/dist/modules/mcp/resources/glossary/style.js +81 -0
- package/dist/modules/mcp/resources/glossary/styleSelector.js +77 -0
- package/dist/modules/mcp/resources/glossary/styleVariable.js +72 -0
- package/dist/modules/mcp/resources/index.js +71 -0
- package/dist/modules/mcp/resources/workflows/data.js +49 -0
- package/dist/modules/mcp/resources/workflows/elements.js +53 -0
- package/dist/modules/mcp/resources/workflows/segments.js +55 -0
- package/dist/modules/mcp/resources/workflows/styles.js +91 -0
- package/dist/modules/mcp/server.js +23 -113
- package/dist/modules/mcp/tools/collections/createCollection.js +25 -0
- package/dist/modules/mcp/tools/collections/createCollectionRecord.js +27 -0
- package/dist/modules/mcp/tools/collections/deleteCollection.js +16 -0
- package/dist/modules/mcp/tools/collections/deleteCollectionRecord.js +16 -0
- package/dist/modules/mcp/tools/collections/getCollection.js +21 -0
- package/dist/modules/mcp/tools/collections/getCollectionRecord.js +25 -0
- package/dist/modules/mcp/tools/collections/getCollectionRecords.js +29 -0
- package/dist/modules/mcp/tools/collections/getCollections.js +19 -0
- package/dist/modules/mcp/tools/collections/updateCollection.js +28 -0
- package/dist/modules/mcp/tools/collections/updateCollectionRecord.js +31 -0
- package/dist/modules/mcp/tools/docs/listResources.js +16 -0
- package/dist/modules/mcp/tools/docs/readResource.js +23 -0
- package/dist/modules/mcp/tools/index.js +150 -0
- package/dist/modules/mcp/tools/plugins/addPlugin.js +24 -0
- package/dist/modules/mcp/tools/plugins/listPlugins.js +20 -0
- package/dist/modules/mcp/tools/plugins/removePlugin.js +16 -0
- package/dist/modules/mcp/tools/plugins/updatePlugin.js +23 -0
- package/dist/modules/mcp/tools/resources/addResource.js +33 -0
- package/dist/modules/mcp/tools/resources/getResource.js +29 -0
- package/dist/modules/mcp/tools/resources/getResources.js +27 -0
- package/dist/modules/mcp/tools/resources/moveResource.js +30 -0
- package/dist/modules/mcp/tools/resources/removeResource.js +19 -0
- package/dist/modules/mcp/tools/segment/createSegment.js +27 -0
- package/dist/modules/mcp/tools/segment/deleteSegment.js +16 -0
- package/dist/modules/mcp/tools/segment/getSegment.js +19 -0
- package/dist/modules/mcp/tools/segment/getSegments.js +27 -0
- package/dist/modules/mcp/tools/segment/schema/elements/createSegmentElement.js +24 -0
- package/dist/modules/mcp/tools/segment/schema/elements/deleteSegmentElement.js +19 -0
- package/dist/modules/mcp/tools/segment/schema/elements/moveSegmentElement.js +28 -0
- package/dist/modules/mcp/tools/segment/schema/elements/updateSegmentElement.js +23 -0
- package/dist/modules/mcp/tools/segment/schema/variables/createSegmentVariable.js +41 -0
- package/dist/modules/mcp/tools/segment/schema/variables/deleteSegmentVariable.js +19 -0
- package/dist/modules/mcp/tools/segment/schema/variables/updateSegmentVariable.js +41 -0
- package/dist/modules/mcp/tools/segment/style/variables/createSegmentStyleVariable.js +34 -0
- package/dist/modules/mcp/tools/segment/style/variables/deleteSegmentStyleVariable.js +21 -0
- package/dist/modules/mcp/tools/segment/style/variables/updateSegmentStyleVariable.js +34 -0
- package/dist/modules/mcp/tools/segment/updateSegment.js +30 -0
- package/dist/modules/mcp/tools/space/schema/applyPreview.js +33 -0
- package/dist/modules/mcp/tools/space/schema/elements/cloneElement.js +34 -0
- package/dist/modules/mcp/tools/space/schema/elements/createElement.js +50 -0
- package/dist/modules/mcp/tools/space/schema/elements/deleteElement.js +16 -0
- package/dist/modules/mcp/tools/space/schema/elements/getElement.js +17 -0
- package/dist/modules/mcp/tools/space/schema/elements/getElements.js +21 -0
- package/dist/modules/mcp/tools/space/schema/elements/listElements.js +28 -0
- package/dist/modules/mcp/tools/space/schema/elements/moveElement.js +27 -0
- package/dist/modules/mcp/tools/space/schema/elements/updateElement.js +49 -0
- package/dist/modules/mcp/tools/space/schema/getSpaceSettings.js +46 -0
- package/dist/modules/mcp/tools/space/schema/pageFolders/createPageFolder.js +24 -0
- package/dist/modules/mcp/tools/space/schema/pageFolders/deletePageFolder.js +16 -0
- package/dist/modules/mcp/tools/space/schema/pageFolders/getPageFolder.js +17 -0
- package/dist/modules/mcp/tools/space/schema/pageFolders/getPageFolders.js +17 -0
- package/dist/modules/mcp/tools/space/schema/pageFolders/updatePageFolder.js +28 -0
- package/dist/modules/mcp/tools/space/schema/pages/createPage.js +37 -0
- package/dist/modules/mcp/tools/space/schema/pages/deletePage.js +16 -0
- package/dist/modules/mcp/tools/space/schema/pages/getPage.js +28 -0
- package/dist/modules/mcp/tools/space/schema/pages/getPageBySlug.js +17 -0
- package/dist/modules/mcp/tools/space/schema/pages/getPages.js +17 -0
- package/dist/modules/mcp/tools/space/schema/pages/updatePage.js +25 -0
- package/dist/modules/mcp/tools/space/schema/schemas.js +53 -0
- package/dist/modules/mcp/tools/space/schema/updateSpaceSettings.js +23 -0
- package/dist/modules/mcp/tools/space/schema/variables/createVariable.js +38 -0
- package/dist/modules/mcp/tools/space/schema/variables/deleteVariable.js +16 -0
- package/dist/modules/mcp/tools/space/schema/variables/getVariable.js +17 -0
- package/dist/modules/mcp/tools/space/schema/variables/getVariables.js +17 -0
- package/dist/modules/mcp/tools/space/schema/variables/updateVariable.js +38 -0
- package/dist/modules/mcp/tools/space/style/selectors/createStyleSelector.js +37 -0
- package/dist/modules/mcp/tools/space/style/selectors/deleteStyleSelector.js +24 -0
- package/dist/modules/mcp/tools/space/style/selectors/getStyleSelectors.js +20 -0
- package/dist/modules/mcp/tools/space/style/selectors/updateStyleSelector.js +37 -0
- package/dist/modules/mcp/tools/space/style/variables/createStyleVariable.js +33 -0
- package/dist/modules/mcp/tools/space/style/variables/deleteStyleVariable.js +20 -0
- package/dist/modules/mcp/tools/space/style/variables/getStyleVariable.js +19 -0
- package/dist/modules/mcp/tools/space/style/variables/getStyleVariables.js +16 -0
- package/dist/modules/mcp/tools/space/style/variables/updateStyleVariable.js +33 -0
- package/dist/package.js +62 -0
- package/dist/package.json.d.ts +67 -0
- package/dist/src/index.d.ts +2 -1
- package/dist/src/modules/ai/AIEngine.d.ts +20 -0
- package/dist/src/modules/ai/index.d.ts +3 -0
- package/dist/src/modules/mcp/handler.d.ts +5 -2
- package/dist/src/modules/mcp/helpers.d.ts +9 -0
- package/dist/src/modules/mcp/helpers.test.d.ts +1 -0
- package/dist/src/modules/mcp/index.d.ts +5 -0
- package/dist/src/modules/mcp/resources/glossary/binding.d.ts +7 -0
- package/dist/src/modules/mcp/resources/glossary/collection.d.ts +7 -0
- package/dist/src/modules/mcp/resources/glossary/displayMode.d.ts +7 -0
- package/dist/src/modules/mcp/resources/glossary/element.d.ts +7 -0
- package/dist/src/modules/mcp/resources/glossary/environment.d.ts +7 -0
- package/dist/src/modules/mcp/resources/glossary/interaction.d.ts +7 -0
- package/dist/src/modules/mcp/resources/glossary/page.d.ts +7 -0
- package/dist/src/modules/mcp/resources/glossary/plugin.d.ts +7 -0
- package/dist/src/modules/mcp/resources/glossary/resource.d.ts +7 -0
- package/dist/src/modules/mcp/resources/glossary/schema.d.ts +7 -0
- package/dist/src/modules/mcp/resources/glossary/schemaVariable.d.ts +7 -0
- package/dist/src/modules/mcp/resources/glossary/segment.d.ts +7 -0
- package/dist/src/modules/mcp/resources/glossary/space.d.ts +7 -0
- package/dist/src/modules/mcp/resources/glossary/style.d.ts +7 -0
- package/dist/src/modules/mcp/resources/glossary/styleSelector.d.ts +7 -0
- package/dist/src/modules/mcp/resources/glossary/styleVariable.d.ts +7 -0
- package/dist/src/modules/mcp/resources/index.d.ts +10 -0
- package/dist/src/modules/mcp/resources/workflows/data.d.ts +7 -0
- package/dist/src/modules/mcp/resources/workflows/elements.d.ts +7 -0
- package/dist/src/modules/mcp/resources/workflows/segments.d.ts +7 -0
- package/dist/src/modules/mcp/resources/workflows/styles.d.ts +7 -0
- package/dist/src/modules/mcp/server.d.ts +4 -3
- package/dist/src/modules/mcp/tools/collections/collections.test.d.ts +1 -0
- package/dist/src/modules/mcp/tools/collections/createCollection.d.ts +3 -0
- package/dist/src/modules/mcp/tools/collections/createCollectionRecord.d.ts +3 -0
- package/dist/src/modules/mcp/tools/collections/deleteCollection.d.ts +3 -0
- package/dist/src/modules/mcp/tools/collections/deleteCollectionRecord.d.ts +3 -0
- package/dist/src/modules/mcp/tools/collections/getCollection.d.ts +3 -0
- package/dist/src/modules/mcp/tools/collections/getCollectionRecord.d.ts +3 -0
- package/dist/src/modules/mcp/tools/collections/getCollectionRecords.d.ts +3 -0
- package/dist/src/modules/mcp/tools/collections/getCollections.d.ts +3 -0
- package/dist/src/modules/mcp/tools/collections/index.d.ts +10 -0
- package/dist/src/modules/mcp/tools/collections/updateCollection.d.ts +3 -0
- package/dist/src/modules/mcp/tools/collections/updateCollectionRecord.d.ts +3 -0
- package/dist/src/modules/mcp/tools/docs/index.d.ts +2 -0
- package/dist/src/modules/mcp/tools/docs/listResources.d.ts +3 -0
- package/dist/src/modules/mcp/tools/docs/readResource.d.ts +3 -0
- package/dist/src/modules/mcp/tools/index.d.ts +6 -0
- package/dist/src/modules/mcp/tools/plugins/addPlugin.d.ts +3 -0
- package/dist/src/modules/mcp/tools/plugins/index.d.ts +5 -0
- package/dist/src/modules/mcp/tools/plugins/listPlugins.d.ts +3 -0
- package/dist/src/modules/mcp/tools/plugins/plugins.test.d.ts +1 -0
- package/dist/src/modules/mcp/tools/plugins/removePlugin.d.ts +3 -0
- package/dist/src/modules/mcp/tools/plugins/updatePlugin.d.ts +3 -0
- package/dist/src/modules/mcp/tools/resources/addResource.d.ts +3 -0
- package/dist/src/modules/mcp/tools/resources/getResource.d.ts +3 -0
- package/dist/src/modules/mcp/tools/resources/getResources.d.ts +3 -0
- package/dist/src/modules/mcp/tools/resources/index.d.ts +6 -0
- package/dist/src/modules/mcp/tools/resources/moveResource.d.ts +3 -0
- package/dist/src/modules/mcp/tools/resources/removeResource.d.ts +3 -0
- package/dist/src/modules/mcp/tools/resources/resources.test.d.ts +1 -0
- package/dist/src/modules/mcp/tools/segment/createSegment.d.ts +3 -0
- package/dist/src/modules/mcp/tools/segment/deleteSegment.d.ts +3 -0
- package/dist/src/modules/mcp/tools/segment/getSegment.d.ts +3 -0
- package/dist/src/modules/mcp/tools/segment/getSegments.d.ts +3 -0
- package/dist/src/modules/mcp/tools/segment/index.d.ts +8 -0
- package/dist/src/modules/mcp/tools/segment/schema/elements/createSegmentElement.d.ts +3 -0
- package/dist/src/modules/mcp/tools/segment/schema/elements/deleteSegmentElement.d.ts +3 -0
- package/dist/src/modules/mcp/tools/segment/schema/elements/index.d.ts +5 -0
- package/dist/src/modules/mcp/tools/segment/schema/elements/moveSegmentElement.d.ts +3 -0
- package/dist/src/modules/mcp/tools/segment/schema/elements/segmentElements.test.d.ts +1 -0
- package/dist/src/modules/mcp/tools/segment/schema/elements/updateSegmentElement.d.ts +3 -0
- package/dist/src/modules/mcp/tools/segment/schema/index.d.ts +2 -0
- package/dist/src/modules/mcp/tools/segment/schema/variables/createSegmentVariable.d.ts +3 -0
- package/dist/src/modules/mcp/tools/segment/schema/variables/deleteSegmentVariable.d.ts +3 -0
- package/dist/src/modules/mcp/tools/segment/schema/variables/index.d.ts +4 -0
- package/dist/src/modules/mcp/tools/segment/schema/variables/segmentVariables.test.d.ts +1 -0
- package/dist/src/modules/mcp/tools/segment/schema/variables/updateSegmentVariable.d.ts +3 -0
- package/dist/src/modules/mcp/tools/segment/segment.test.d.ts +1 -0
- package/dist/src/modules/mcp/tools/segment/style/index.d.ts +1 -0
- package/dist/src/modules/mcp/tools/segment/style/variables/createSegmentStyleVariable.d.ts +3 -0
- package/dist/src/modules/mcp/tools/segment/style/variables/deleteSegmentStyleVariable.d.ts +3 -0
- package/dist/src/modules/mcp/tools/segment/style/variables/index.d.ts +4 -0
- package/dist/src/modules/mcp/tools/segment/style/variables/segmentStyleVariables.test.d.ts +1 -0
- package/dist/src/modules/mcp/tools/segment/style/variables/updateSegmentStyleVariable.d.ts +3 -0
- package/dist/src/modules/mcp/tools/segment/updateSegment.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/index.d.ts +2 -0
- package/dist/src/modules/mcp/tools/space/schema/applyPreview.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/elements/cloneElement.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/elements/createElement.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/elements/deleteElement.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/elements/elements.test.d.ts +1 -0
- package/dist/src/modules/mcp/tools/space/schema/elements/getElement.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/elements/getElements.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/elements/index.d.ts +9 -0
- package/dist/src/modules/mcp/tools/space/schema/elements/listElements.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/elements/moveElement.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/elements/updateElement.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/getSpaceSettings.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/index.d.ts +8 -0
- package/dist/src/modules/mcp/tools/space/schema/pageFolders/createPageFolder.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/pageFolders/deletePageFolder.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/pageFolders/getPageFolder.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/pageFolders/getPageFolders.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/pageFolders/index.d.ts +6 -0
- package/dist/src/modules/mcp/tools/space/schema/pageFolders/pageFolders.test.d.ts +1 -0
- package/dist/src/modules/mcp/tools/space/schema/pageFolders/updatePageFolder.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/pages/createPage.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/pages/deletePage.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/pages/getPage.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/pages/getPageBySlug.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/pages/getPages.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/pages/index.d.ts +7 -0
- package/dist/src/modules/mcp/tools/space/schema/pages/pages.test.d.ts +1 -0
- package/dist/src/modules/mcp/tools/space/schema/pages/updatePage.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/schemas.d.ts +66 -0
- package/dist/src/modules/mcp/tools/space/schema/updateSpaceSettings.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/variables/createVariable.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/variables/deleteVariable.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/variables/getVariable.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/variables/getVariables.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/variables/index.d.ts +6 -0
- package/dist/src/modules/mcp/tools/space/schema/variables/updateVariable.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/schema/variables/variables.test.d.ts +1 -0
- package/dist/src/modules/mcp/tools/space/space.test.d.ts +1 -0
- package/dist/src/modules/mcp/tools/space/style/index.d.ts +2 -0
- package/dist/src/modules/mcp/tools/space/style/selectors/createStyleSelector.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/style/selectors/deleteStyleSelector.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/style/selectors/getStyleSelectors.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/style/selectors/index.d.ts +5 -0
- package/dist/src/modules/mcp/tools/space/style/selectors/styleSelectors.test.d.ts +1 -0
- package/dist/src/modules/mcp/tools/space/style/selectors/updateStyleSelector.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/style/variables/createStyleVariable.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/style/variables/deleteStyleVariable.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/style/variables/getStyleVariable.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/style/variables/getStyleVariables.d.ts +3 -0
- package/dist/src/modules/mcp/tools/space/style/variables/index.d.ts +6 -0
- package/dist/src/modules/mcp/tools/space/style/variables/styleVariables.test.d.ts +1 -0
- package/dist/src/modules/mcp/tools/space/style/variables/updateStyleVariable.d.ts +3 -0
- package/package.json +18 -14
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/modules/mcp/tools/collections/deleteCollection.ts
|
|
4
|
+
var deleteCollectionTool = {
|
|
5
|
+
name: "delete_collection",
|
|
6
|
+
adapterName: "deleteCollection",
|
|
7
|
+
mcpDefinition: {
|
|
8
|
+
title: "Delete Collection",
|
|
9
|
+
description: "Delete a collection and all its records permanently. This action cannot be undone.",
|
|
10
|
+
inputSchema: z.object({ collectionId: z.string().describe("Collection ID") }),
|
|
11
|
+
outputSchema: z.literal(true).describe("Always true on successful deletion")
|
|
12
|
+
},
|
|
13
|
+
definition: { allowedModes: getAllowedModes("write") }
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { deleteCollectionTool as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/modules/mcp/tools/collections/deleteCollectionRecord.ts
|
|
4
|
+
var deleteCollectionRecordTool = {
|
|
5
|
+
name: "delete_collection_record",
|
|
6
|
+
adapterName: "deleteCollectionRecord",
|
|
7
|
+
mcpDefinition: {
|
|
8
|
+
title: "Delete Collection Record",
|
|
9
|
+
description: "Delete a record from a collection.",
|
|
10
|
+
inputSchema: z.object({ recordId: z.string().describe("Record ID") }),
|
|
11
|
+
outputSchema: z.literal(true).describe("Always true on successful deletion")
|
|
12
|
+
},
|
|
13
|
+
definition: { allowedModes: getAllowedModes("write") }
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { deleteCollectionRecordTool as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/modules/mcp/tools/collections/getCollection.ts
|
|
4
|
+
var getCollectionTool = {
|
|
5
|
+
name: "get_collection",
|
|
6
|
+
adapterName: "getCollection",
|
|
7
|
+
mcpDefinition: {
|
|
8
|
+
title: "Get Collection",
|
|
9
|
+
description: "Get a specific collection by ID.",
|
|
10
|
+
inputSchema: z.object({ collectionId: z.string().describe("Collection ID") }),
|
|
11
|
+
outputSchema: z.object({
|
|
12
|
+
id: z.string().describe("Collection ID"),
|
|
13
|
+
name: z.string().describe("Collection name"),
|
|
14
|
+
namePlural: z.string().describe("Plural collection name"),
|
|
15
|
+
fields: z.record(z.string(), z.unknown()).describe("Field definitions keyed by field name")
|
|
16
|
+
}).catchall(z.unknown()).nullable().describe("The collection object, or null if not found")
|
|
17
|
+
},
|
|
18
|
+
definition: { allowedModes: getAllowedModes("read") }
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { getCollectionTool as default };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/modules/mcp/tools/collections/getCollectionRecord.ts
|
|
4
|
+
var getCollectionRecordTool = {
|
|
5
|
+
name: "get_collection_record",
|
|
6
|
+
adapterName: "getCollectionRecord",
|
|
7
|
+
mcpDefinition: {
|
|
8
|
+
title: "Get Collection Record",
|
|
9
|
+
description: "Get a specific record from a collection.",
|
|
10
|
+
inputSchema: z.object({ recordId: z.string().describe("Record ID") }),
|
|
11
|
+
outputSchema: z.object({
|
|
12
|
+
id: z.string().describe("Record ID"),
|
|
13
|
+
collectionId: z.string().describe("Collection ID"),
|
|
14
|
+
values: z.record(z.string(), z.unknown()).describe("Field values keyed by field name"),
|
|
15
|
+
status: z.enum([
|
|
16
|
+
"draft",
|
|
17
|
+
"published",
|
|
18
|
+
"archived"
|
|
19
|
+
]).describe("Publication status")
|
|
20
|
+
}).catchall(z.unknown()).nullable().describe("The record, or null if not found")
|
|
21
|
+
},
|
|
22
|
+
definition: { allowedModes: getAllowedModes("read") }
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { getCollectionRecordTool as default };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/modules/mcp/tools/collections/getCollectionRecords.ts
|
|
4
|
+
var getCollectionRecordsTool = {
|
|
5
|
+
name: "get_collection_records",
|
|
6
|
+
adapterName: "getCollectionRecords",
|
|
7
|
+
mcpDefinition: {
|
|
8
|
+
title: "Get Collection Records",
|
|
9
|
+
description: "List records from a collection, with optional filtering and result cap.",
|
|
10
|
+
inputSchema: z.object({
|
|
11
|
+
collectionId: z.string().describe("Collection ID"),
|
|
12
|
+
filter: z.record(z.string(), z.unknown()).optional().describe("Key-value filter map — each key is a field name and value is the value to match"),
|
|
13
|
+
limit: z.number().optional().describe("Maximum number of records to return")
|
|
14
|
+
}),
|
|
15
|
+
outputSchema: z.array(z.object({
|
|
16
|
+
id: z.string().describe("Record ID"),
|
|
17
|
+
collectionId: z.string().describe("Collection ID"),
|
|
18
|
+
values: z.record(z.string(), z.unknown()).describe("Field values keyed by field name"),
|
|
19
|
+
status: z.enum([
|
|
20
|
+
"draft",
|
|
21
|
+
"published",
|
|
22
|
+
"archived"
|
|
23
|
+
]).describe("Publication status")
|
|
24
|
+
}).catchall(z.unknown())).describe("Array of records in the collection")
|
|
25
|
+
},
|
|
26
|
+
definition: { allowedModes: getAllowedModes("read") }
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { getCollectionRecordsTool as default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/modules/mcp/tools/collections/getCollections.ts
|
|
4
|
+
var getCollectionsTool = {
|
|
5
|
+
name: "get_collections",
|
|
6
|
+
adapterName: "getCollections",
|
|
7
|
+
mcpDefinition: {
|
|
8
|
+
title: "Get Collections",
|
|
9
|
+
description: "Get all collections for the current space.",
|
|
10
|
+
inputSchema: z.object({}),
|
|
11
|
+
outputSchema: z.array(z.object({
|
|
12
|
+
id: z.string().describe("Collection ID"),
|
|
13
|
+
name: z.string().describe("Collection name")
|
|
14
|
+
}).catchall(z.unknown())).describe("Array of collections in the space")
|
|
15
|
+
},
|
|
16
|
+
definition: { allowedModes: getAllowedModes("read") }
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { getCollectionsTool as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/modules/mcp/tools/collections/updateCollection.ts
|
|
4
|
+
var updateCollectionTool = {
|
|
5
|
+
name: "update_collection",
|
|
6
|
+
adapterName: "updateCollection",
|
|
7
|
+
mcpDefinition: {
|
|
8
|
+
title: "Update Collection",
|
|
9
|
+
description: "Update an existing collection — rename, change privacy, or modify field definitions.",
|
|
10
|
+
inputSchema: z.object({
|
|
11
|
+
collectionId: z.string().describe("Collection ID"),
|
|
12
|
+
updates: z.object({
|
|
13
|
+
name: z.string().optional().describe("Singular collection name"),
|
|
14
|
+
namePlural: z.string().optional().describe("Plural collection name"),
|
|
15
|
+
description: z.string().optional().describe("Short description of what this collection stores"),
|
|
16
|
+
privacy: z.enum(["public", "private"]).optional().describe("\"public\" allows unauthenticated reads; \"private\" requires auth"),
|
|
17
|
+
fields: z.record(z.string(), z.unknown()).optional().describe("Updated field definitions keyed by field name")
|
|
18
|
+
}).describe("Fields to update — only the provided fields are changed")
|
|
19
|
+
}),
|
|
20
|
+
outputSchema: z.object({
|
|
21
|
+
id: z.string().describe("Collection ID"),
|
|
22
|
+
name: z.string().describe("Collection name")
|
|
23
|
+
}).catchall(z.unknown()).describe("The updated collection")
|
|
24
|
+
},
|
|
25
|
+
definition: { allowedModes: getAllowedModes("write") }
|
|
26
|
+
};
|
|
27
|
+
//#endregion
|
|
28
|
+
export { updateCollectionTool as default };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/modules/mcp/tools/collections/updateCollectionRecord.ts
|
|
4
|
+
var updateCollectionRecordTool = {
|
|
5
|
+
name: "update_collection_record",
|
|
6
|
+
adapterName: "updateCollectionRecord",
|
|
7
|
+
mcpDefinition: {
|
|
8
|
+
title: "Update Collection Record",
|
|
9
|
+
description: "Update an existing collection record. Only the provided values and status are changed.",
|
|
10
|
+
inputSchema: z.object({
|
|
11
|
+
recordId: z.string().describe("Record ID"),
|
|
12
|
+
values: z.record(z.string(), z.union([
|
|
13
|
+
z.string(),
|
|
14
|
+
z.number(),
|
|
15
|
+
z.boolean()
|
|
16
|
+
])).optional().describe("Field values to update, keyed by field name. Only the provided fields are changed."),
|
|
17
|
+
status: z.enum([
|
|
18
|
+
"draft",
|
|
19
|
+
"published",
|
|
20
|
+
"archived"
|
|
21
|
+
]).optional().describe("Publication status: \"draft\", \"published\", or \"archived\"")
|
|
22
|
+
}),
|
|
23
|
+
outputSchema: z.object({
|
|
24
|
+
id: z.string().describe("Record ID"),
|
|
25
|
+
collectionId: z.string().describe("Collection ID")
|
|
26
|
+
}).catchall(z.unknown()).describe("The updated record")
|
|
27
|
+
},
|
|
28
|
+
definition: { allowedModes: getAllowedModes("write") }
|
|
29
|
+
};
|
|
30
|
+
//#endregion
|
|
31
|
+
export { updateCollectionRecordTool as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { getAllowedModes, toolResponseOk } from "../../helpers.js";
|
|
2
|
+
import { getResourceList } from "../../resources/index.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region src/modules/mcp/tools/docs/listResources.ts
|
|
5
|
+
var listResourcesTool = {
|
|
6
|
+
name: "list_resources",
|
|
7
|
+
mcpDefinition: {
|
|
8
|
+
title: "List Resources",
|
|
9
|
+
description: "List every available domain documentation resource (glossary entries and workflows) with its URI and a short description.\n\nUse this to discover which resource to read, then call read_resource with the chosen URI.",
|
|
10
|
+
inputSchema: z.object({})
|
|
11
|
+
},
|
|
12
|
+
definition: { allowedModes: getAllowedModes("read") },
|
|
13
|
+
handler: () => toolResponseOk(getResourceList())
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { listResourcesTool as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { getAllowedModes, toolResponseErr, toolResponseOk } from "../../helpers.js";
|
|
2
|
+
import { getResourceByUri } from "../../resources/index.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region src/modules/mcp/tools/docs/readResource.ts
|
|
5
|
+
var readResourceTool = {
|
|
6
|
+
name: "read_resource",
|
|
7
|
+
mcpDefinition: {
|
|
8
|
+
title: "Read Resource",
|
|
9
|
+
description: "Read a domain documentation resource (a glossary entry or a workflow) by its URI.\n\nRead the matching resource before performing the related task. Use list_resources first if unsure of the URI.",
|
|
10
|
+
inputSchema: z.object({ uri: z.string().describe("Resource URI to read, e.g. \"plitzi://docs/element\". Call list_resources to see valid URIs.") })
|
|
11
|
+
},
|
|
12
|
+
definition: { allowedModes: getAllowedModes("read") },
|
|
13
|
+
handler: ({ uri }) => {
|
|
14
|
+
const resource = getResourceByUri(uri);
|
|
15
|
+
if (!resource) return toolResponseErr(`Resource not found: ${uri}. Call list_resources to see available URIs.`);
|
|
16
|
+
return toolResponseOk({
|
|
17
|
+
uri: resource.uri,
|
|
18
|
+
name: resource.name
|
|
19
|
+
}, resource.content);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { readResourceTool as default };
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import applyPreviewTool from "./space/schema/applyPreview.js";
|
|
3
|
+
import getSpaceSettingsTool from "./space/schema/getSpaceSettings.js";
|
|
4
|
+
import updateSpaceSettingsTool from "./space/schema/updateSpaceSettings.js";
|
|
5
|
+
import cloneElementTool from "./space/schema/elements/cloneElement.js";
|
|
6
|
+
import createElementTool from "./space/schema/elements/createElement.js";
|
|
7
|
+
import deleteElementTool from "./space/schema/elements/deleteElement.js";
|
|
8
|
+
import getElementTool from "./space/schema/elements/getElement.js";
|
|
9
|
+
import getElementsTool from "./space/schema/elements/getElements.js";
|
|
10
|
+
import listElementsTool from "./space/schema/elements/listElements.js";
|
|
11
|
+
import moveElementTool from "./space/schema/elements/moveElement.js";
|
|
12
|
+
import updateElementTool from "./space/schema/elements/updateElement.js";
|
|
13
|
+
import createPageFolderTool from "./space/schema/pageFolders/createPageFolder.js";
|
|
14
|
+
import deletePageFolderTool from "./space/schema/pageFolders/deletePageFolder.js";
|
|
15
|
+
import getPageFolderTool from "./space/schema/pageFolders/getPageFolder.js";
|
|
16
|
+
import getPageFoldersTool from "./space/schema/pageFolders/getPageFolders.js";
|
|
17
|
+
import updatePageFolderTool from "./space/schema/pageFolders/updatePageFolder.js";
|
|
18
|
+
import createPageTool from "./space/schema/pages/createPage.js";
|
|
19
|
+
import deletePageTool from "./space/schema/pages/deletePage.js";
|
|
20
|
+
import getPageTool from "./space/schema/pages/getPage.js";
|
|
21
|
+
import getPageBySlugTool from "./space/schema/pages/getPageBySlug.js";
|
|
22
|
+
import getPagesTool from "./space/schema/pages/getPages.js";
|
|
23
|
+
import updatePageTool from "./space/schema/pages/updatePage.js";
|
|
24
|
+
import createVariableTool from "./space/schema/variables/createVariable.js";
|
|
25
|
+
import deleteVariableTool from "./space/schema/variables/deleteVariable.js";
|
|
26
|
+
import getVariableTool from "./space/schema/variables/getVariable.js";
|
|
27
|
+
import getVariablesTool from "./space/schema/variables/getVariables.js";
|
|
28
|
+
import updateVariableTool from "./space/schema/variables/updateVariable.js";
|
|
29
|
+
import createStyleSelectorTool from "./space/style/selectors/createStyleSelector.js";
|
|
30
|
+
import deleteStyleSelectorTool from "./space/style/selectors/deleteStyleSelector.js";
|
|
31
|
+
import getStyleSelectorsTool from "./space/style/selectors/getStyleSelectors.js";
|
|
32
|
+
import updateStyleSelectorTool from "./space/style/selectors/updateStyleSelector.js";
|
|
33
|
+
import createStyleVariableTool from "./space/style/variables/createStyleVariable.js";
|
|
34
|
+
import deleteStyleVariableTool from "./space/style/variables/deleteStyleVariable.js";
|
|
35
|
+
import getStyleVariableTool from "./space/style/variables/getStyleVariable.js";
|
|
36
|
+
import getStyleVariablesTool from "./space/style/variables/getStyleVariables.js";
|
|
37
|
+
import updateStyleVariableTool from "./space/style/variables/updateStyleVariable.js";
|
|
38
|
+
import addResourceTool from "./resources/addResource.js";
|
|
39
|
+
import getResourceTool from "./resources/getResource.js";
|
|
40
|
+
import getResourcesTool from "./resources/getResources.js";
|
|
41
|
+
import moveResourceTool from "./resources/moveResource.js";
|
|
42
|
+
import removeResourceTool from "./resources/removeResource.js";
|
|
43
|
+
import createSegmentTool from "./segment/createSegment.js";
|
|
44
|
+
import deleteSegmentTool from "./segment/deleteSegment.js";
|
|
45
|
+
import getSegmentTool from "./segment/getSegment.js";
|
|
46
|
+
import getSegmentsTool from "./segment/getSegments.js";
|
|
47
|
+
import updateSegmentTool from "./segment/updateSegment.js";
|
|
48
|
+
import createSegmentElementTool from "./segment/schema/elements/createSegmentElement.js";
|
|
49
|
+
import deleteSegmentElementTool from "./segment/schema/elements/deleteSegmentElement.js";
|
|
50
|
+
import moveSegmentElementTool from "./segment/schema/elements/moveSegmentElement.js";
|
|
51
|
+
import updateSegmentElementTool from "./segment/schema/elements/updateSegmentElement.js";
|
|
52
|
+
import createSegmentVariableTool from "./segment/schema/variables/createSegmentVariable.js";
|
|
53
|
+
import deleteSegmentVariableTool from "./segment/schema/variables/deleteSegmentVariable.js";
|
|
54
|
+
import updateSegmentVariableTool from "./segment/schema/variables/updateSegmentVariable.js";
|
|
55
|
+
import createSegmentStyleVariableTool from "./segment/style/variables/createSegmentStyleVariable.js";
|
|
56
|
+
import deleteSegmentStyleVariableTool from "./segment/style/variables/deleteSegmentStyleVariable.js";
|
|
57
|
+
import updateSegmentStyleVariableTool from "./segment/style/variables/updateSegmentStyleVariable.js";
|
|
58
|
+
import addPluginTool from "./plugins/addPlugin.js";
|
|
59
|
+
import listPluginsTool from "./plugins/listPlugins.js";
|
|
60
|
+
import removePluginTool from "./plugins/removePlugin.js";
|
|
61
|
+
import updatePluginTool from "./plugins/updatePlugin.js";
|
|
62
|
+
import getCollectionsTool from "./collections/getCollections.js";
|
|
63
|
+
import getCollectionTool from "./collections/getCollection.js";
|
|
64
|
+
import createCollectionTool from "./collections/createCollection.js";
|
|
65
|
+
import updateCollectionTool from "./collections/updateCollection.js";
|
|
66
|
+
import deleteCollectionTool from "./collections/deleteCollection.js";
|
|
67
|
+
import getCollectionRecordsTool from "./collections/getCollectionRecords.js";
|
|
68
|
+
import getCollectionRecordTool from "./collections/getCollectionRecord.js";
|
|
69
|
+
import createCollectionRecordTool from "./collections/createCollectionRecord.js";
|
|
70
|
+
import updateCollectionRecordTool from "./collections/updateCollectionRecord.js";
|
|
71
|
+
import deleteCollectionRecordTool from "./collections/deleteCollectionRecord.js";
|
|
72
|
+
import listResourcesTool from "./docs/listResources.js";
|
|
73
|
+
import readResourceTool from "./docs/readResource.js";
|
|
74
|
+
//#region src/modules/mcp/tools/index.ts
|
|
75
|
+
var tools_exports = /* @__PURE__ */ __exportAll({
|
|
76
|
+
addPluginTool: () => addPluginTool,
|
|
77
|
+
addResourceTool: () => addResourceTool,
|
|
78
|
+
applyPreviewTool: () => applyPreviewTool,
|
|
79
|
+
cloneElementTool: () => cloneElementTool,
|
|
80
|
+
createCollectionRecordTool: () => createCollectionRecordTool,
|
|
81
|
+
createCollectionTool: () => createCollectionTool,
|
|
82
|
+
createElementTool: () => createElementTool,
|
|
83
|
+
createPageFolderTool: () => createPageFolderTool,
|
|
84
|
+
createPageTool: () => createPageTool,
|
|
85
|
+
createSegmentElementTool: () => createSegmentElementTool,
|
|
86
|
+
createSegmentStyleVariableTool: () => createSegmentStyleVariableTool,
|
|
87
|
+
createSegmentTool: () => createSegmentTool,
|
|
88
|
+
createSegmentVariableTool: () => createSegmentVariableTool,
|
|
89
|
+
createStyleSelectorTool: () => createStyleSelectorTool,
|
|
90
|
+
createStyleVariableTool: () => createStyleVariableTool,
|
|
91
|
+
createVariableTool: () => createVariableTool,
|
|
92
|
+
deleteCollectionRecordTool: () => deleteCollectionRecordTool,
|
|
93
|
+
deleteCollectionTool: () => deleteCollectionTool,
|
|
94
|
+
deleteElementTool: () => deleteElementTool,
|
|
95
|
+
deletePageFolderTool: () => deletePageFolderTool,
|
|
96
|
+
deletePageTool: () => deletePageTool,
|
|
97
|
+
deleteSegmentElementTool: () => deleteSegmentElementTool,
|
|
98
|
+
deleteSegmentStyleVariableTool: () => deleteSegmentStyleVariableTool,
|
|
99
|
+
deleteSegmentTool: () => deleteSegmentTool,
|
|
100
|
+
deleteSegmentVariableTool: () => deleteSegmentVariableTool,
|
|
101
|
+
deleteStyleSelectorTool: () => deleteStyleSelectorTool,
|
|
102
|
+
deleteStyleVariableTool: () => deleteStyleVariableTool,
|
|
103
|
+
deleteVariableTool: () => deleteVariableTool,
|
|
104
|
+
getCollectionRecordTool: () => getCollectionRecordTool,
|
|
105
|
+
getCollectionRecordsTool: () => getCollectionRecordsTool,
|
|
106
|
+
getCollectionTool: () => getCollectionTool,
|
|
107
|
+
getCollectionsTool: () => getCollectionsTool,
|
|
108
|
+
getElementTool: () => getElementTool,
|
|
109
|
+
getElementsTool: () => getElementsTool,
|
|
110
|
+
getPageBySlugTool: () => getPageBySlugTool,
|
|
111
|
+
getPageFolderTool: () => getPageFolderTool,
|
|
112
|
+
getPageFoldersTool: () => getPageFoldersTool,
|
|
113
|
+
getPageTool: () => getPageTool,
|
|
114
|
+
getPagesTool: () => getPagesTool,
|
|
115
|
+
getResourceTool: () => getResourceTool,
|
|
116
|
+
getResourcesTool: () => getResourcesTool,
|
|
117
|
+
getSegmentTool: () => getSegmentTool,
|
|
118
|
+
getSegmentsTool: () => getSegmentsTool,
|
|
119
|
+
getSpaceSettingsTool: () => getSpaceSettingsTool,
|
|
120
|
+
getStyleSelectorsTool: () => getStyleSelectorsTool,
|
|
121
|
+
getStyleVariableTool: () => getStyleVariableTool,
|
|
122
|
+
getStyleVariablesTool: () => getStyleVariablesTool,
|
|
123
|
+
getVariableTool: () => getVariableTool,
|
|
124
|
+
getVariablesTool: () => getVariablesTool,
|
|
125
|
+
listElementsTool: () => listElementsTool,
|
|
126
|
+
listPluginsTool: () => listPluginsTool,
|
|
127
|
+
listResourcesTool: () => listResourcesTool,
|
|
128
|
+
moveElementTool: () => moveElementTool,
|
|
129
|
+
moveResourceTool: () => moveResourceTool,
|
|
130
|
+
moveSegmentElementTool: () => moveSegmentElementTool,
|
|
131
|
+
readResourceTool: () => readResourceTool,
|
|
132
|
+
removePluginTool: () => removePluginTool,
|
|
133
|
+
removeResourceTool: () => removeResourceTool,
|
|
134
|
+
updateCollectionRecordTool: () => updateCollectionRecordTool,
|
|
135
|
+
updateCollectionTool: () => updateCollectionTool,
|
|
136
|
+
updateElementTool: () => updateElementTool,
|
|
137
|
+
updatePageFolderTool: () => updatePageFolderTool,
|
|
138
|
+
updatePageTool: () => updatePageTool,
|
|
139
|
+
updatePluginTool: () => updatePluginTool,
|
|
140
|
+
updateSegmentElementTool: () => updateSegmentElementTool,
|
|
141
|
+
updateSegmentStyleVariableTool: () => updateSegmentStyleVariableTool,
|
|
142
|
+
updateSegmentTool: () => updateSegmentTool,
|
|
143
|
+
updateSegmentVariableTool: () => updateSegmentVariableTool,
|
|
144
|
+
updateSpaceSettingsTool: () => updateSpaceSettingsTool,
|
|
145
|
+
updateStyleSelectorTool: () => updateStyleSelectorTool,
|
|
146
|
+
updateStyleVariableTool: () => updateStyleVariableTool,
|
|
147
|
+
updateVariableTool: () => updateVariableTool
|
|
148
|
+
});
|
|
149
|
+
//#endregion
|
|
150
|
+
export { tools_exports };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/modules/mcp/tools/plugins/addPlugin.ts
|
|
4
|
+
var addPluginTool = {
|
|
5
|
+
name: "add_plugin",
|
|
6
|
+
adapterName: "addPlugin",
|
|
7
|
+
mcpDefinition: {
|
|
8
|
+
title: "Add Plugin",
|
|
9
|
+
description: "Add a plugin to the current space.\n\nUse list_plugins to see available plugin types first. Set override: true to replace an existing plugin of the same type.",
|
|
10
|
+
inputSchema: z.object({
|
|
11
|
+
pluginType: z.string().describe("Plugin type identifier"),
|
|
12
|
+
resource: z.string().describe("Plugin resource string"),
|
|
13
|
+
override: z.boolean().optional().describe("Whether to override if the plugin already exists (default: false)")
|
|
14
|
+
}),
|
|
15
|
+
outputSchema: z.object({
|
|
16
|
+
type: z.string().describe("Plugin type"),
|
|
17
|
+
resource: z.string().describe("Plugin resource"),
|
|
18
|
+
settings: z.record(z.string(), z.unknown()).describe("Plugin settings")
|
|
19
|
+
})
|
|
20
|
+
},
|
|
21
|
+
definition: { allowedModes: getAllowedModes("write") }
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { addPluginTool as default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/modules/mcp/tools/plugins/listPlugins.ts
|
|
4
|
+
var listPluginsTool = {
|
|
5
|
+
name: "list_plugins",
|
|
6
|
+
adapterName: "listPlugins",
|
|
7
|
+
mcpDefinition: {
|
|
8
|
+
title: "List Plugins",
|
|
9
|
+
description: "List all plugins installed in the space — returns name, version, and description.\n\nPlugins and element types are different concepts: this tool lists plugins (installed packages), not element type identifiers. To get valid type values for create_element, use get_builder_context (elementDefaults keys) or inspect existing elements via get_schema.",
|
|
10
|
+
inputSchema: z.object({}),
|
|
11
|
+
outputSchema: z.array(z.object({
|
|
12
|
+
name: z.string().describe("Plugin name"),
|
|
13
|
+
version: z.string().optional().describe("Plugin version"),
|
|
14
|
+
description: z.string().optional().describe("Plugin description")
|
|
15
|
+
})).describe("Array of available plugins")
|
|
16
|
+
},
|
|
17
|
+
definition: { allowedModes: getAllowedModes("read") }
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { listPluginsTool as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/modules/mcp/tools/plugins/removePlugin.ts
|
|
4
|
+
var removePluginTool = {
|
|
5
|
+
name: "remove_plugin",
|
|
6
|
+
adapterName: "removePlugin",
|
|
7
|
+
mcpDefinition: {
|
|
8
|
+
title: "Remove Plugin",
|
|
9
|
+
description: "Remove a plugin from the current space.\n\nUse list_plugins to see installed plugin types.",
|
|
10
|
+
inputSchema: z.object({ pluginType: z.string().describe("Plugin type identifier to remove") }),
|
|
11
|
+
outputSchema: z.boolean().describe("True if the plugin was removed successfully")
|
|
12
|
+
},
|
|
13
|
+
definition: { allowedModes: getAllowedModes("write") }
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { removePluginTool as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/modules/mcp/tools/plugins/updatePlugin.ts
|
|
4
|
+
var updatePluginTool = {
|
|
5
|
+
name: "update_plugin",
|
|
6
|
+
adapterName: "updatePlugin",
|
|
7
|
+
mcpDefinition: {
|
|
8
|
+
title: "Update Plugin",
|
|
9
|
+
description: "Update the resource configuration of an installed plugin.\n\nUse list_plugins to see installed plugin types.",
|
|
10
|
+
inputSchema: z.object({
|
|
11
|
+
pluginType: z.string().describe("Plugin type identifier to update"),
|
|
12
|
+
resource: z.string().describe("New resource string for the plugin")
|
|
13
|
+
}),
|
|
14
|
+
outputSchema: z.object({
|
|
15
|
+
type: z.string().describe("Plugin type"),
|
|
16
|
+
resource: z.string().describe("Updated plugin resource"),
|
|
17
|
+
settings: z.record(z.string(), z.unknown()).describe("Plugin settings")
|
|
18
|
+
})
|
|
19
|
+
},
|
|
20
|
+
definition: { allowedModes: getAllowedModes("write") }
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { updatePluginTool as default };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/modules/mcp/tools/resources/addResource.ts
|
|
4
|
+
var resourceSchema = z.object({
|
|
5
|
+
id: z.string().describe("S3 key / resource path"),
|
|
6
|
+
name: z.string().describe("Filename"),
|
|
7
|
+
path: z.string().describe("Full CDN URL"),
|
|
8
|
+
type: z.string().describe("Resource type (image, video, application, plugin, template, unknown)"),
|
|
9
|
+
size: z.number().describe("File size in bytes"),
|
|
10
|
+
cdnIdentifier: z.string().describe("CDN identifier"),
|
|
11
|
+
created_at: z.number().describe("Unix timestamp of creation"),
|
|
12
|
+
updated_at: z.number().describe("Unix timestamp of last update")
|
|
13
|
+
});
|
|
14
|
+
var addResourceTool = {
|
|
15
|
+
name: "add_resource",
|
|
16
|
+
adapterName: "addResource",
|
|
17
|
+
mcpDefinition: {
|
|
18
|
+
title: "Add Resource",
|
|
19
|
+
description: "Upload a resource to the space CDN by fetching from a URL.\n\nThe resource is downloaded from the provided URL, uploaded to the CDN, and the CDN cache is invalidated. Use for images, videos, or other static files.",
|
|
20
|
+
inputSchema: z.object({
|
|
21
|
+
url: z.string().describe("Source URL to fetch and upload as a resource"),
|
|
22
|
+
cdnIdentifier: z.string().describe("CDN identifier to upload to — call get_resources first and use the cdnIdentifier from an existing resource of the same type (images share one CDN, plugins another)"),
|
|
23
|
+
filename: z.string().optional().describe("Override filename (defaults from URL)"),
|
|
24
|
+
type: z.string().optional().describe("Resource type hint: \"plugin\", \"template\", or leave blank for auto-detect"),
|
|
25
|
+
prefix: z.string().optional().describe("Subfolder prefix within the resource folder"),
|
|
26
|
+
compression: z.string().optional().describe("Compression encoding (e.g. \"gzip\", \"br\")")
|
|
27
|
+
}),
|
|
28
|
+
outputSchema: resourceSchema.describe("The uploaded resource metadata")
|
|
29
|
+
},
|
|
30
|
+
definition: { allowedModes: getAllowedModes("write") }
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { addResourceTool as default };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/modules/mcp/tools/resources/getResource.ts
|
|
4
|
+
var resourceSchema = z.object({
|
|
5
|
+
id: z.string().describe("S3 key / resource path"),
|
|
6
|
+
name: z.string().describe("Filename"),
|
|
7
|
+
path: z.string().describe("Full CDN URL"),
|
|
8
|
+
type: z.string().describe("Resource type (image, video, application, plugin, template, unknown)"),
|
|
9
|
+
size: z.number().describe("File size in bytes"),
|
|
10
|
+
cdnIdentifier: z.string().describe("CDN identifier"),
|
|
11
|
+
created_at: z.number().describe("Unix timestamp of creation"),
|
|
12
|
+
updated_at: z.number().describe("Unix timestamp of last update")
|
|
13
|
+
});
|
|
14
|
+
var getResourceTool = {
|
|
15
|
+
name: "get_resource",
|
|
16
|
+
adapterName: "getResource",
|
|
17
|
+
mcpDefinition: {
|
|
18
|
+
title: "Get Resource",
|
|
19
|
+
description: "Get metadata for a single resource by its S3 key.",
|
|
20
|
+
inputSchema: z.object({
|
|
21
|
+
identifier: z.string().describe("S3 key / resource path to look up"),
|
|
22
|
+
cdnIdentifier: z.string().describe("CDN identifier")
|
|
23
|
+
}),
|
|
24
|
+
outputSchema: resourceSchema.nullable().describe("The resource metadata, or null if not found")
|
|
25
|
+
},
|
|
26
|
+
definition: { allowedModes: getAllowedModes("read") }
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { getResourceTool as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/modules/mcp/tools/resources/getResources.ts
|
|
4
|
+
var inputSchema = z.object({});
|
|
5
|
+
var resourceSchema = z.object({
|
|
6
|
+
id: z.string().describe("S3 key / resource path"),
|
|
7
|
+
name: z.string().describe("Filename"),
|
|
8
|
+
path: z.string().describe("Full CDN URL"),
|
|
9
|
+
type: z.string().describe("Resource type (image, video, application, plugin, template, unknown)"),
|
|
10
|
+
size: z.number().describe("File size in bytes"),
|
|
11
|
+
cdnIdentifier: z.string().describe("CDN identifier"),
|
|
12
|
+
created_at: z.number().describe("Unix timestamp of creation"),
|
|
13
|
+
updated_at: z.number().describe("Unix timestamp of last update")
|
|
14
|
+
});
|
|
15
|
+
var getResourcesTool = {
|
|
16
|
+
name: "get_resources",
|
|
17
|
+
adapterName: "getResources",
|
|
18
|
+
mcpDefinition: {
|
|
19
|
+
title: "Get Resources",
|
|
20
|
+
description: "List all CDN resources (images, videos, documents, plugins, templates) for the current space.",
|
|
21
|
+
inputSchema,
|
|
22
|
+
outputSchema: z.object({ resources: z.array(resourceSchema).describe("List of resources for the current space") }).describe("Resources list")
|
|
23
|
+
},
|
|
24
|
+
definition: { allowedModes: getAllowedModes("read") }
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { getResourcesTool as default };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/modules/mcp/tools/resources/moveResource.ts
|
|
4
|
+
var resourceSchema = z.object({
|
|
5
|
+
id: z.string().describe("S3 key / resource path"),
|
|
6
|
+
name: z.string().describe("Filename"),
|
|
7
|
+
path: z.string().describe("Full CDN URL"),
|
|
8
|
+
type: z.string().describe("Resource type (image, video, application, plugin, template, unknown)"),
|
|
9
|
+
size: z.number().describe("File size in bytes"),
|
|
10
|
+
cdnIdentifier: z.string().describe("CDN identifier"),
|
|
11
|
+
created_at: z.number().describe("Unix timestamp of creation"),
|
|
12
|
+
updated_at: z.number().describe("Unix timestamp of last update")
|
|
13
|
+
});
|
|
14
|
+
var moveResourceTool = {
|
|
15
|
+
name: "move_resource",
|
|
16
|
+
adapterName: "moveResource",
|
|
17
|
+
mcpDefinition: {
|
|
18
|
+
title: "Move Resource",
|
|
19
|
+
description: "Move a resource to a different subfolder within the same CDN.\n\nOnly asset resources can be moved (plugin and template resources are locked). The CDN cache is invalidated after the move.",
|
|
20
|
+
inputSchema: z.object({
|
|
21
|
+
identifier: z.string().describe("Current S3 key / resource path to move"),
|
|
22
|
+
cdnIdentifier: z.string().describe("CDN identifier"),
|
|
23
|
+
prefix: z.string().describe("New subfolder prefix to move the resource into")
|
|
24
|
+
}),
|
|
25
|
+
outputSchema: resourceSchema.describe("The moved resource metadata at its new path")
|
|
26
|
+
},
|
|
27
|
+
definition: { allowedModes: getAllowedModes("write") }
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { moveResourceTool as default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { getAllowedModes } from "../../helpers.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/modules/mcp/tools/resources/removeResource.ts
|
|
4
|
+
var removeResourceTool = {
|
|
5
|
+
name: "remove_resource",
|
|
6
|
+
adapterName: "removeResource",
|
|
7
|
+
mcpDefinition: {
|
|
8
|
+
title: "Remove Resource",
|
|
9
|
+
description: "Delete a resource from the CDN.\n\nPlugin resources are deleted recursively (entire plugin folder). Asset and template resources are deleted as single files. The CDN cache is invalidated after deletion.",
|
|
10
|
+
inputSchema: z.object({
|
|
11
|
+
identifier: z.string().describe("S3 key / resource path to delete"),
|
|
12
|
+
cdnIdentifier: z.string().describe("CDN identifier")
|
|
13
|
+
}),
|
|
14
|
+
outputSchema: z.object({ id: z.string().describe("The deleted resource identifier") }).describe("Deleted resource confirmation")
|
|
15
|
+
},
|
|
16
|
+
definition: { allowedModes: getAllowedModes("write") }
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { removeResourceTool as default };
|