@cplace/mcp-server 1.9.1 → 1.10.6

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 (235) hide show
  1. package/README.md +12 -13
  2. package/dist/index.js +4 -0
  3. package/dist/index.js.map +1 -1
  4. package/dist/plugins/app-catalog.js +1 -1
  5. package/dist/plugins/app-catalog.js.map +1 -1
  6. package/dist/plugins/application-settings.d.ts.map +1 -1
  7. package/dist/plugins/application-settings.js +6 -3
  8. package/dist/plugins/application-settings.js.map +1 -1
  9. package/dist/plugins/core/widget-specifications/cf.cplace.platform.tableWidget/columns.md +6 -0
  10. package/dist/plugins/core.d.ts.map +1 -1
  11. package/dist/plugins/core.js +25 -13
  12. package/dist/plugins/core.js.map +1 -1
  13. package/dist/plugins/forms-wizard.js +2 -2
  14. package/dist/plugins/forms-wizard.js.map +1 -1
  15. package/dist/plugins/history.d.ts.map +1 -1
  16. package/dist/plugins/history.js +6 -3
  17. package/dist/plugins/history.js.map +1 -1
  18. package/dist/plugins/jobs.js +2 -2
  19. package/dist/plugins/jobs.js.map +1 -1
  20. package/dist/plugins/layouts.d.ts.map +1 -1
  21. package/dist/plugins/layouts.js +17 -8
  22. package/dist/plugins/layouts.js.map +1 -1
  23. package/dist/plugins/low-code.d.ts.map +1 -1
  24. package/dist/plugins/low-code.js +48 -17
  25. package/dist/plugins/low-code.js.map +1 -1
  26. package/dist/plugins/project-planning.d.ts.map +1 -1
  27. package/dist/plugins/project-planning.js +6 -3
  28. package/dist/plugins/project-planning.js.map +1 -1
  29. package/dist/plugins/resource-management.d.ts.map +1 -1
  30. package/dist/plugins/resource-management.js +6 -3
  31. package/dist/plugins/resource-management.js.map +1 -1
  32. package/dist/plugins/solution-management.d.ts.map +1 -1
  33. package/dist/plugins/solution-management.js +6 -3
  34. package/dist/plugins/solution-management.js.map +1 -1
  35. package/dist/plugins/types-write.d.ts.map +1 -1
  36. package/dist/plugins/types-write.js +6 -3
  37. package/dist/plugins/types-write.js.map +1 -1
  38. package/dist/plugins/widget-specifications.d.ts.map +1 -1
  39. package/dist/plugins/widget-specifications.js +2 -2
  40. package/dist/plugins/widget-specifications.js.map +1 -1
  41. package/dist/plugins/workspace-admin.d.ts.map +1 -1
  42. package/dist/plugins/workspace-admin.js +6 -3
  43. package/dist/plugins/workspace-admin.js.map +1 -1
  44. package/dist/str-replace-utils.js +1 -1
  45. package/dist/str-replace-utils.js.map +1 -1
  46. package/dist/tools/apps-catalog.d.ts +1 -1
  47. package/dist/tools/apps-catalog.d.ts.map +1 -1
  48. package/dist/tools/apps-catalog.js +16 -12
  49. package/dist/tools/apps-catalog.js.map +1 -1
  50. package/dist/tools/board-widget.d.ts +2 -2
  51. package/dist/tools/board-widget.d.ts.map +1 -1
  52. package/dist/tools/board-widget.js +354 -201
  53. package/dist/tools/board-widget.js.map +1 -1
  54. package/dist/tools/change-listeners.d.ts +2 -2
  55. package/dist/tools/change-listeners.d.ts.map +1 -1
  56. package/dist/tools/change-listeners.js +125 -57
  57. package/dist/tools/change-listeners.js.map +1 -1
  58. package/dist/tools/common-schemas.d.ts +1 -1
  59. package/dist/tools/common-schemas.d.ts.map +1 -1
  60. package/dist/tools/common-schemas.js +5 -3
  61. package/dist/tools/common-schemas.js.map +1 -1
  62. package/dist/tools/csv-export.d.ts +2 -2
  63. package/dist/tools/csv-export.d.ts.map +1 -1
  64. package/dist/tools/csv-export.js +29 -24
  65. package/dist/tools/csv-export.js.map +1 -1
  66. package/dist/tools/documents.d.ts +2 -2
  67. package/dist/tools/documents.d.ts.map +1 -1
  68. package/dist/tools/documents.js +34 -14
  69. package/dist/tools/documents.js.map +1 -1
  70. package/dist/tools/expert-settings.d.ts +3 -3
  71. package/dist/tools/expert-settings.d.ts.map +1 -1
  72. package/dist/tools/expert-settings.js +97 -38
  73. package/dist/tools/expert-settings.js.map +1 -1
  74. package/dist/tools/get-operations.d.ts +2 -2
  75. package/dist/tools/get-operations.d.ts.map +1 -1
  76. package/dist/tools/get-operations.js +29 -21
  77. package/dist/tools/get-operations.js.map +1 -1
  78. package/dist/tools/job-schedule-trigger.d.ts +2 -2
  79. package/dist/tools/job-schedule-trigger.d.ts.map +1 -1
  80. package/dist/tools/job-schedule-trigger.js +19 -10
  81. package/dist/tools/job-schedule-trigger.js.map +1 -1
  82. package/dist/tools/job-scripts.d.ts +2 -2
  83. package/dist/tools/job-scripts.d.ts.map +1 -1
  84. package/dist/tools/job-scripts.js +119 -55
  85. package/dist/tools/job-scripts.js.map +1 -1
  86. package/dist/tools/jobs.d.ts +2 -2
  87. package/dist/tools/jobs.d.ts.map +1 -1
  88. package/dist/tools/jobs.js +68 -38
  89. package/dist/tools/jobs.js.map +1 -1
  90. package/dist/tools/layout-richstring-shared.d.ts +24 -1
  91. package/dist/tools/layout-richstring-shared.d.ts.map +1 -1
  92. package/dist/tools/layout-richstring-shared.js +99 -1
  93. package/dist/tools/layout-richstring-shared.js.map +1 -1
  94. package/dist/tools/layout-richstring-widgets.d.ts +94 -2
  95. package/dist/tools/layout-richstring-widgets.d.ts.map +1 -1
  96. package/dist/tools/layout-richstring-widgets.js +247 -25
  97. package/dist/tools/layout-richstring-widgets.js.map +1 -1
  98. package/dist/tools/layout.d.ts +5 -4
  99. package/dist/tools/layout.d.ts.map +1 -1
  100. package/dist/tools/layout.js +235 -124
  101. package/dist/tools/layout.js.map +1 -1
  102. package/dist/tools/linting.d.ts +2 -2
  103. package/dist/tools/linting.d.ts.map +1 -1
  104. package/dist/tools/linting.js +5 -5
  105. package/dist/tools/linting.js.map +1 -1
  106. package/dist/tools/page-action-simulation.d.ts +18 -0
  107. package/dist/tools/page-action-simulation.d.ts.map +1 -0
  108. package/dist/tools/page-action-simulation.js +88 -0
  109. package/dist/tools/page-action-simulation.js.map +1 -0
  110. package/dist/tools/page-actions.d.ts +60 -0
  111. package/dist/tools/page-actions.d.ts.map +1 -0
  112. package/dist/tools/page-actions.js +284 -0
  113. package/dist/tools/page-actions.js.map +1 -0
  114. package/dist/tools/pages.d.ts +3 -3
  115. package/dist/tools/pages.d.ts.map +1 -1
  116. package/dist/tools/pages.js +237 -112
  117. package/dist/tools/pages.js.map +1 -1
  118. package/dist/tools/ppt-export-schemas.d.ts +1 -1
  119. package/dist/tools/ppt-export-schemas.d.ts.map +1 -1
  120. package/dist/tools/ppt-export-schemas.js +269 -122
  121. package/dist/tools/ppt-export-schemas.js.map +1 -1
  122. package/dist/tools/ppt-export.d.ts +2 -2
  123. package/dist/tools/ppt-export.d.ts.map +1 -1
  124. package/dist/tools/ppt-export.js +82 -43
  125. package/dist/tools/ppt-export.js.map +1 -1
  126. package/dist/tools/profile-management.d.ts +2 -2
  127. package/dist/tools/profile-management.d.ts.map +1 -1
  128. package/dist/tools/profile-management.js +109 -82
  129. package/dist/tools/profile-management.js.map +1 -1
  130. package/dist/tools/references.d.ts +2 -2
  131. package/dist/tools/references.d.ts.map +1 -1
  132. package/dist/tools/references.js +36 -24
  133. package/dist/tools/references.js.map +1 -1
  134. package/dist/tools/resource-planner-widget.d.ts +2 -2
  135. package/dist/tools/resource-planner-widget.d.ts.map +1 -1
  136. package/dist/tools/resource-planner-widget.js +334 -138
  137. package/dist/tools/resource-planner-widget.js.map +1 -1
  138. package/dist/tools/richstring-marker-resolver.d.ts +16 -0
  139. package/dist/tools/richstring-marker-resolver.d.ts.map +1 -0
  140. package/dist/tools/richstring-marker-resolver.js +47 -0
  141. package/dist/tools/richstring-marker-resolver.js.map +1 -0
  142. package/dist/tools/richstring-widgets.d.ts +6 -16
  143. package/dist/tools/richstring-widgets.d.ts.map +1 -1
  144. package/dist/tools/richstring-widgets.js +184 -129
  145. package/dist/tools/richstring-widgets.js.map +1 -1
  146. package/dist/tools/schedule.d.ts +2 -2
  147. package/dist/tools/schedule.d.ts.map +1 -1
  148. package/dist/tools/schedule.js +23 -14
  149. package/dist/tools/schedule.js.map +1 -1
  150. package/dist/tools/script-logs.d.ts +2 -2
  151. package/dist/tools/script-logs.d.ts.map +1 -1
  152. package/dist/tools/script-logs.js +71 -32
  153. package/dist/tools/script-logs.js.map +1 -1
  154. package/dist/tools/script.d.ts +2 -2
  155. package/dist/tools/script.d.ts.map +1 -1
  156. package/dist/tools/script.js +44 -26
  157. package/dist/tools/script.js.map +1 -1
  158. package/dist/tools/search.d.ts +2 -2
  159. package/dist/tools/search.d.ts.map +1 -1
  160. package/dist/tools/search.js +139 -102
  161. package/dist/tools/search.js.map +1 -1
  162. package/dist/tools/solution-packages.d.ts +2 -2
  163. package/dist/tools/solution-packages.d.ts.map +1 -1
  164. package/dist/tools/solution-packages.js +149 -61
  165. package/dist/tools/solution-packages.js.map +1 -1
  166. package/dist/tools/system.d.ts +2 -2
  167. package/dist/tools/system.d.ts.map +1 -1
  168. package/dist/tools/system.js +43 -21
  169. package/dist/tools/system.js.map +1 -1
  170. package/dist/tools/type-layouts.d.ts +2 -2
  171. package/dist/tools/type-layouts.d.ts.map +1 -1
  172. package/dist/tools/type-layouts.js +67 -31
  173. package/dist/tools/type-layouts.js.map +1 -1
  174. package/dist/tools/type-management.d.ts +86 -70
  175. package/dist/tools/type-management.d.ts.map +1 -1
  176. package/dist/tools/type-management.js +407 -138
  177. package/dist/tools/type-management.js.map +1 -1
  178. package/dist/tools/url-resolution.d.ts +2 -2
  179. package/dist/tools/url-resolution.d.ts.map +1 -1
  180. package/dist/tools/url-resolution.js +16 -12
  181. package/dist/tools/url-resolution.js.map +1 -1
  182. package/dist/tools/users.d.ts +2 -2
  183. package/dist/tools/users.d.ts.map +1 -1
  184. package/dist/tools/users.js +24 -14
  185. package/dist/tools/users.js.map +1 -1
  186. package/dist/tools/validators.d.ts +2 -2
  187. package/dist/tools/validators.d.ts.map +1 -1
  188. package/dist/tools/validators.js +68 -35
  189. package/dist/tools/validators.js.map +1 -1
  190. package/dist/tools/version-check.d.ts +2 -2
  191. package/dist/tools/version-check.d.ts.map +1 -1
  192. package/dist/tools/version-check.js +36 -30
  193. package/dist/tools/version-check.js.map +1 -1
  194. package/dist/tools/version-history.d.ts +2 -2
  195. package/dist/tools/version-history.d.ts.map +1 -1
  196. package/dist/tools/version-history.js +72 -41
  197. package/dist/tools/version-history.js.map +1 -1
  198. package/dist/tools/widget-simulation.d.ts +5 -6
  199. package/dist/tools/widget-simulation.d.ts.map +1 -1
  200. package/dist/tools/widget-simulation.js +60 -42
  201. package/dist/tools/widget-simulation.js.map +1 -1
  202. package/dist/tools/widget-tool-helpers.d.ts +17 -1
  203. package/dist/tools/widget-tool-helpers.d.ts.map +1 -1
  204. package/dist/tools/widget-tool-helpers.js +41 -6
  205. package/dist/tools/widget-tool-helpers.js.map +1 -1
  206. package/dist/tools/widgets.d.ts +2 -2
  207. package/dist/tools/widgets.d.ts.map +1 -1
  208. package/dist/tools/widgets.js +62 -43
  209. package/dist/tools/widgets.js.map +1 -1
  210. package/dist/tools/wizards.d.ts +2 -2
  211. package/dist/tools/wizards.d.ts.map +1 -1
  212. package/dist/tools/wizards.js +378 -182
  213. package/dist/tools/wizards.js.map +1 -1
  214. package/dist/tools/workflow-execution.d.ts +2 -2
  215. package/dist/tools/workflow-execution.d.ts.map +1 -1
  216. package/dist/tools/workflow-execution.js +27 -19
  217. package/dist/tools/workflow-execution.js.map +1 -1
  218. package/dist/tools/workflow-scripts.d.ts +2 -2
  219. package/dist/tools/workflow-scripts.d.ts.map +1 -1
  220. package/dist/tools/workflow-scripts.js +168 -81
  221. package/dist/tools/workflow-scripts.js.map +1 -1
  222. package/dist/tools/workflow.d.ts +2 -2
  223. package/dist/tools/workflow.d.ts.map +1 -1
  224. package/dist/tools/workflow.js +185 -74
  225. package/dist/tools/workflow.js.map +1 -1
  226. package/dist/tools/workspace-admin.d.ts +2 -2
  227. package/dist/tools/workspace-admin.d.ts.map +1 -1
  228. package/dist/tools/workspace-admin.js +82 -40
  229. package/dist/tools/workspace-admin.js.map +1 -1
  230. package/dist/tools/workspace-core.d.ts +2 -2
  231. package/dist/tools/workspace-core.d.ts.map +1 -1
  232. package/dist/tools/workspace-core.js +93 -53
  233. package/dist/tools/workspace-core.js.map +1 -1
  234. package/dist/utils/dateValidation.js.map +1 -1
  235. package/package.json +9 -4
@@ -1,6 +1,8 @@
1
- import { z } from "zod";
2
- import { debugLogWithTag } from "../logger.js";
3
- import { unwrapSingleElementArrays } from "./common-schemas.js";
1
+ import { z } from 'zod';
2
+ import { debugLogWithTag } from '../logger.js';
3
+ import { unwrapSingleElementArrays } from './common-schemas.js';
4
+ import { parseDecodedRichStringContent } from './layout-richstring-shared.js';
5
+ import { findUniqueMarkerOffset, assertOffsetNotInsideDecodedWidget, } from './richstring-marker-resolver.js';
4
6
  const TOOL_RICHSTRING_EXTRACT_WIDGETS = 'cplace_richstring_extract_widgets';
5
7
  const TOOL_RICHSTRING_INSERT_WIDGET = 'cplace_richstring_insert_widget';
6
8
  const TOOL_RICHSTRING_UPDATE_WIDGET = 'cplace_richstring_update_widget';
@@ -9,23 +11,57 @@ export const RICHSTRING_WIDGET_TOOL_DEFINITIONS = {
9
11
  [TOOL_RICHSTRING_EXTRACT_WIDGETS]: {
10
12
  description: "Extract all embedded widgets from a page's richstring attribute. Reads the page internally and returns structured information about each widget including ID, type, properties, and position. Use this to discover widget IDs before updating or deleting them.",
11
13
  inputSchema: {
12
- pageUID: z.string().describe("The UID of the page containing the richstring attribute (e.g., 'hy46f7txqo4kgdh0yuol1fxvx')"),
13
- attributeName: z.string().optional().describe("The internal name of the richstring attribute to read (e.g., 'my.app.description'). Required unless isWikiContent is true."),
14
- isWikiContent: z.boolean().optional().describe("Set to true to operate on the page's builtin wiki content instead of a custom attribute. When true, attributeName is not needed.")
14
+ pageUID: z
15
+ .string()
16
+ .describe("The UID of the page containing the richstring attribute (e.g., 'hy46f7txqo4kgdh0yuol1fxvx')"),
17
+ attributeName: z
18
+ .string()
19
+ .optional()
20
+ .describe("The internal name of the richstring attribute to read (e.g., 'my.app.description'). Required unless isWikiContent is true."),
21
+ isWikiContent: z
22
+ .boolean()
23
+ .optional()
24
+ .describe("Set to true to operate on the page's builtin wiki content instead of a custom attribute. When true, attributeName is not needed."),
15
25
  },
16
- annotations: { title: "Extract Embedded Widgets from RichString" }
26
+ annotations: { title: 'Extract Embedded Widgets from RichString' },
17
27
  },
18
28
  [TOOL_RICHSTRING_INSERT_WIDGET]: {
19
- description: "Insert a new embedded widget into a page's richstring attribute at a specified position or at the end. Reads the page, inserts the widget via the backend API, and writes the modified content back — all in one call. Returns the inserted widget ID and the full widget inventory. The page content never appears in the LLM context.\n\nIMPORTANT: For low-code widgets that execute cplaceJS scripts (e.g., lowCodeText, lowCodeButton, scriptingHighcharts, scriptingLineChart, dynamicCodeBlockWidget), always test your script first using cplace_execute_script to verify it works correctly before embedding the widget.\n\nCOMMON PLATFORM WIDGET TYPES for INSIDE_RICHSTRING embedding:\ncf.platform.singleAttribute, cf.cplace.platform.heading,\ncf.platform.embeddedSearchAsList, cf.cplace.lowCodeWidgets.lowCodeText,\ncf.cplace.lowCodeWidgets.lowCodeButton, cf.cplace.workflow.widget,\ncf.platform.connectedSingleAttribute, cf.platform.numberOfSearchResults,\ncf.platform.connectedNumberOfResults, cf.platform.showNameAttribute,\ncf.platform.attributeHistory\nNote: This is NOT an exhaustive list — plugin apps may provide additional widget types. Call cplace_list_widget_definitions with embeddingContext 'INSIDE_RICHSTRING' for the full dynamic list.",
29
+ description: 'Insert a new embedded widget into a page\'s richstring attribute at a specified position or at the end. Reads the page, inserts the widget via the backend API, and writes the modified content back — all in one call. Returns the inserted widget ID and the full widget inventory. The page content never appears in the LLM context.\n\nIMPORTANT: For low-code widgets that execute cplaceJS scripts (e.g., lowCodeText, lowCodeButton, scriptingHighcharts, scriptingLineChart, dynamicCodeBlockWidget), always test your script first using cplace_execute_script to verify it works correctly before embedding the widget.\n\nMarker-based positioning: pass `insertBefore: "<exact text>"` or `insertAfter: "<exact text>"` to anchor the insert at a textual marker instead of computing a numeric `position`. The marker must match the decoded form — exactly as returned by cplace_richstring_extract_widgets — and must occur exactly once in the content; otherwise the call fails with the same diagnostics shape as cplace_edit_page_content\'s `old_str`. At most one of `position`, `insertBefore`, `insertAfter` may be set per call.\n\nCOMMON PLATFORM WIDGET TYPES for INSIDE_RICHSTRING embedding:\ncf.platform.singleAttribute, cf.cplace.platform.heading,\ncf.platform.embeddedSearchAsList, cf.cplace.lowCodeWidgets.lowCodeText,\ncf.cplace.lowCodeWidgets.lowCodeButton, cf.cplace.workflow.widget,\ncf.platform.connectedSingleAttribute, cf.platform.numberOfSearchResults,\ncf.platform.connectedNumberOfResults, cf.platform.showNameAttribute,\ncf.platform.attributeHistory\nNote: This is NOT an exhaustive list — plugin apps may provide additional widget types. Call cplace_list_widget_definitions with embeddingContext \'INSIDE_RICHSTRING\' for the full dynamic list.',
20
30
  inputSchema: {
21
- pageUID: z.string().describe("The UID of the page containing the richstring attribute"),
22
- attributeName: z.string().optional().describe("The internal name of the richstring attribute to modify. Required unless isWikiContent is true."),
23
- isWikiContent: z.boolean().optional().describe("Set to true to operate on the page's builtin wiki content instead of a custom attribute. When true, attributeName is not needed."),
24
- widgetType: z.string().describe("Widget type to insert (e.g., 'cf.cplace.lowCodeWidgets.lowCodeText'). Use cplace_get_widget_definition to verify it supports INSIDE_RICHSTRING embedding."),
25
- position: z.number().optional().describe("Zero-based character position to insert at (default: end of content). Must be between 0 and content length."),
26
- expectedBefore: z.string().optional().describe("Optional: Expected content immediately before insertion position for validation."),
27
- expectedAfter: z.string().optional().describe("Optional: Expected content immediately after insertion position for validation."),
28
- properties: z.record(z.any()).optional().describe(`Optional: Widget configuration properties as key-value pairs.
31
+ pageUID: z.string().describe('The UID of the page containing the richstring attribute'),
32
+ attributeName: z
33
+ .string()
34
+ .optional()
35
+ .describe('The internal name of the richstring attribute to modify. Required unless isWikiContent is true.'),
36
+ isWikiContent: z
37
+ .boolean()
38
+ .optional()
39
+ .describe("Set to true to operate on the page's builtin wiki content instead of a custom attribute. When true, attributeName is not needed."),
40
+ widgetType: z
41
+ .string()
42
+ .describe("Widget type to insert (e.g., 'cf.cplace.lowCodeWidgets.lowCodeText'). Use cplace_get_widget_definition to verify it supports INSIDE_RICHSTRING embedding."),
43
+ position: z
44
+ .number()
45
+ .optional()
46
+ .describe('Zero-based character position to insert at (default: end of content). Must be between 0 and content length. Mutually exclusive with insertBefore and insertAfter — set at most one.'),
47
+ insertBefore: z
48
+ .string()
49
+ .optional()
50
+ .describe('Insert immediately before this exact text fragment. The fragment must match the decoded form returned by cplace_richstring_extract_widgets — including any <decoded-widget id="…" type="…">{...}</decoded-widget> tags — exactly once. Mutually exclusive with position and insertAfter.'),
51
+ insertAfter: z
52
+ .string()
53
+ .optional()
54
+ .describe('Insert immediately after this exact text fragment. Same matching rules as insertBefore (exact decoded-form match, must be unique). Mutually exclusive with position and insertBefore.'),
55
+ expectedBefore: z
56
+ .string()
57
+ .optional()
58
+ .describe('Optional: Expected content immediately before the resolved insertion position, for backend validation. Forwarded verbatim to the backend; does not influence positioning. Can be combined with position, insertBefore, or insertAfter.'),
59
+ expectedAfter: z
60
+ .string()
61
+ .optional()
62
+ .describe('Optional: Expected content immediately after the resolved insertion position, for backend validation. Forwarded verbatim to the backend; does not influence positioning. Can be combined with position, insertBefore, or insertAfter.'),
63
+ properties: z.record(z.any()).optional()
64
+ .describe(`Optional: Widget configuration properties as key-value pairs.
29
65
  IMPORTANT: Property names vary per widget — call cplace_get_widget_definition first (some use fully-qualified names like 'cf.cplace.platform.attributesGroup.localizedTitle').
30
66
 
31
67
  Most values are wrapped in single-element arrays:
@@ -43,18 +79,27 @@ EXCEPTIONS — these types must NOT be array-wrapped:
43
79
  - Reference: pass as plain string → {"cf.cplace.formsWizard.wizard": "page/6a50db2e..."}
44
80
  - Boolean: pass as plain value → {"cf.cplace.formsWizard.showFrame": false}
45
81
 
46
- When unsure whether a property accepts an array wrapper, call cplace_get_widget_definition to check the property type.`)
82
+ When unsure whether a property accepts an array wrapper, call cplace_get_widget_definition to check the property type.`),
47
83
  },
48
- annotations: { title: "Insert Embedded Widget into RichString" }
84
+ annotations: { title: 'Insert Embedded Widget into RichString' },
49
85
  },
50
86
  [TOOL_RICHSTRING_UPDATE_WIDGET]: {
51
87
  description: "Update an existing embedded widget's properties in a page's richstring attribute. Reads the page, updates the widget via the backend API, and writes back — all in one call. Properties are completely replaced (not merged). Returns the updated widget ID and the full widget inventory.",
52
88
  inputSchema: {
53
- pageUID: z.string().describe("The UID of the page containing the richstring attribute"),
54
- attributeName: z.string().optional().describe("The internal name of the richstring attribute to modify. Required unless isWikiContent is true."),
55
- isWikiContent: z.boolean().optional().describe("Set to true to operate on the page's builtin wiki content instead of a custom attribute. When true, attributeName is not needed."),
56
- widgetId: z.string().describe("The unique ID of the widget to update (obtain via cplace_richstring_extract_widgets)"),
57
- properties: z.record(z.any()).describe(`New widget properties to set (completely replaces existing properties).
89
+ pageUID: z.string().describe('The UID of the page containing the richstring attribute'),
90
+ attributeName: z
91
+ .string()
92
+ .optional()
93
+ .describe('The internal name of the richstring attribute to modify. Required unless isWikiContent is true.'),
94
+ isWikiContent: z
95
+ .boolean()
96
+ .optional()
97
+ .describe("Set to true to operate on the page's builtin wiki content instead of a custom attribute. When true, attributeName is not needed."),
98
+ widgetId: z
99
+ .string()
100
+ .describe('The unique ID of the widget to update (obtain via cplace_richstring_extract_widgets)'),
101
+ properties: z.record(z.any())
102
+ .describe(`New widget properties to set (completely replaces existing properties).
58
103
  IMPORTANT: Property names vary per widget — call cplace_get_widget_definition first (some use fully-qualified names like 'cf.cplace.platform.attributesGroup.localizedTitle').
59
104
 
60
105
  Most values are wrapped in single-element arrays:
@@ -72,20 +117,28 @@ EXCEPTIONS — these types must NOT be array-wrapped:
72
117
  - Reference: pass as plain string → {"cf.cplace.formsWizard.wizard": "page/6a50db2e..."}
73
118
  - Boolean: pass as plain value → {"cf.cplace.formsWizard.showFrame": false}
74
119
 
75
- When unsure whether a property accepts an array wrapper, call cplace_get_widget_definition to check the property type.`)
120
+ When unsure whether a property accepts an array wrapper, call cplace_get_widget_definition to check the property type.`),
76
121
  },
77
- annotations: { title: "Update Embedded Widget in RichString" }
122
+ annotations: { title: 'Update Embedded Widget in RichString' },
78
123
  },
79
124
  [TOOL_RICHSTRING_DELETE_WIDGET]: {
80
125
  description: "Remove an embedded widget from a page's richstring attribute. Reads the page, deletes the widget via the backend API, and writes back — all in one call. Returns the deleted widget ID and the remaining widget inventory.",
81
126
  inputSchema: {
82
- pageUID: z.string().describe("The UID of the page containing the richstring attribute"),
83
- attributeName: z.string().optional().describe("The internal name of the richstring attribute to modify. Required unless isWikiContent is true."),
84
- isWikiContent: z.boolean().optional().describe("Set to true to operate on the page's builtin wiki content instead of a custom attribute. When true, attributeName is not needed."),
85
- widgetId: z.string().describe("The unique ID of the widget to delete (obtain via cplace_richstring_extract_widgets)")
127
+ pageUID: z.string().describe('The UID of the page containing the richstring attribute'),
128
+ attributeName: z
129
+ .string()
130
+ .optional()
131
+ .describe('The internal name of the richstring attribute to modify. Required unless isWikiContent is true.'),
132
+ isWikiContent: z
133
+ .boolean()
134
+ .optional()
135
+ .describe("Set to true to operate on the page's builtin wiki content instead of a custom attribute. When true, attributeName is not needed."),
136
+ widgetId: z
137
+ .string()
138
+ .describe('The unique ID of the widget to delete (obtain via cplace_richstring_extract_widgets)'),
86
139
  },
87
- annotations: { title: "Delete Embedded Widget from RichString" }
88
- }
140
+ annotations: { title: 'Delete Embedded Widget from RichString' },
141
+ },
89
142
  };
90
143
  export async function richstringInsertWidget(client, content, options) {
91
144
  const requestBody = { widgetType: options.widgetType, content };
@@ -101,81 +154,46 @@ export async function richstringInsertWidget(client, content, options) {
101
154
  return {
102
155
  result: {
103
156
  insertedWidgetId: apiResult.insertedWidgetId,
104
- insertedAtPosition: apiResult.insertedAtPosition
157
+ insertedAtPosition: apiResult.insertedAtPosition,
105
158
  },
106
- modifiedContent: apiResult.modifiedContent
159
+ modifiedContent: apiResult.modifiedContent,
107
160
  };
108
161
  }
109
162
  export async function richstringUpdateWidget(client, content, widgetId, properties) {
110
163
  const apiResult = await client.makeApiRequest('json/richstring-embedded-widget/update', 'PATCH', undefined, { widgetId, content, properties });
111
164
  return {
112
165
  result: { updatedWidgetId: widgetId },
113
- modifiedContent: apiResult.modifiedContent
166
+ modifiedContent: apiResult.modifiedContent,
114
167
  };
115
168
  }
116
169
  export async function richstringDeleteWidget(client, content, widgetId) {
117
170
  const apiResult = await client.makeApiRequest('json/richstring-embedded-widget/delete', 'DELETE', undefined, { widgetId, content });
118
171
  return {
119
172
  result: { deletedWidgetId: widgetId },
120
- modifiedContent: apiResult.modifiedContent
173
+ modifiedContent: apiResult.modifiedContent,
121
174
  };
122
175
  }
123
- export async function richstringExtractWidgets(client, content) {
124
- return await client.makeApiRequest('json/richstring-embedded-widget/extract', 'GET', { content });
125
- }
126
- export function buildContentMap(rawContent, extractResult) {
127
- if (!rawContent) {
128
- return { totalLength: 0, segments: [] };
129
- }
130
- const totalLength = rawContent.length;
131
- const segments = [];
132
- const widgetRegex = /<embeddedwidget>[-_a-zA-Z0-9]+<\/embeddedwidget>/g;
133
- const widgets = extractResult?.embeddedWidgets || [];
134
- const matches = [];
135
- let match;
136
- while ((match = widgetRegex.exec(rawContent)) !== null) {
137
- matches.push({ start: match.index, end: match.index + match[0].length });
138
- }
139
- if (matches.length !== widgets.length) {
140
- return null;
141
- }
142
- let currentPos = 0;
143
- for (let i = 0; i < matches.length; i++) {
144
- const m = matches[i];
145
- if (currentPos < m.start) {
146
- segments.push({
147
- type: 'html',
148
- start: currentPos,
149
- end: m.start,
150
- content: rawContent.substring(currentPos, m.start)
151
- });
152
- }
153
- segments.push({
154
- type: 'widget',
155
- start: m.start,
156
- end: m.end,
157
- widgetId: widgets[i].widgetId
158
- });
159
- currentPos = m.end;
160
- }
161
- if (currentPos < totalLength) {
162
- segments.push({
163
- type: 'html',
164
- start: currentPos,
165
- end: totalLength,
166
- content: rawContent.substring(currentPos, totalLength)
167
- });
168
- }
169
- return { totalLength, segments };
170
- }
171
176
  function validateAttributeTarget(attributeName, isWikiContent) {
172
177
  if (!isWikiContent && !attributeName) {
173
178
  return "Either 'attributeName' must be provided or 'isWikiContent' must be true.";
174
179
  }
175
180
  return null;
176
181
  }
182
+ export function validatePositioningParams(position, insertBefore, insertAfter) {
183
+ const set = [];
184
+ if (position !== undefined)
185
+ set.push('position');
186
+ if (insertBefore !== undefined)
187
+ set.push('insertBefore');
188
+ if (insertAfter !== undefined)
189
+ set.push('insertAfter');
190
+ if (set.length > 1) {
191
+ return `At most one of position, insertBefore, insertAfter may be set per call. Got: ${set.join(', ')}.`;
192
+ }
193
+ return null;
194
+ }
177
195
  async function readAttributeFromPage(client, pageUID, attributeName, isWikiContent) {
178
- const page = await client.makeApiRequest('json/page', 'GET', { pageUID });
196
+ const page = (await client.makeApiRequest('json/page', 'GET', { pageUID }));
179
197
  if (isWikiContent) {
180
198
  const content = page.wikiMarkup;
181
199
  if (content === undefined || content === null) {
@@ -199,13 +217,13 @@ async function writeAttributeToPage(client, pageUID, attributeName, isWikiConten
199
217
  if (isWikiContent) {
200
218
  await client.makeApiRequest('json/page', 'PATCH', undefined, {
201
219
  pageUID,
202
- content
220
+ content,
203
221
  });
204
222
  }
205
223
  else {
206
224
  await client.makeApiRequest('json/page', 'PATCH', undefined, {
207
225
  pageUID,
208
- attributes: { [attributeName]: content }
226
+ attributes: { [attributeName]: content },
209
227
  });
210
228
  }
211
229
  }
@@ -213,76 +231,109 @@ async function withPageAttribute(client, pageUID, attributeName, isWikiContent,
213
231
  const content = await readAttributeFromPage(client, pageUID, attributeName, isWikiContent);
214
232
  const { result, modifiedContent } = await transformFn(content);
215
233
  await writeAttributeToPage(client, pageUID, attributeName, isWikiContent, modifiedContent);
216
- const inventory = await richstringExtractWidgets(client, modifiedContent);
234
+ const parsed = parseDecodedRichStringContent(modifiedContent);
235
+ const inventory = {
236
+ embeddedWidgets: parsed.embeddedWidgets,
237
+ totalCount: parsed.embeddedWidgets.length,
238
+ };
217
239
  return { result, inventory };
218
240
  }
219
241
  export function registerRichStringWidgetTools(server, client) {
220
242
  server.registerTool(TOOL_RICHSTRING_EXTRACT_WIDGETS, RICHSTRING_WIDGET_TOOL_DEFINITIONS[TOOL_RICHSTRING_EXTRACT_WIDGETS], async ({ pageUID, attributeName, isWikiContent }) => {
221
243
  const validationError = validateAttributeTarget(attributeName, isWikiContent);
222
244
  if (validationError) {
223
- return { content: [{ type: "text", text: validationError }], isError: true };
245
+ return { content: [{ type: 'text', text: validationError }], isError: true };
224
246
  }
225
247
  debugLogWithTag('RICHSTRING_WIDGETS', `Extracting widgets from page ${pageUID}, attribute ${attributeName ?? 'wiki content'}`);
226
248
  try {
227
249
  const content = await readAttributeFromPage(client, pageUID, attributeName, isWikiContent);
228
- const result = await richstringExtractWidgets(client, content);
229
- const contentMap = buildContentMap(content, result);
230
- const response = { ...result };
231
- if (contentMap) {
232
- response.contentMap = contentMap;
233
- }
234
- debugLogWithTag('RICHSTRING_WIDGETS', `Successfully extracted ${result.totalCount || 0} widgets`);
250
+ const parsed = parseDecodedRichStringContent(content);
251
+ const response = {
252
+ embeddedWidgets: parsed.embeddedWidgets,
253
+ totalCount: parsed.embeddedWidgets.length,
254
+ contentMap: parsed.contentMap,
255
+ };
256
+ debugLogWithTag('RICHSTRING_WIDGETS', `Successfully extracted ${response.totalCount} widgets`);
235
257
  return {
236
- content: [{ type: "text", text: JSON.stringify(response, null, 2) }]
258
+ content: [{ type: 'text', text: JSON.stringify(response, null, 2) }],
237
259
  };
238
260
  }
239
261
  catch (error) {
240
262
  debugLogWithTag('RICHSTRING_WIDGETS', `Error extracting widgets: ${error instanceof Error ? error.message : String(error)}`);
241
263
  return {
242
- content: [{
243
- type: "text",
244
- text: `Error extracting widgets: ${error instanceof Error ? error.message : String(error)}`
245
- }],
246
- isError: true
264
+ content: [
265
+ {
266
+ type: 'text',
267
+ text: `Error extracting widgets: ${error instanceof Error ? error.message : String(error)}`,
268
+ },
269
+ ],
270
+ isError: true,
247
271
  };
248
272
  }
249
273
  });
250
- server.registerTool(TOOL_RICHSTRING_INSERT_WIDGET, RICHSTRING_WIDGET_TOOL_DEFINITIONS[TOOL_RICHSTRING_INSERT_WIDGET], async ({ pageUID, attributeName, isWikiContent, widgetType, position, expectedBefore, expectedAfter, properties }) => {
274
+ server.registerTool(TOOL_RICHSTRING_INSERT_WIDGET, RICHSTRING_WIDGET_TOOL_DEFINITIONS[TOOL_RICHSTRING_INSERT_WIDGET], async ({ pageUID, attributeName, isWikiContent, widgetType, position, insertBefore, insertAfter, expectedBefore, expectedAfter, properties, }) => {
251
275
  const validationError = validateAttributeTarget(attributeName, isWikiContent);
252
276
  if (validationError) {
253
- return { content: [{ type: "text", text: validationError }], isError: true };
277
+ return { content: [{ type: 'text', text: validationError }], isError: true };
278
+ }
279
+ const positioningError = validatePositioningParams(position, insertBefore, insertAfter);
280
+ if (positioningError) {
281
+ return { content: [{ type: 'text', text: positioningError }], isError: true };
254
282
  }
255
283
  debugLogWithTag('RICHSTRING_WIDGETS', `Inserting widget ${widgetType} into page ${pageUID}, attribute ${attributeName ?? 'wiki content'}`);
256
284
  try {
257
285
  const normalizedProperties = unwrapSingleElementArrays(properties);
258
- const { result, inventory } = await withPageAttribute(client, pageUID, attributeName, isWikiContent, async (content) => richstringInsertWidget(client, content, {
259
- widgetType, position, expectedBefore, expectedAfter, properties: normalizedProperties
260
- }));
286
+ const { result, inventory } = await withPageAttribute(client, pageUID, attributeName, isWikiContent, async (content) => {
287
+ let resolvedPosition = position;
288
+ if (insertBefore !== undefined || insertAfter !== undefined) {
289
+ const marker = (insertBefore ?? insertAfter);
290
+ const kind = insertBefore !== undefined ? 'insertBefore' : 'insertAfter';
291
+ const lookup = findUniqueMarkerOffset(content, marker, kind);
292
+ if (!lookup.success)
293
+ throw new Error(lookup.error);
294
+ let offset = lookup.offset;
295
+ if (kind === 'insertAfter')
296
+ offset += marker.length;
297
+ const boundary = assertOffsetNotInsideDecodedWidget(content, offset);
298
+ if (!boundary.success)
299
+ throw new Error(boundary.error);
300
+ resolvedPosition = offset;
301
+ }
302
+ return richstringInsertWidget(client, content, {
303
+ widgetType,
304
+ position: resolvedPosition,
305
+ expectedBefore,
306
+ expectedAfter,
307
+ properties: normalizedProperties,
308
+ });
309
+ });
261
310
  const response = {
262
311
  ...result,
263
312
  embeddedWidgets: inventory.embeddedWidgets,
264
- totalWidgetCount: inventory.totalCount
313
+ totalWidgetCount: inventory.totalCount,
265
314
  };
266
315
  debugLogWithTag('RICHSTRING_WIDGETS', `Successfully inserted widget: ${result.insertedWidgetId}`);
267
316
  return {
268
- content: [{ type: "text", text: JSON.stringify(response, null, 2) }]
317
+ content: [{ type: 'text', text: JSON.stringify(response, null, 2) }],
269
318
  };
270
319
  }
271
320
  catch (error) {
272
321
  debugLogWithTag('RICHSTRING_WIDGETS', `Error inserting widget: ${error instanceof Error ? error.message : String(error)}`);
273
322
  return {
274
- content: [{
275
- type: "text",
276
- text: `Error inserting widget: ${error instanceof Error ? error.message : String(error)}\nHint: Call cplace_list_widget_definitions to see available widget types for INSIDE_RICHSTRING embedding.`
277
- }],
278
- isError: true
323
+ content: [
324
+ {
325
+ type: 'text',
326
+ text: `Error inserting widget: ${error instanceof Error ? error.message : String(error)}\nHint: Call cplace_list_widget_definitions to see available widget types for INSIDE_RICHSTRING embedding.`,
327
+ },
328
+ ],
329
+ isError: true,
279
330
  };
280
331
  }
281
332
  });
282
333
  server.registerTool(TOOL_RICHSTRING_UPDATE_WIDGET, RICHSTRING_WIDGET_TOOL_DEFINITIONS[TOOL_RICHSTRING_UPDATE_WIDGET], async ({ pageUID, attributeName, isWikiContent, widgetId, properties }) => {
283
334
  const validationError = validateAttributeTarget(attributeName, isWikiContent);
284
335
  if (validationError) {
285
- return { content: [{ type: "text", text: validationError }], isError: true };
336
+ return { content: [{ type: 'text', text: validationError }], isError: true };
286
337
  }
287
338
  debugLogWithTag('RICHSTRING_WIDGETS', `Updating widget ${widgetId} in page ${pageUID}, attribute ${attributeName ?? 'wiki content'}`);
288
339
  try {
@@ -291,28 +342,30 @@ export function registerRichStringWidgetTools(server, client) {
291
342
  const response = {
292
343
  ...result,
293
344
  embeddedWidgets: inventory.embeddedWidgets,
294
- totalWidgetCount: inventory.totalCount
345
+ totalWidgetCount: inventory.totalCount,
295
346
  };
296
347
  debugLogWithTag('RICHSTRING_WIDGETS', `Successfully updated widget: ${widgetId}`);
297
348
  return {
298
- content: [{ type: "text", text: JSON.stringify(response, null, 2) }]
349
+ content: [{ type: 'text', text: JSON.stringify(response, null, 2) }],
299
350
  };
300
351
  }
301
352
  catch (error) {
302
353
  debugLogWithTag('RICHSTRING_WIDGETS', `Error updating widget: ${error instanceof Error ? error.message : String(error)}`);
303
354
  return {
304
- content: [{
305
- type: "text",
306
- text: `Error updating widget: ${error instanceof Error ? error.message : String(error)}`
307
- }],
308
- isError: true
355
+ content: [
356
+ {
357
+ type: 'text',
358
+ text: `Error updating widget: ${error instanceof Error ? error.message : String(error)}`,
359
+ },
360
+ ],
361
+ isError: true,
309
362
  };
310
363
  }
311
364
  });
312
365
  server.registerTool(TOOL_RICHSTRING_DELETE_WIDGET, RICHSTRING_WIDGET_TOOL_DEFINITIONS[TOOL_RICHSTRING_DELETE_WIDGET], async ({ pageUID, attributeName, isWikiContent, widgetId }) => {
313
366
  const validationError = validateAttributeTarget(attributeName, isWikiContent);
314
367
  if (validationError) {
315
- return { content: [{ type: "text", text: validationError }], isError: true };
368
+ return { content: [{ type: 'text', text: validationError }], isError: true };
316
369
  }
317
370
  debugLogWithTag('RICHSTRING_WIDGETS', `Deleting widget ${widgetId} from page ${pageUID}, attribute ${attributeName ?? 'wiki content'}`);
318
371
  try {
@@ -320,21 +373,23 @@ export function registerRichStringWidgetTools(server, client) {
320
373
  const response = {
321
374
  ...result,
322
375
  embeddedWidgets: inventory.embeddedWidgets,
323
- totalWidgetCount: inventory.totalCount
376
+ totalWidgetCount: inventory.totalCount,
324
377
  };
325
378
  debugLogWithTag('RICHSTRING_WIDGETS', `Successfully deleted widget: ${widgetId}`);
326
379
  return {
327
- content: [{ type: "text", text: JSON.stringify(response, null, 2) }]
380
+ content: [{ type: 'text', text: JSON.stringify(response, null, 2) }],
328
381
  };
329
382
  }
330
383
  catch (error) {
331
384
  debugLogWithTag('RICHSTRING_WIDGETS', `Error deleting widget: ${error instanceof Error ? error.message : String(error)}`);
332
385
  return {
333
- content: [{
334
- type: "text",
335
- text: `Error deleting widget: ${error instanceof Error ? error.message : String(error)}`
336
- }],
337
- isError: true
386
+ content: [
387
+ {
388
+ type: 'text',
389
+ text: `Error deleting widget: ${error instanceof Error ? error.message : String(error)}`,
390
+ },
391
+ ],
392
+ isError: true,
338
393
  };
339
394
  }
340
395
  });
@@ -1 +1 @@
1
- {"version":3,"file":"richstring-widgets.js","sourceRoot":"","sources":["../../src/tools/richstring-widgets.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,qBAAqB,CAAC;AAqBhE,MAAM,+BAA+B,GAAG,mCAAmC,CAAC;AAC5E,MAAM,6BAA6B,GAAG,iCAAiC,CAAC;AACxE,MAAM,6BAA6B,GAAG,iCAAiC,CAAC;AACxE,MAAM,6BAA6B,GAAG,iCAAiC,CAAC;AAGxE,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,CAAC,+BAA+B,CAAC,EAAE;QACjC,WAAW,EAAE,iQAAiQ;QAC9Q,WAAW,EAAE;YACX,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6FAA6F,CAAC;YAC3H,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4HAA4H,CAAC;YAC3K,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kIAAkI,CAAC;SACnL;QACD,WAAW,EAAE,EAAE,KAAK,EAAE,0CAA0C,EAAE;KACnE;IACD,C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ACF,CAAC;AACJ,CAAC"}
@@ -1,5 +1,5 @@
1
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
- import { z } from "zod";
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { z } from 'zod';
3
3
  import { CplaceApiClient } from '../api.js';
4
4
  export declare const SCHEDULE_TOOL_DEFINITIONS: {
5
5
  readonly cplace_get_schedule_links: {
@@ -1 +1 @@
1
- {"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../../src/tools/schedule.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;AAO5C,eAAO,MAAM,yBAAyB;;;;;;;;;;;;CAe5B,CAAC;AAEX,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,QAmC/E"}
1
+ {"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../../src/tools/schedule.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;AAO5C,eAAO,MAAM,yBAAyB;;;;;;;;;;;;CAsB5B,CAAC;AAEX,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,QA+C/E"}
@@ -1,28 +1,32 @@
1
- import { z } from "zod";
2
- import { debugLogWithTag } from "../logger.js";
1
+ import { z } from 'zod';
2
+ import { debugLogWithTag } from '../logger.js';
3
3
  const TOOL_GET_SCHEDULE_LINKS = 'cplace_get_schedule_links';
4
4
  export const SCHEDULE_TOOL_DEFINITIONS = {
5
5
  [TOOL_GET_SCHEDULE_LINKS]: {
6
- description: "Get schedule dependencies and links between work packages. Can analyze cross-schedule dependencies (between different schedules), intra-schedule dependencies (within the same schedule), or both, based on the scope parameter.",
6
+ description: 'Get schedule dependencies and links between work packages. Can analyze cross-schedule dependencies (between different schedules), intra-schedule dependencies (within the same schedule), or both, based on the scope parameter.',
7
7
  inputSchema: {
8
- scheduleUID: z.string().describe("The unique identifier of the schedule to analyze for schedule links (e.g., 'page/schedule123')"),
9
- linkType: z.string().optional().describe(`Filter results by specific link type. Supports both English and German link type names:
8
+ scheduleUID: z
9
+ .string()
10
+ .describe("The unique identifier of the schedule to analyze for schedule links (e.g., 'page/schedule123')"),
11
+ linkType: z.string().optional()
12
+ .describe(`Filter results by specific link type. Supports both English and German link type names:
10
13
  - English: "START_TO_START", "START_TO_FINISH", "FINISH_TO_START", "FINISH_TO_FINISH"
11
14
  - German: "anfang-anfang", "anfang-ende", "ende-anfang", "ende-ende"`),
12
- scope: z.enum(["cross", "inter", "all"]).default("cross").describe(`Determines which dependencies to include:
15
+ scope: z.enum(['cross', 'inter', 'all']).default('cross')
16
+ .describe(`Determines which dependencies to include:
13
17
  - "cross" (default): Cross-schedule dependencies only (between different schedules)
14
18
  - "inter": Intra-schedule dependencies only (within the same schedule)
15
- - "all": Both cross-schedule and intra-schedule dependencies`)
19
+ - "all": Both cross-schedule and intra-schedule dependencies`),
16
20
  },
17
- annotations: { title: "Get Cross-Schedule Links" }
18
- }
21
+ annotations: { title: 'Get Cross-Schedule Links' },
22
+ },
19
23
  };
20
24
  export function registerScheduleTools(server, client) {
21
- server.registerTool(TOOL_GET_SCHEDULE_LINKS, SCHEDULE_TOOL_DEFINITIONS[TOOL_GET_SCHEDULE_LINKS], async ({ scheduleUID, linkType, scope = "cross" }) => {
25
+ server.registerTool(TOOL_GET_SCHEDULE_LINKS, SCHEDULE_TOOL_DEFINITIONS[TOOL_GET_SCHEDULE_LINKS], async ({ scheduleUID, linkType, scope = 'cross' }) => {
22
26
  try {
23
27
  debugLogWithTag('SCHEDULE_LINKS', `Getting schedule links for schedule: ${scheduleUID}, scope: ${scope}, linkType: ${linkType || 'all'}`);
24
28
  const params = {
25
- scheduleUID
29
+ scheduleUID,
26
30
  };
27
31
  if (linkType) {
28
32
  params.linkType = linkType;
@@ -31,14 +35,19 @@ export function registerScheduleTools(server, client) {
31
35
  const result = await client.makeApiRequest('json/schedule/links', 'GET', params);
32
36
  debugLogWithTag('SCHEDULE_LINKS', `Retrieved schedule links data for scope: ${scope}`);
33
37
  return {
34
- content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
38
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
35
39
  };
36
40
  }
37
41
  catch (error) {
38
42
  debugLogWithTag('SCHEDULE_LINKS', `Error getting schedule links: ${error instanceof Error ? error.message : String(error)}`);
39
43
  return {
40
- content: [{ type: "text", text: `Error getting schedule links: ${error instanceof Error ? error.message : String(error)}` }],
41
- isError: true
44
+ content: [
45
+ {
46
+ type: 'text',
47
+ text: `Error getting schedule links: ${error instanceof Error ? error.message : String(error)}`,
48
+ },
49
+ ],
50
+ isError: true,
42
51
  };
43
52
  }
44
53
  });