@paroicms/mcp-plugin 0.2.8 → 0.3.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.
@@ -60,6 +60,9 @@ async function executeAction(connector, request) {
60
60
  const result = await connector.createPart(request.payload);
61
61
  return { lNodeId: result.partId };
62
62
  }
63
+ case "moveDocument":
64
+ await connector.moveDocument(request.payload.documentNodeId, request.payload.newParentNodeId);
65
+ return { success: true };
63
66
  case "getSiteInfo":
64
67
  return await connector.getSiteInfo();
65
68
  }
@@ -90,6 +90,15 @@ const CreatePartMcpApiRequestAT = type({
90
90
  },
91
91
  "+": "reject",
92
92
  });
93
+ const MoveDocumentMcpApiRequestAT = type({
94
+ action: '"moveDocument"',
95
+ payload: {
96
+ documentNodeId: "string",
97
+ newParentNodeId: "string",
98
+ "+": "reject",
99
+ },
100
+ "+": "reject",
101
+ });
93
102
  const GetSiteInfoMcpApiRequestAT = type({
94
103
  action: '"getSiteInfo"',
95
104
  "+": "reject",
@@ -102,4 +111,5 @@ export const McpApiRequestAT = SearchDocumentsMcpApiRequestAT.or(DeleteDocumentM
102
111
  .or(UpdateFieldsMcpApiRequestAT)
103
112
  .or(CreateDocumentMcpApiRequestAT)
104
113
  .or(CreatePartMcpApiRequestAT)
114
+ .or(MoveDocumentMcpApiRequestAT)
105
115
  .or(GetSiteInfoMcpApiRequestAT);
@@ -4,6 +4,7 @@ import { registerDeleteDocumentTool } from "./delete-document.js";
4
4
  import { registerGetDocumentTool } from "./get-document.js";
5
5
  import { registerGetIntroductionTool } from "./get-introduction.js";
6
6
  import { registerGetSiteInfoTool } from "./get-site-info.js";
7
+ import { registerMoveDocumentTool } from "./move-document.js";
7
8
  import { registerPublishDocumentTool } from "./publish-document.js";
8
9
  import { registerSearchDocumentsTool } from "./search-documents.js";
9
10
  import { registerUnpublishDocumentTool } from "./unpublish-document.js";
@@ -12,6 +13,7 @@ import { registerUpdateFieldsTool } from "./update-fields.js";
12
13
  export function registerTools(server, config) {
13
14
  registerSearchDocumentsTool(server, config);
14
15
  registerDeleteDocumentTool(server, config);
16
+ registerMoveDocumentTool(server, config);
15
17
  registerPublishDocumentTool(server, config);
16
18
  registerUnpublishDocumentTool(server, config);
17
19
  registerGetDocumentTool(server, config);
@@ -0,0 +1,21 @@
1
+ import { z } from "zod";
2
+ import { callApi } from "../http-client.js";
3
+ export function registerMoveDocumentTool(server, config) {
4
+ server.registerTool("paroicms_move_document", {
5
+ description: "Move a document to a different parent document in ParoiCMS",
6
+ inputSchema: {
7
+ documentNodeId: z.string().describe("The node ID of the document to move"),
8
+ newParentNodeId: z.string().describe("The node ID of the new parent document"),
9
+ },
10
+ }, async ({ documentNodeId, newParentNodeId }) => {
11
+ await callApi(config, "moveDocument", { documentNodeId, newParentNodeId });
12
+ return {
13
+ content: [
14
+ {
15
+ type: "text",
16
+ text: `Document node "${documentNodeId}" moved to parent "${newParentNodeId}" successfully.`,
17
+ },
18
+ ],
19
+ };
20
+ });
21
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paroicms/mcp-plugin",
3
- "version": "0.2.8",
3
+ "version": "0.3.0",
4
4
  "description": "MCP (Model Context Protocol) plugin for ParoiCMS - enables AI assistants to search content",
5
5
  "keywords": [
6
6
  "paroicms",
@@ -32,9 +32,9 @@
32
32
  "test:watch": "vitest"
33
33
  },
34
34
  "dependencies": {
35
- "@modelcontextprotocol/sdk": "~1.25.3",
36
- "@paroicms/script-lib": "0.3.16",
37
- "arktype": "~2.1.29",
35
+ "@modelcontextprotocol/sdk": "~1.27.1",
36
+ "@paroicms/script-lib": "0.3.17",
37
+ "arktype": "~2.2.0",
38
38
  "zod": "~3.25.76"
39
39
  },
40
40
  "peerDependencies": {
@@ -42,12 +42,12 @@
42
42
  "@paroicms/public-server-lib": "0"
43
43
  },
44
44
  "devDependencies": {
45
- "@paroicms/public-anywhere-lib": "0.42.0",
46
- "@paroicms/public-server-lib": "0.52.0",
47
- "@types/node": "~24.10.7",
48
- "rimraf": "~6.1.2",
45
+ "@paroicms/public-anywhere-lib": "0.42.1",
46
+ "@paroicms/public-server-lib": "0.53.0",
47
+ "@types/node": "~24.11.0",
48
+ "rimraf": "~6.1.3",
49
49
  "typescript": "~5.9.3",
50
- "vitest": "~4.0.17"
50
+ "vitest": "~4.0.18"
51
51
  },
52
52
  "files": [
53
53
  "backend/dist",