@cplace/test-mcp-server 0.1.14 → 1.0.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.
Files changed (149) hide show
  1. package/README.md +275 -75
  2. package/dist/api.d.ts +4 -0
  3. package/dist/api.d.ts.map +1 -1
  4. package/dist/api.js.map +1 -1
  5. package/dist/conditional-registration.d.ts.map +1 -1
  6. package/dist/conditional-registration.js +21 -3
  7. package/dist/conditional-registration.js.map +1 -1
  8. package/dist/index.js +82 -99
  9. package/dist/index.js.map +1 -1
  10. package/dist/preference-file.d.ts +16 -0
  11. package/dist/preference-file.d.ts.map +1 -0
  12. package/dist/preference-file.js +133 -0
  13. package/dist/preference-file.js.map +1 -0
  14. package/dist/profiles.d.ts +1 -3
  15. package/dist/profiles.d.ts.map +1 -1
  16. package/dist/profiles.js +60 -107
  17. package/dist/profiles.js.map +1 -1
  18. package/dist/searchConversion.d.ts.map +1 -1
  19. package/dist/searchConversion.js +18 -5
  20. package/dist/searchConversion.js.map +1 -1
  21. package/dist/searchSchema.d.ts +25 -25
  22. package/dist/searchSchema.d.ts.map +1 -1
  23. package/dist/searchSchema.js +5 -5
  24. package/dist/searchSchema.js.map +1 -1
  25. package/dist/token-hashing.d.ts +3 -0
  26. package/dist/token-hashing.d.ts.map +1 -0
  27. package/dist/token-hashing.js +18 -0
  28. package/dist/token-hashing.js.map +1 -0
  29. package/dist/tool-metadata.d.ts +2 -0
  30. package/dist/tool-metadata.d.ts.map +1 -0
  31. package/dist/tool-metadata.js +43 -0
  32. package/dist/tool-metadata.js.map +1 -0
  33. package/dist/tools/change-listeners.d.ts +30 -0
  34. package/dist/tools/change-listeners.d.ts.map +1 -1
  35. package/dist/tools/change-listeners.js +24 -18
  36. package/dist/tools/change-listeners.js.map +1 -1
  37. package/dist/tools/common-schemas.d.ts +2 -0
  38. package/dist/tools/common-schemas.d.ts.map +1 -1
  39. package/dist/tools/common-schemas.js +16 -0
  40. package/dist/tools/common-schemas.js.map +1 -1
  41. package/dist/tools/csv-export.d.ts +1849 -0
  42. package/dist/tools/csv-export.d.ts.map +1 -0
  43. package/dist/tools/csv-export.js +61 -0
  44. package/dist/tools/csv-export.js.map +1 -0
  45. package/dist/tools/generic-layouts.d.ts +332 -0
  46. package/dist/tools/generic-layouts.d.ts.map +1 -0
  47. package/dist/tools/generic-layouts.js +490 -0
  48. package/dist/tools/generic-layouts.js.map +1 -0
  49. package/dist/tools/get-operations.d.ts +16 -0
  50. package/dist/tools/get-operations.d.ts.map +1 -0
  51. package/dist/tools/get-operations.js +63 -0
  52. package/dist/tools/get-operations.js.map +1 -0
  53. package/dist/tools/pages.d.ts +55 -0
  54. package/dist/tools/pages.d.ts.map +1 -1
  55. package/dist/tools/pages.js +217 -209
  56. package/dist/tools/pages.js.map +1 -1
  57. package/dist/tools/ppt-export-schemas.d.ts +16 -16
  58. package/dist/tools/ppt-export.d.ts +1493 -0
  59. package/dist/tools/ppt-export.d.ts.map +1 -1
  60. package/dist/tools/ppt-export.js +23 -17
  61. package/dist/tools/ppt-export.js.map +1 -1
  62. package/dist/tools/profile-management.d.ts +20 -0
  63. package/dist/tools/profile-management.d.ts.map +1 -0
  64. package/dist/tools/profile-management.js +250 -0
  65. package/dist/tools/profile-management.js.map +1 -0
  66. package/dist/tools/references.d.ts +36 -0
  67. package/dist/tools/references.d.ts.map +1 -1
  68. package/dist/tools/references.js +48 -45
  69. package/dist/tools/references.js.map +1 -1
  70. package/dist/tools/richstring-widgets.d.ts +51 -0
  71. package/dist/tools/richstring-widgets.d.ts.map +1 -0
  72. package/dist/tools/richstring-widgets.js +173 -0
  73. package/dist/tools/richstring-widgets.js.map +1 -0
  74. package/dist/tools/schedule.d.ts +14 -0
  75. package/dist/tools/schedule.d.ts.map +1 -1
  76. package/dist/tools/schedule.js +7 -3
  77. package/dist/tools/schedule.js.map +1 -1
  78. package/dist/tools/script-logs.d.ts +29 -0
  79. package/dist/tools/script-logs.d.ts.map +1 -0
  80. package/dist/tools/script-logs.js +144 -0
  81. package/dist/tools/script-logs.js.map +1 -0
  82. package/dist/tools/search.d.ts +1870 -0
  83. package/dist/tools/search.d.ts.map +1 -1
  84. package/dist/tools/search.js +49 -75
  85. package/dist/tools/search.js.map +1 -1
  86. package/dist/tools/system.d.ts +2 -1
  87. package/dist/tools/system.d.ts.map +1 -1
  88. package/dist/tools/system.js +68 -2
  89. package/dist/tools/system.js.map +1 -1
  90. package/dist/tools/type-layouts.d.ts +37 -0
  91. package/dist/tools/type-layouts.d.ts.map +1 -1
  92. package/dist/tools/type-layouts.js +57 -11
  93. package/dist/tools/type-layouts.js.map +1 -1
  94. package/dist/tools/type-management.d.ts +134 -0
  95. package/dist/tools/type-management.d.ts.map +1 -0
  96. package/dist/tools/{workspace.js → type-management.js} +67 -307
  97. package/dist/tools/type-management.js.map +1 -0
  98. package/dist/tools/users.d.ts +19 -0
  99. package/dist/tools/users.d.ts.map +1 -1
  100. package/dist/tools/users.js +14 -28
  101. package/dist/tools/users.js.map +1 -1
  102. package/dist/tools/validators.d.ts +28 -0
  103. package/dist/tools/validators.d.ts.map +1 -1
  104. package/dist/tools/validators.js +21 -15
  105. package/dist/tools/validators.js.map +1 -1
  106. package/dist/tools/version-check.d.ts +4 -0
  107. package/dist/tools/version-check.d.ts.map +1 -0
  108. package/dist/tools/version-check.js +107 -0
  109. package/dist/tools/version-check.js.map +1 -0
  110. package/dist/tools/version-history.d.ts +48 -0
  111. package/dist/tools/version-history.d.ts.map +1 -1
  112. package/dist/tools/version-history.js +39 -29
  113. package/dist/tools/version-history.js.map +1 -1
  114. package/dist/tools/widgets.d.ts +182 -0
  115. package/dist/tools/widgets.d.ts.map +1 -1
  116. package/dist/tools/widgets.js +213 -590
  117. package/dist/tools/widgets.js.map +1 -1
  118. package/dist/tools/workflow-scripts.d.ts +40 -0
  119. package/dist/tools/workflow-scripts.d.ts.map +1 -0
  120. package/dist/tools/workflow-scripts.js +186 -0
  121. package/dist/tools/workflow-scripts.js.map +1 -0
  122. package/dist/tools/workflow.d.ts +70 -0
  123. package/dist/tools/workflow.d.ts.map +1 -0
  124. package/dist/tools/workflow.js +259 -0
  125. package/dist/tools/workflow.js.map +1 -0
  126. package/dist/tools/workspace-admin.d.ts +40 -0
  127. package/dist/tools/workspace-admin.d.ts.map +1 -0
  128. package/dist/tools/workspace-admin.js +125 -0
  129. package/dist/tools/workspace-admin.js.map +1 -0
  130. package/dist/tools/workspace-core.d.ts +45 -0
  131. package/dist/tools/workspace-core.d.ts.map +1 -0
  132. package/dist/tools/workspace-core.js +153 -0
  133. package/dist/tools/workspace-core.js.map +1 -0
  134. package/dist/types.d.ts +3 -3
  135. package/dist/types.d.ts.map +1 -1
  136. package/dist/url-parsing.d.ts +6 -0
  137. package/dist/url-parsing.d.ts.map +1 -0
  138. package/dist/url-parsing.js +25 -0
  139. package/dist/url-parsing.js.map +1 -0
  140. package/dist/utils/dateValidation.d.ts +5 -0
  141. package/dist/utils/dateValidation.d.ts.map +1 -0
  142. package/dist/utils/dateValidation.js +57 -0
  143. package/dist/utils/dateValidation.js.map +1 -0
  144. package/dist/utils.js +7 -7
  145. package/dist/utils.js.map +1 -1
  146. package/package.json +1 -1
  147. package/dist/tools/workspace.d.ts +0 -4
  148. package/dist/tools/workspace.d.ts.map +0 -1
  149. package/dist/tools/workspace.js.map +0 -1
@@ -1,4 +1,59 @@
1
1
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { z } from "zod";
2
3
  import { CplaceApiClient } from '../api.js';
4
+ export declare const PAGE_TOOL_DEFINITIONS: {
5
+ readonly cplace_delete_page: {
6
+ readonly description: "⚠️ DESTRUCTIVE OPERATION: Permanently delete a single page. Only works for leaf pages (pages without children). For pages with children, use cplace_delete_page_with_children.";
7
+ readonly inputSchema: {
8
+ readonly pageUID: z.ZodString;
9
+ };
10
+ readonly annotations: {
11
+ readonly title: "Delete Page";
12
+ };
13
+ };
14
+ readonly cplace_delete_page_with_children: {
15
+ readonly description: "⚠️ DESTRUCTIVE OPERATION: Permanently delete a page and optionally all its children. Uses a two-phase workflow: first call shows preview, second call with confirmation performs deletion.";
16
+ readonly inputSchema: {
17
+ readonly pageUID: z.ZodString;
18
+ readonly confirmDeleteChildren: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
19
+ };
20
+ readonly annotations: {
21
+ readonly title: "Delete Page with Children";
22
+ };
23
+ };
24
+ readonly cplace_copy_page: {
25
+ readonly description: "Copy a page with optional hierarchical copy. Set includeChildren=false for single page copy (leaf pages only), or includeChildren=true for copying page with all children. When includeChildren=true, uses a two-phase workflow: first call shows preview, second call with confirmCopyChildren=true performs the copy.";
26
+ readonly inputSchema: {
27
+ readonly sourcePageUID: z.ZodString;
28
+ readonly includeChildren: z.ZodBoolean;
29
+ readonly confirmCopyChildren: z.ZodOptional<z.ZodBoolean>;
30
+ readonly targetWorkspaceId: z.ZodOptional<z.ZodString>;
31
+ readonly targetParentUID: z.ZodOptional<z.ZodString>;
32
+ readonly newName: z.ZodOptional<z.ZodString>;
33
+ readonly includeComments: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
34
+ readonly includeFiles: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
35
+ };
36
+ readonly annotations: {
37
+ readonly title: "Copy Page";
38
+ };
39
+ };
40
+ readonly cplace_manage_page: {
41
+ readonly description: "Create or update a page. Use operation='create' to create new pages with workspace and type. Use operation='update' to modify existing pages by UID. 🔍 IMPORTANT: Use 'cplace_get_type_datamodel' before creating pages to understand attribute requirements.";
42
+ readonly inputSchema: {
43
+ readonly operation: z.ZodEnum<["create", "update"]>;
44
+ readonly workspaceId: z.ZodOptional<z.ZodString>;
45
+ readonly typeInternalName: z.ZodOptional<z.ZodString>;
46
+ readonly pageUID: z.ZodOptional<z.ZodString>;
47
+ readonly name: z.ZodOptional<z.ZodString>;
48
+ readonly parentUID: z.ZodOptional<z.ZodString>;
49
+ readonly content: z.ZodOptional<z.ZodString>;
50
+ readonly attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
51
+ readonly builtinAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
52
+ };
53
+ readonly annotations: {
54
+ readonly title: "Manage Page";
55
+ };
56
+ };
57
+ };
3
58
  export declare function registerPageTools(server: McpServer, client: CplaceApiClient): void;
4
59
  //# sourceMappingURL=pages.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../src/tools/pages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAI5C,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,QA0W3E"}
1
+ {"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../src/tools/pages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAY5C,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2ExB,CAAC;AAEX,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,QAsS3E"}
@@ -1,242 +1,174 @@
1
1
  import { z } from "zod";
2
2
  import { debugLogWithTag } from "../logger.js";
3
- import { truncateDocumentSummaries } from "../utils.js";
4
- export function registerPageTools(server, client) {
5
- server.registerTool("cplace_get_page_by_id", {
6
- description: "Get comprehensive page information including relationships and metadata",
3
+ import { DATE_TIME_FORMAT_DESCRIPTION } from "./common-schemas.js";
4
+ const TOOL_DELETE_PAGE = 'cplace_delete_page';
5
+ const TOOL_DELETE_PAGE_WITH_CHILDREN = 'cplace_delete_page_with_children';
6
+ const TOOL_COPY_PAGE = 'cplace_copy_page';
7
+ const TOOL_MANAGE_PAGE = 'cplace_manage_page';
8
+ export const PAGE_TOOL_DEFINITIONS = {
9
+ [TOOL_DELETE_PAGE]: {
10
+ description: "⚠️ DESTRUCTIVE OPERATION: Permanently delete a single page. Only works for leaf pages (pages without children). For pages with children, use cplace_delete_page_with_children.",
7
11
  inputSchema: {
8
- id: z.string().describe("The ID of the page to get, e.g. 'page/kkt8ol745jqur4581kelm5ply'")
12
+ pageUID: z.string().describe("The unique identifier (UID) of the page to delete (e.g., 'page/abc123def456')")
9
13
  },
10
- annotations: { title: "Get Page by ID" }
11
- }, async ({ id }) => {
12
- try {
13
- const result = await client.makeApiRequest('json/page', 'GET', { pageUID: id });
14
- if (result.documents && Array.isArray(result.documents)) {
15
- result.documents = truncateDocumentSummaries(result.documents);
16
- }
17
- return {
18
- content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
19
- };
20
- }
21
- catch (error) {
22
- return {
23
- content: [{ type: "text", text: `Error retrieving page: ${error instanceof Error ? error.message : String(error)}` }],
24
- isError: true
25
- };
26
- }
27
- });
28
- server.registerTool("cplace_create_page", {
29
- description: "Create a new page with specified attributes and content using the POST /page/create endpoint",
14
+ annotations: { title: "Delete Page" }
15
+ },
16
+ [TOOL_DELETE_PAGE_WITH_CHILDREN]: {
17
+ description: "⚠️ DESTRUCTIVE OPERATION: Permanently delete a page and optionally all its children. Uses a two-phase workflow: first call shows preview, second call with confirmation performs deletion.",
30
18
  inputSchema: {
31
- workspaceId: z.string().describe("The ID of the workspace to create the page in (e.g., 'abc123')"),
32
- typeInternalName: z.string().describe("The internal name of the page type (e.g., 'cf.example.myType')"),
33
- name: z.string().describe("The name of the new page"),
34
- parentUID: z.string().optional().describe("The UID of the parent page for hierarchy (optional)"),
35
- content: z.string().optional().describe("HTML content for the page (optional). Use HTML markup, not markdown - e.g. '<strong>bold</strong>' not '**bold**'"),
36
- attributes: z.record(z.any()).optional().describe(`Custom attribute values as key-value pairs. Supports:
37
- - String values: "text"
38
- - Numeric values: 42 or 3.14
39
- - Boolean values: true/false
40
- - Date values: "2024-01-15" or "2024-01-15T10:30:00"
41
- - Array values: ["value1", "value2"] for multi-valued attributes
42
- - Reference values: "page/ref123" for page references
43
- - RichString values: "<p><strong>HTML markup</strong></p>" (use HTML, not markdown or plain text)
44
- - Localized string values: {"en": "English text", "de": "German text", "fr": "French text"}
45
- - Multi-valued localized strings: [{"en": "Text 1", "de": "Text 1"}, {"en": "Text 2", "de": "Text 2"}]
46
-
47
- The system automatically detects attribute types from the page type definition and handles:
48
- - Type-aware processing based on actual attribute definitions
49
- - Proper multiplicity validation (single vs multi-valued)
50
- - Automatic type conversion and validation
51
- - Enhanced error messages with attribute-specific details`),
52
- builtinAttributes: z.record(z.any()).optional().describe(`Builtin/mixin-provided attributes (optional for schedules). Supports:
53
- - owner: Person UID as string (e.g., "person/123abc456") - Sets the page owner for schedules
54
- - Use null to remove builtin attribute values
55
-
56
- Example for schedules:
57
- {"owner": "person/123abc456"}
58
-
59
- Supported page types:
60
- - Schedule (cf.schedule): supports owner attribute`)
19
+ pageUID: z.string().describe("The unique identifier (UID) of the page to delete"),
20
+ confirmDeleteChildren: z.boolean().optional().default(false).describe("Explicit confirmation flag for bulk deletion. Set to true to confirm deletion of page and all children.")
61
21
  },
62
- annotations: { title: "Create Page" }
63
- }, async ({ workspaceId, typeInternalName, name, parentUID, content, attributes, builtinAttributes }) => {
64
- debugLogWithTag('CREATE_PAGE', `Starting page creation: ${name} of type ${typeInternalName} in workspace ${workspaceId}`);
65
- try {
66
- const requestBody = {
67
- workspaceId,
68
- typeInternalName,
69
- name
70
- };
71
- if (parentUID) {
72
- requestBody.parentUID = parentUID;
73
- debugLogWithTag('CREATE_PAGE', `Including parentUID: ${parentUID}`);
74
- }
75
- if (content) {
76
- requestBody.content = content;
77
- debugLogWithTag('CREATE_PAGE', `Including content (${content.length} chars)`);
78
- }
79
- if (attributes && Object.keys(attributes).length > 0) {
80
- requestBody.attributes = attributes;
81
- debugLogWithTag('CREATE_PAGE', `Including attributes: ${JSON.stringify(Object.keys(attributes))}`);
82
- }
83
- if (builtinAttributes && Object.keys(builtinAttributes).length > 0) {
84
- requestBody.builtinAttributes = builtinAttributes;
85
- debugLogWithTag('CREATE_PAGE', `Including builtinAttributes: ${JSON.stringify(Object.keys(builtinAttributes))}`);
86
- }
87
- debugLogWithTag('CREATE_PAGE', `Request body: ${JSON.stringify(requestBody, null, 2)}`);
88
- const result = await client.makeApiRequest('json/page/create', 'POST', undefined, requestBody);
89
- debugLogWithTag('CREATE_PAGE', `Successfully created page: ${name}`);
90
- return {
91
- content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
92
- };
93
- }
94
- catch (error) {
95
- debugLogWithTag('CREATE_PAGE', `Error creating page: ${error instanceof Error ? error.message : String(error)}`);
96
- return {
97
- content: [{
98
- type: "text",
99
- text: `Error creating page: ${error instanceof Error ? error.message : String(error)}`
100
- }],
101
- isError: true
102
- };
103
- }
104
- });
105
- server.registerTool("cplace_update_page", {
106
- description: "Update an existing page's attributes, content, or structure using the PATCH /page/{pageId} endpoint",
22
+ annotations: { title: "Delete Page with Children" }
23
+ },
24
+ [TOOL_COPY_PAGE]: {
25
+ description: "Copy a page with optional hierarchical copy. Set includeChildren=false for single page copy (leaf pages only), or includeChildren=true for copying page with all children. When includeChildren=true, uses a two-phase workflow: first call shows preview, second call with confirmCopyChildren=true performs the copy.",
107
26
  inputSchema: {
108
- pageUID: z.string().describe("The unique identifier (UID) of the page to update"),
109
- name: z.string().optional().describe("New name for the page (optional)"),
110
- content: z.string().optional().describe("New HTML content (optional). Use HTML markup, not markdown - e.g. '<em>italic</em>' not '*italic*'. Use empty string to remove content."),
111
- parentUID: z.string().optional().describe("New parent page UID (optional - for moving pages). Use empty string to remove parent."),
112
- attributes: z.record(z.any()).optional().describe(`Custom attributes to update as key-value pairs. Supports:
27
+ sourcePageUID: z.string().describe("The UID of the page to copy (e.g., 'page/abc123def456')"),
28
+ includeChildren: z.boolean().describe("Whether to copy child pages. false (default) for single page copy (will fail if page has children), true for hierarchical copy with all descendants."),
29
+ confirmCopyChildren: z.boolean().optional().describe("Required confirmation when includeChildren=true. Set to false (or omit) for preview showing child count, set to true to perform the actual bulk copy operation. Ignored when includeChildren=false."),
30
+ targetWorkspaceId: z.string().optional().describe("Target workspace ID (e.g., 'workspace789'). Exactly one of targetWorkspaceId or targetParentUID must be provided."),
31
+ targetParentUID: z.string().optional().describe("UID of target parent page (e.g., 'page/parent123xyz'). Exactly one of targetWorkspaceId or targetParentUID must be provided."),
32
+ newName: z.string().optional().describe("New name for the copied page (optional). If not provided, uses original page name. When includeChildren=true, only the root page is renamed; children retain their original names."),
33
+ includeComments: z.boolean().optional().default(false).describe("Whether to copy comments from the page(s). Default: false for single page copy, false for hierarchical copy. Comments add context but increase copy time significantly for large hierarchies."),
34
+ includeFiles: z.boolean().optional().default(true).describe("Whether to copy files attached to the page(s). Default: true for single page copy, true for hierarchical copy. Files are typically needed for complete page copies but increase copy time and storage usage.")
35
+ },
36
+ annotations: { title: "Copy Page" }
37
+ },
38
+ [TOOL_MANAGE_PAGE]: {
39
+ description: "Create or update a page. Use operation='create' to create new pages with workspace and type. Use operation='update' to modify existing pages by UID. 🔍 IMPORTANT: Use 'cplace_get_type_datamodel' before creating pages to understand attribute requirements.",
40
+ inputSchema: {
41
+ operation: z.enum(["create", "update"]).describe("Operation to perform: 'create' for new pages, 'update' for existing pages"),
42
+ workspaceId: z.string().optional().describe("Required for create: The workspace ID where the page should be created (e.g., 'abc123')"),
43
+ typeInternalName: z.string().optional().describe("Required for create: The type internal name (e.g., 'cf.example.myType')"),
44
+ pageUID: z.string().optional().describe("Required for update: The UID of the page to update (e.g., 'page/abc123def456')"),
45
+ name: z.string().optional().describe("Page name. For create operations: optional if type has name generation pattern (auto-generates from pattern), otherwise required. For update operations: optional. Name generation pattern syntax: <attributeName> for attribute values, {###} for sequential counter, {0000} for zero-padded counter. Example: '<title>-{0000}' generates 'ProjectAlpha-0001'. Provide explicit name to override pattern. Use cplace_get_type_datamodel to check if type supports name generation."),
46
+ parentUID: z.string().optional().describe("Parent page UID for hierarchy. For create: sets initial parent. For update: moves page (use empty string to remove parent)."),
47
+ content: z.string().optional().describe("HTML content for the page. Use HTML markup, not markdown - e.g. '<strong>bold</strong>' not '**bold**'. For update: use empty string to remove content."),
48
+ attributes: z.record(z.any()).optional().describe(`Custom attribute values as key-value pairs. 🔍 IMPORTANT: Use 'cplace_get_type_datamodel' tool first to understand attribute requirements and constraints. Supports:
113
49
  - String values: "text"
114
50
  - Numeric values: 42 or 3.14
115
51
  - Boolean values: true/false
116
- - Date values: "2024-01-15" or "2024-01-15T10:30:00"
52
+ - Date values: ${DATE_TIME_FORMAT_DESCRIPTION}
117
53
  - Array values: ["value1", "value2"] for multi-valued attributes
118
54
  - Reference values: "page/ref123" for page references
119
55
  - RichString values: "<p><strong>HTML markup</strong></p>" (use HTML, not markdown or plain text)
120
56
  - Localized string values: {"en": "English text", "de": "German text", "fr": "French text"}
121
57
  - Multi-valued localized strings: [{"en": "Text 1", "de": "Text 1"}, {"en": "Text 2", "de": "Text 2"}]
122
- - Null values: null (removes the attribute value)
123
- - Empty arrays: [] (removes all values for multi-valued attributes)
124
- - New attributes: will be added to the page
58
+ - For update only: null (removes the attribute value), [] (removes all values for multi-valued attributes)
125
59
 
126
60
  The system automatically detects attribute types from the page type definition and handles:
127
61
  - Type-aware processing based on actual attribute definitions
128
62
  - Proper multiplicity validation (single vs multi-valued)
129
63
  - Automatic type conversion and validation
130
64
  - Enhanced error messages with attribute-specific details`),
131
- builtinAttributes: z.record(z.any()).optional().describe(`Builtin/mixin-provided attributes to update (optional for schedules). Supports:
132
- - owner: Person UID as string (e.g., "person/456def789") - Updates the page owner for schedules
133
- - Use null to remove builtin attribute values
65
+ builtinAttributes: z.record(z.any()).optional().describe(`Builtin/mixin-provided attributes (optional for schedules). Supports:
66
+ - owner: Person UID as string (e.g., "person/123abc456") - Sets/updates the page owner for schedules
67
+ - For update only: Use null to remove builtin attribute values
134
68
 
135
- Example for schedules:
136
- {"owner": "person/456def789"}
69
+ Supported page type:
70
+ - Schedule (cf.schedule): supports owner attribute
137
71
 
138
- Supported page types:
139
- - Schedule (cf.schedule): supports owner attribute`)
72
+ Example for schedule:
73
+ {"owner": "person/123abc456"}`)
140
74
  },
141
- annotations: { title: "Update Page" }
142
- }, async ({ pageUID, name, content, parentUID, attributes, builtinAttributes }) => {
143
- debugLogWithTag('UPDATE_PAGE', `Starting page update for: ${pageUID}`);
75
+ annotations: { title: "Manage Page" }
76
+ }
77
+ };
78
+ export function registerPageTools(server, client) {
79
+ server.registerTool(TOOL_MANAGE_PAGE, PAGE_TOOL_DEFINITIONS[TOOL_MANAGE_PAGE], async (params) => {
80
+ const { operation } = params;
81
+ debugLogWithTag('MANAGE_PAGE', `${operation} page operation`);
144
82
  try {
145
- const requestBody = {
146
- pageUID
147
- };
148
- if (name !== undefined) {
149
- requestBody.name = name;
150
- }
151
- if (content !== undefined) {
152
- requestBody.content = content;
153
- }
154
- if (parentUID !== undefined) {
155
- requestBody.parentUID = parentUID;
156
- }
157
- if (attributes && Object.keys(attributes).length > 0) {
158
- requestBody.attributes = attributes;
159
- }
160
- if (builtinAttributes && Object.keys(builtinAttributes).length > 0) {
161
- requestBody.builtinAttributes = builtinAttributes;
162
- }
163
- if (Object.keys(requestBody).length === 1) {
83
+ if (operation === "create") {
84
+ if (!params.workspaceId || !params.typeInternalName) {
85
+ return {
86
+ content: [{
87
+ type: "text",
88
+ text: "Error: workspaceId and typeInternalName are required when operation='create'."
89
+ }],
90
+ isError: true
91
+ };
92
+ }
93
+ const requestBody = {
94
+ workspaceId: params.workspaceId,
95
+ typeInternalName: params.typeInternalName
96
+ };
97
+ if (params.name !== undefined && params.name !== null && params.name !== "") {
98
+ requestBody.name = params.name;
99
+ }
100
+ if (params.parentUID) {
101
+ requestBody.parentUID = params.parentUID;
102
+ debugLogWithTag('MANAGE_PAGE', `Including parentUID: ${params.parentUID}`);
103
+ }
104
+ if (params.content) {
105
+ requestBody.content = params.content;
106
+ debugLogWithTag('MANAGE_PAGE', `Including content (${params.content.length} chars)`);
107
+ }
108
+ if (params.attributes && Object.keys(params.attributes).length > 0) {
109
+ requestBody.attributes = params.attributes;
110
+ debugLogWithTag('MANAGE_PAGE', `Including attributes: ${JSON.stringify(Object.keys(params.attributes))}`);
111
+ }
112
+ if (params.builtinAttributes && Object.keys(params.builtinAttributes).length > 0) {
113
+ requestBody.builtinAttributes = params.builtinAttributes;
114
+ debugLogWithTag('MANAGE_PAGE', `Including builtinAttributes: ${JSON.stringify(Object.keys(params.builtinAttributes))}`);
115
+ }
116
+ debugLogWithTag('MANAGE_PAGE', `Request body: ${JSON.stringify(requestBody, null, 2)}`);
117
+ const result = await client.makeApiRequest('json/page/create', 'POST', undefined, requestBody);
118
+ debugLogWithTag('MANAGE_PAGE', `Successfully created page: ${params.name}`);
164
119
  return {
165
- content: [{ type: "text", text: "No updates specified. At least one of name, content, parentId, or attributes must be provided." }]
120
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
166
121
  };
167
122
  }
168
- const result = await client.makeApiRequest('json/page', 'PATCH', undefined, requestBody);
169
- debugLogWithTag('UPDATE_PAGE', `Successfully updated page: ${pageUID}`);
170
- return {
171
- content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
172
- };
173
- }
174
- catch (error) {
175
- debugLogWithTag('UPDATE_PAGE', `Error updating page: ${error instanceof Error ? error.message : String(error)}`);
176
- return {
177
- content: [{ type: "text", text: `Error updating page: ${error instanceof Error ? error.message : String(error)}` }],
178
- isError: true
179
- };
180
- }
181
- });
182
- server.registerTool("cplace_update_page_attributes", {
183
- description: "Update page attributes (no content or structural changes) using the PATCH /page/{pageId} endpoint",
184
- inputSchema: {
185
- pageUID: z.string().describe("The unique identifier (UID) of the page to update"),
186
- attributes: z.record(z.any()).describe(`Attribute updates as key-value pairs. Supports all the same data types as the full update tool:
187
- - String values: "text"
188
- - Numeric values: 42 or 3.14
189
- - Boolean values: true/false
190
- - Date values: "2024-01-15" or "2024-01-15T10:30:00"
191
- - Array values: ["value1", "value2"] for multi-valued attributes
192
- - Reference values: "page/ref123" for page references
193
- - RichString values: "<p><strong>HTML markup</strong></p>" (use HTML, not markdown or plain text)
194
- - Localized string values: {"en": "English text", "de": "German text", "fr": "French text"}
195
- - Multi-valued localized strings: [{"en": "Text 1", "de": "Text 1"}, {"en": "Text 2", "de": "Text 2"}]
196
- - Null values: null (removes the attribute value)
197
- - Empty arrays: [] (removes all values for multi-valued attributes)
198
- - New attributes: will be added to the page
199
-
200
- The system automatically detects attribute types from the page type definition and handles:
201
- - Type-aware processing based on actual attribute definitions
202
- - Proper multiplicity validation (single vs multi-valued)
203
- - Automatic type conversion and validation
204
- - Enhanced error messages with attribute-specific details`)
205
- },
206
- annotations: { title: "Update Page Attributes" }
207
- }, async ({ pageUID, attributes }) => {
208
- debugLogWithTag('UPDATE_PAGE_ATTRS', `Starting attribute-only update for: ${pageUID}`);
209
- try {
210
- if (!attributes || Object.keys(attributes).length === 0) {
123
+ else {
124
+ if (!params.pageUID) {
125
+ return {
126
+ content: [{
127
+ type: "text",
128
+ text: "Error: pageUID is required when operation='update'. Specify the UID of the page to update."
129
+ }],
130
+ isError: true
131
+ };
132
+ }
133
+ const requestBody = {
134
+ pageUID: params.pageUID
135
+ };
136
+ if (params.name !== undefined)
137
+ requestBody.name = params.name;
138
+ if (params.content !== undefined)
139
+ requestBody.content = params.content;
140
+ if (params.parentUID !== undefined)
141
+ requestBody.parentUID = params.parentUID;
142
+ if (params.attributes && Object.keys(params.attributes).length > 0) {
143
+ requestBody.attributes = params.attributes;
144
+ }
145
+ if (params.builtinAttributes && Object.keys(params.builtinAttributes).length > 0) {
146
+ requestBody.builtinAttributes = params.builtinAttributes;
147
+ }
148
+ if (Object.keys(requestBody).length === 1) {
149
+ return {
150
+ content: [{ type: "text", text: "No updates specified. At least one of name, content, parentUID, attributes, or builtinAttributes must be provided." }]
151
+ };
152
+ }
153
+ const result = await client.makeApiRequest('json/page', 'PATCH', undefined, requestBody);
154
+ debugLogWithTag('MANAGE_PAGE', `Successfully updated page: ${params.pageUID}`);
211
155
  return {
212
- content: [{ type: "text", text: "No attributes specified for update. The attributes parameter must contain at least one attribute." }]
156
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
213
157
  };
214
158
  }
215
- const requestBody = {
216
- pageUID,
217
- attributes: attributes
218
- };
219
- const result = await client.makeApiRequest('json/page', 'PATCH', undefined, requestBody);
220
- debugLogWithTag('UPDATE_PAGE_ATTRS', `Successfully updated attributes for page: ${pageUID}`);
221
- return {
222
- content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
223
- };
224
159
  }
225
160
  catch (error) {
226
- debugLogWithTag('UPDATE_PAGE_ATTRS', `Error updating page attributes: ${error instanceof Error ? error.message : String(error)}`);
161
+ debugLogWithTag('MANAGE_PAGE', `Error ${operation} page: ${error instanceof Error ? error.message : String(error)}`);
227
162
  return {
228
- content: [{ type: "text", text: `Error updating page attributes: ${error instanceof Error ? error.message : String(error)}` }],
163
+ content: [{
164
+ type: "text",
165
+ text: `Error ${operation} page: ${error instanceof Error ? error.message : String(error)}`
166
+ }],
229
167
  isError: true
230
168
  };
231
169
  }
232
170
  });
233
- server.registerTool("cplace_delete_page", {
234
- description: "⚠️ DESTRUCTIVE OPERATION: Permanently delete a single page. Only works for leaf pages (pages without children). For pages with children, use cplace_delete_page_with_children.",
235
- inputSchema: {
236
- pageUID: z.string().describe("The unique identifier (UID) of the page to delete (e.g., 'page/abc123def456')")
237
- },
238
- annotations: { title: "Delete Page" }
239
- }, async ({ pageUID }) => {
171
+ server.registerTool(TOOL_DELETE_PAGE, PAGE_TOOL_DEFINITIONS[TOOL_DELETE_PAGE], async ({ pageUID }) => {
240
172
  debugLogWithTag('DELETE_PAGE', `Starting single page deletion for: ${pageUID}`);
241
173
  try {
242
174
  const result = await client.makeApiRequest(`page?pageUID=${pageUID}`, 'DELETE');
@@ -265,14 +197,7 @@ The system automatically detects attribute types from the page type definition a
265
197
  };
266
198
  }
267
199
  });
268
- server.registerTool("cplace_delete_page_with_children", {
269
- description: "⚠️ DESTRUCTIVE OPERATION: Permanently delete a page and optionally all its children. Uses a two-phase workflow: first call shows preview, second call with confirmation performs deletion.",
270
- inputSchema: {
271
- pageUID: z.string().describe("The unique identifier (UID) of the page to delete"),
272
- confirmDeleteChildren: z.boolean().optional().default(false).describe("Explicit confirmation flag for bulk deletion. Set to true to confirm deletion of page and all children.")
273
- },
274
- annotations: { title: "Delete Page with Children" }
275
- }, async ({ pageUID, confirmDeleteChildren = false }) => {
200
+ server.registerTool(TOOL_DELETE_PAGE_WITH_CHILDREN, PAGE_TOOL_DEFINITIONS[TOOL_DELETE_PAGE_WITH_CHILDREN], async ({ pageUID, confirmDeleteChildren = false }) => {
276
201
  debugLogWithTag('DELETE_PAGE_WITH_CHILDREN', `Starting page deletion with children for: ${pageUID}, confirm: ${confirmDeleteChildren}`);
277
202
  try {
278
203
  const requestBody = {
@@ -305,5 +230,88 @@ The system automatically detects attribute types from the page type definition a
305
230
  };
306
231
  }
307
232
  });
233
+ server.registerTool(TOOL_COPY_PAGE, PAGE_TOOL_DEFINITIONS[TOOL_COPY_PAGE], async (params) => {
234
+ const { includeChildren = false } = params;
235
+ debugLogWithTag('COPY_PAGE', `Copying page ${params.sourcePageUID}, includeChildren=${includeChildren}, confirmCopyChildren=${params.confirmCopyChildren}`);
236
+ try {
237
+ const hasWorkspace = !!params.targetWorkspaceId;
238
+ const hasParent = !!params.targetParentUID;
239
+ if (!hasWorkspace && !hasParent) {
240
+ debugLogWithTag('COPY_PAGE', 'Validation failed: No target specified');
241
+ return {
242
+ content: [{
243
+ type: "text",
244
+ text: "Error: Either targetWorkspaceId or targetParentUID must be provided. Specify exactly one target location for the copied page."
245
+ }],
246
+ isError: true
247
+ };
248
+ }
249
+ if (hasWorkspace && hasParent) {
250
+ debugLogWithTag('COPY_PAGE', 'Validation failed: Both targets specified');
251
+ return {
252
+ content: [{
253
+ type: "text",
254
+ text: "Error: Only one of targetWorkspaceId or targetParentUID can be provided, not both. Choose a single target location."
255
+ }],
256
+ isError: true
257
+ };
258
+ }
259
+ const endpoint = includeChildren
260
+ ? 'json/page/copy-with-children'
261
+ : 'json/page/copy';
262
+ const requestBody = {
263
+ sourcePageUID: params.sourcePageUID,
264
+ includeComments: params.includeComments ?? false,
265
+ includeFiles: params.includeFiles ?? true
266
+ };
267
+ if (params.targetWorkspaceId)
268
+ requestBody.targetWorkspaceId = params.targetWorkspaceId;
269
+ if (params.targetParentUID)
270
+ requestBody.targetParentUID = params.targetParentUID;
271
+ if (params.newName)
272
+ requestBody.newName = params.newName;
273
+ if (includeChildren) {
274
+ requestBody.confirmCopyChildren = params.confirmCopyChildren ?? false;
275
+ }
276
+ debugLogWithTag('COPY_PAGE', `Request body: ${JSON.stringify(requestBody, null, 2)}`);
277
+ const result = await client.makeApiRequest(endpoint, 'POST', undefined, requestBody);
278
+ if (includeChildren) {
279
+ if (params.confirmCopyChildren) {
280
+ debugLogWithTag('COPY_PAGE', `Successfully copied page with children: ${params.sourcePageUID}`);
281
+ }
282
+ else {
283
+ debugLogWithTag('COPY_PAGE', `Retrieved copy preview for: ${params.sourcePageUID}`);
284
+ }
285
+ }
286
+ else {
287
+ debugLogWithTag('COPY_PAGE', `Successfully copied page: ${params.sourcePageUID}`);
288
+ }
289
+ return {
290
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
291
+ };
292
+ }
293
+ catch (error) {
294
+ debugLogWithTag('COPY_PAGE', `Error copying page: ${error instanceof Error ? error.message : String(error)}`);
295
+ const errorMessage = error instanceof Error ? error.message : String(error);
296
+ const childMatch = errorMessage.match(/Found (\d+) child items/);
297
+ if (childMatch) {
298
+ const childCount = childMatch[1];
299
+ return {
300
+ content: [{
301
+ type: "text",
302
+ text: `This page has ${childCount} children. Retry with includeChildren: true and confirmCopyChildren: false to preview.`
303
+ }],
304
+ isError: true
305
+ };
306
+ }
307
+ return {
308
+ content: [{
309
+ type: "text",
310
+ text: `Error copying page: ${errorMessage}`
311
+ }],
312
+ isError: true
313
+ };
314
+ }
315
+ });
308
316
  }
309
317
  //# sourceMappingURL=pages.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pages.js","sourceRoot":"","sources":["../../src/tools/pages.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,UAAU,iBAAiB,CAAC,MAAiB,EAAE,MAAuB;IAE1E,MAAM,CAAC,YAAY,CAAC,uBAAuB,EACzC;QACE,WAAW,EAAE,yEAAyE;QACtF,WAAW,EAAE;YACX,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kEAAkE,CAAC;SAC5F;QACD,WAAW,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE;KACzC,EACD,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;QACf,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;YAGhF,IAAI,MAAM,CAAC,SAAS,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC;gBACxD,MAAM,CAAC,SAAS,GAAG,yBAAyB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YACjE,CAAC;YAED,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;aACnE,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf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