@cplace/mcp-server 1.9.1 → 1.10.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -13
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/plugins/app-catalog.js +1 -1
- package/dist/plugins/app-catalog.js.map +1 -1
- package/dist/plugins/application-settings.d.ts.map +1 -1
- package/dist/plugins/application-settings.js +6 -3
- package/dist/plugins/application-settings.js.map +1 -1
- package/dist/plugins/core/widget-specifications/cf.cplace.platform.tableWidget/columns.md +6 -0
- package/dist/plugins/core.d.ts.map +1 -1
- package/dist/plugins/core.js +25 -13
- package/dist/plugins/core.js.map +1 -1
- package/dist/plugins/forms-wizard.js +2 -2
- package/dist/plugins/forms-wizard.js.map +1 -1
- package/dist/plugins/history.d.ts.map +1 -1
- package/dist/plugins/history.js +6 -3
- package/dist/plugins/history.js.map +1 -1
- package/dist/plugins/jobs.js +2 -2
- package/dist/plugins/jobs.js.map +1 -1
- package/dist/plugins/layouts.d.ts.map +1 -1
- package/dist/plugins/layouts.js +17 -8
- package/dist/plugins/layouts.js.map +1 -1
- package/dist/plugins/low-code.d.ts.map +1 -1
- package/dist/plugins/low-code.js +48 -17
- package/dist/plugins/low-code.js.map +1 -1
- package/dist/plugins/project-planning.d.ts.map +1 -1
- package/dist/plugins/project-planning.js +6 -3
- package/dist/plugins/project-planning.js.map +1 -1
- package/dist/plugins/resource-management.d.ts.map +1 -1
- package/dist/plugins/resource-management.js +6 -3
- package/dist/plugins/resource-management.js.map +1 -1
- package/dist/plugins/solution-management.d.ts.map +1 -1
- package/dist/plugins/solution-management.js +6 -3
- package/dist/plugins/solution-management.js.map +1 -1
- package/dist/plugins/types-write.d.ts.map +1 -1
- package/dist/plugins/types-write.js +6 -3
- package/dist/plugins/types-write.js.map +1 -1
- package/dist/plugins/widget-specifications.d.ts.map +1 -1
- package/dist/plugins/widget-specifications.js +2 -2
- package/dist/plugins/widget-specifications.js.map +1 -1
- package/dist/plugins/workspace-admin.d.ts.map +1 -1
- package/dist/plugins/workspace-admin.js +6 -3
- package/dist/plugins/workspace-admin.js.map +1 -1
- package/dist/str-replace-utils.js +1 -1
- package/dist/str-replace-utils.js.map +1 -1
- package/dist/tools/apps-catalog.d.ts +1 -1
- package/dist/tools/apps-catalog.d.ts.map +1 -1
- package/dist/tools/apps-catalog.js +16 -12
- package/dist/tools/apps-catalog.js.map +1 -1
- package/dist/tools/board-widget.d.ts +2 -2
- package/dist/tools/board-widget.d.ts.map +1 -1
- package/dist/tools/board-widget.js +354 -201
- package/dist/tools/board-widget.js.map +1 -1
- package/dist/tools/change-listeners.d.ts +2 -2
- package/dist/tools/change-listeners.d.ts.map +1 -1
- package/dist/tools/change-listeners.js +125 -57
- package/dist/tools/change-listeners.js.map +1 -1
- package/dist/tools/common-schemas.d.ts +1 -1
- package/dist/tools/common-schemas.d.ts.map +1 -1
- package/dist/tools/common-schemas.js +5 -3
- package/dist/tools/common-schemas.js.map +1 -1
- package/dist/tools/csv-export.d.ts +2 -2
- package/dist/tools/csv-export.d.ts.map +1 -1
- package/dist/tools/csv-export.js +29 -24
- package/dist/tools/csv-export.js.map +1 -1
- package/dist/tools/documents.d.ts +2 -2
- package/dist/tools/documents.d.ts.map +1 -1
- package/dist/tools/documents.js +34 -14
- package/dist/tools/documents.js.map +1 -1
- package/dist/tools/expert-settings.d.ts +3 -3
- package/dist/tools/expert-settings.d.ts.map +1 -1
- package/dist/tools/expert-settings.js +97 -38
- package/dist/tools/expert-settings.js.map +1 -1
- package/dist/tools/get-operations.d.ts +2 -2
- package/dist/tools/get-operations.d.ts.map +1 -1
- package/dist/tools/get-operations.js +29 -21
- package/dist/tools/get-operations.js.map +1 -1
- package/dist/tools/job-schedule-trigger.d.ts +2 -2
- package/dist/tools/job-schedule-trigger.d.ts.map +1 -1
- package/dist/tools/job-schedule-trigger.js +19 -10
- package/dist/tools/job-schedule-trigger.js.map +1 -1
- package/dist/tools/job-scripts.d.ts +2 -2
- package/dist/tools/job-scripts.d.ts.map +1 -1
- package/dist/tools/job-scripts.js +119 -55
- package/dist/tools/job-scripts.js.map +1 -1
- package/dist/tools/jobs.d.ts +2 -2
- package/dist/tools/jobs.d.ts.map +1 -1
- package/dist/tools/jobs.js +68 -38
- package/dist/tools/jobs.js.map +1 -1
- package/dist/tools/layout-richstring-shared.d.ts +24 -1
- package/dist/tools/layout-richstring-shared.d.ts.map +1 -1
- package/dist/tools/layout-richstring-shared.js +99 -1
- package/dist/tools/layout-richstring-shared.js.map +1 -1
- package/dist/tools/layout-richstring-widgets.d.ts +94 -2
- package/dist/tools/layout-richstring-widgets.d.ts.map +1 -1
- package/dist/tools/layout-richstring-widgets.js +247 -25
- package/dist/tools/layout-richstring-widgets.js.map +1 -1
- package/dist/tools/layout.d.ts +5 -4
- package/dist/tools/layout.d.ts.map +1 -1
- package/dist/tools/layout.js +235 -124
- package/dist/tools/layout.js.map +1 -1
- package/dist/tools/linting.d.ts +2 -2
- package/dist/tools/linting.d.ts.map +1 -1
- package/dist/tools/linting.js +5 -5
- package/dist/tools/linting.js.map +1 -1
- package/dist/tools/page-action-simulation.d.ts +18 -0
- package/dist/tools/page-action-simulation.d.ts.map +1 -0
- package/dist/tools/page-action-simulation.js +88 -0
- package/dist/tools/page-action-simulation.js.map +1 -0
- package/dist/tools/page-actions.d.ts +60 -0
- package/dist/tools/page-actions.d.ts.map +1 -0
- package/dist/tools/page-actions.js +284 -0
- package/dist/tools/page-actions.js.map +1 -0
- package/dist/tools/pages.d.ts +3 -3
- package/dist/tools/pages.d.ts.map +1 -1
- package/dist/tools/pages.js +237 -112
- package/dist/tools/pages.js.map +1 -1
- package/dist/tools/ppt-export-schemas.d.ts +1 -1
- package/dist/tools/ppt-export-schemas.d.ts.map +1 -1
- package/dist/tools/ppt-export-schemas.js +269 -122
- package/dist/tools/ppt-export-schemas.js.map +1 -1
- package/dist/tools/ppt-export.d.ts +2 -2
- package/dist/tools/ppt-export.d.ts.map +1 -1
- package/dist/tools/ppt-export.js +82 -43
- package/dist/tools/ppt-export.js.map +1 -1
- package/dist/tools/profile-management.d.ts +2 -2
- package/dist/tools/profile-management.d.ts.map +1 -1
- package/dist/tools/profile-management.js +109 -82
- package/dist/tools/profile-management.js.map +1 -1
- package/dist/tools/references.d.ts +2 -2
- package/dist/tools/references.d.ts.map +1 -1
- package/dist/tools/references.js +36 -24
- package/dist/tools/references.js.map +1 -1
- package/dist/tools/resource-planner-widget.d.ts +2 -2
- package/dist/tools/resource-planner-widget.d.ts.map +1 -1
- package/dist/tools/resource-planner-widget.js +334 -138
- package/dist/tools/resource-planner-widget.js.map +1 -1
- package/dist/tools/richstring-marker-resolver.d.ts +16 -0
- package/dist/tools/richstring-marker-resolver.d.ts.map +1 -0
- package/dist/tools/richstring-marker-resolver.js +47 -0
- package/dist/tools/richstring-marker-resolver.js.map +1 -0
- package/dist/tools/richstring-widgets.d.ts +6 -16
- package/dist/tools/richstring-widgets.d.ts.map +1 -1
- package/dist/tools/richstring-widgets.js +184 -129
- package/dist/tools/richstring-widgets.js.map +1 -1
- package/dist/tools/schedule.d.ts +2 -2
- package/dist/tools/schedule.d.ts.map +1 -1
- package/dist/tools/schedule.js +23 -14
- package/dist/tools/schedule.js.map +1 -1
- package/dist/tools/script-logs.d.ts +2 -2
- package/dist/tools/script-logs.d.ts.map +1 -1
- package/dist/tools/script-logs.js +71 -32
- package/dist/tools/script-logs.js.map +1 -1
- package/dist/tools/script.d.ts +2 -2
- package/dist/tools/script.d.ts.map +1 -1
- package/dist/tools/script.js +44 -26
- package/dist/tools/script.js.map +1 -1
- package/dist/tools/search.d.ts +2 -2
- package/dist/tools/search.d.ts.map +1 -1
- package/dist/tools/search.js +139 -102
- package/dist/tools/search.js.map +1 -1
- package/dist/tools/solution-packages.d.ts +2 -2
- package/dist/tools/solution-packages.d.ts.map +1 -1
- package/dist/tools/solution-packages.js +149 -61
- package/dist/tools/solution-packages.js.map +1 -1
- package/dist/tools/system.d.ts +2 -2
- package/dist/tools/system.d.ts.map +1 -1
- package/dist/tools/system.js +43 -21
- package/dist/tools/system.js.map +1 -1
- package/dist/tools/type-layouts.d.ts +2 -2
- package/dist/tools/type-layouts.d.ts.map +1 -1
- package/dist/tools/type-layouts.js +67 -31
- package/dist/tools/type-layouts.js.map +1 -1
- package/dist/tools/type-management.d.ts +86 -70
- package/dist/tools/type-management.d.ts.map +1 -1
- package/dist/tools/type-management.js +410 -138
- package/dist/tools/type-management.js.map +1 -1
- package/dist/tools/url-resolution.d.ts +2 -2
- package/dist/tools/url-resolution.d.ts.map +1 -1
- package/dist/tools/url-resolution.js +16 -12
- package/dist/tools/url-resolution.js.map +1 -1
- package/dist/tools/users.d.ts +2 -2
- package/dist/tools/users.d.ts.map +1 -1
- package/dist/tools/users.js +24 -14
- package/dist/tools/users.js.map +1 -1
- package/dist/tools/validators.d.ts +2 -2
- package/dist/tools/validators.d.ts.map +1 -1
- package/dist/tools/validators.js +68 -35
- package/dist/tools/validators.js.map +1 -1
- package/dist/tools/version-check.d.ts +2 -2
- package/dist/tools/version-check.d.ts.map +1 -1
- package/dist/tools/version-check.js +36 -30
- package/dist/tools/version-check.js.map +1 -1
- package/dist/tools/version-history.d.ts +2 -2
- package/dist/tools/version-history.d.ts.map +1 -1
- package/dist/tools/version-history.js +72 -41
- package/dist/tools/version-history.js.map +1 -1
- package/dist/tools/widget-simulation.d.ts +5 -6
- package/dist/tools/widget-simulation.d.ts.map +1 -1
- package/dist/tools/widget-simulation.js +60 -42
- package/dist/tools/widget-simulation.js.map +1 -1
- package/dist/tools/widget-tool-helpers.d.ts +17 -1
- package/dist/tools/widget-tool-helpers.d.ts.map +1 -1
- package/dist/tools/widget-tool-helpers.js +41 -6
- package/dist/tools/widget-tool-helpers.js.map +1 -1
- package/dist/tools/widgets.d.ts +2 -2
- package/dist/tools/widgets.d.ts.map +1 -1
- package/dist/tools/widgets.js +62 -43
- package/dist/tools/widgets.js.map +1 -1
- package/dist/tools/wizards.d.ts +2 -2
- package/dist/tools/wizards.d.ts.map +1 -1
- package/dist/tools/wizards.js +378 -182
- package/dist/tools/wizards.js.map +1 -1
- package/dist/tools/workflow-execution.d.ts +2 -2
- package/dist/tools/workflow-execution.d.ts.map +1 -1
- package/dist/tools/workflow-execution.js +27 -19
- package/dist/tools/workflow-execution.js.map +1 -1
- package/dist/tools/workflow-scripts.d.ts +2 -2
- package/dist/tools/workflow-scripts.d.ts.map +1 -1
- package/dist/tools/workflow-scripts.js +168 -81
- package/dist/tools/workflow-scripts.js.map +1 -1
- package/dist/tools/workflow.d.ts +2 -2
- package/dist/tools/workflow.d.ts.map +1 -1
- package/dist/tools/workflow.js +185 -74
- package/dist/tools/workflow.js.map +1 -1
- package/dist/tools/workspace-admin.d.ts +2 -2
- package/dist/tools/workspace-admin.d.ts.map +1 -1
- package/dist/tools/workspace-admin.js +82 -40
- package/dist/tools/workspace-admin.js.map +1 -1
- package/dist/tools/workspace-core.d.ts +2 -2
- package/dist/tools/workspace-core.d.ts.map +1 -1
- package/dist/tools/workspace-core.js +93 -53
- package/dist/tools/workspace-core.js.map +1 -1
- package/dist/utils/dateValidation.js.map +1 -1
- package/package.json +9 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
import { checkResponseSize } from '../utils.js';
|
|
3
3
|
const TOOL_LIST_SOLUTION_PACKAGES = 'cplace_list_solution_packages';
|
|
4
4
|
const TOOL_GET_SOLUTION_PACKAGE = 'cplace_get_solution_package';
|
|
@@ -7,68 +7,112 @@ const TOOL_GET_SOLUTION_PACKAGE_INSTALLATION = 'cplace_get_solution_package_inst
|
|
|
7
7
|
const TOOL_INSTALL_SOLUTION_PACKAGE = 'cplace_install_solution_package';
|
|
8
8
|
const TOOL_UPGRADE_SOLUTION_PACKAGE_INSTALLATION = 'cplace_upgrade_solution_package_installation';
|
|
9
9
|
const TOOL_PUBLISH_SOLUTION_PACKAGE_VERSION = 'cplace_publish_solution_package_version';
|
|
10
|
-
const slotMappingSchema = z
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
const slotMappingSchema = z
|
|
11
|
+
.object({
|
|
12
|
+
slotInternalName: z.string().describe('Internal name of the version slot'),
|
|
13
|
+
targetWorkspaceId: z
|
|
14
|
+
.string()
|
|
15
|
+
.optional()
|
|
16
|
+
.describe('ID of an existing workspace to map this slot to (mutually exclusive with createWorkspace)'),
|
|
17
|
+
createWorkspace: z
|
|
18
|
+
.boolean()
|
|
19
|
+
.optional()
|
|
20
|
+
.describe('Set to true to create a new workspace for this slot (mutually exclusive with targetWorkspaceId)'),
|
|
21
|
+
})
|
|
22
|
+
.describe('Each slot mapping must specify exactly one of targetWorkspaceId or createWorkspace: true');
|
|
15
23
|
export const SOLUTION_PACKAGE_TOOL_DEFINITIONS = {
|
|
16
24
|
[TOOL_LIST_SOLUTION_PACKAGES]: {
|
|
17
|
-
description:
|
|
25
|
+
description: 'List all solution packages with summary information including latest version, latest design, and counts of versions, designs, and installations. Requires designer or manager role.',
|
|
18
26
|
inputSchema: {},
|
|
19
|
-
annotations: { title:
|
|
27
|
+
annotations: { title: 'List Solution Packages' },
|
|
20
28
|
},
|
|
21
29
|
[TOOL_GET_SOLUTION_PACKAGE]: {
|
|
22
|
-
description:
|
|
30
|
+
description: 'Get full details for a solution package including all versions, designs, and installations.',
|
|
23
31
|
inputSchema: {
|
|
24
|
-
packageId: z
|
|
32
|
+
packageId: z
|
|
33
|
+
.string()
|
|
34
|
+
.describe("The entity ID of the solution package (e.g., 'htaihni2y56mtrvt1vas0my1f') — bare ID, no prefix"),
|
|
25
35
|
},
|
|
26
|
-
annotations: { title:
|
|
36
|
+
annotations: { title: 'Get Solution Package Details' },
|
|
27
37
|
},
|
|
28
38
|
[TOOL_GET_SOLUTION_PACKAGE_VERSION]: {
|
|
29
|
-
description:
|
|
39
|
+
description: 'Get details for a solution package version including slots, publish date, changelog, and parent package reference.',
|
|
30
40
|
inputSchema: {
|
|
31
|
-
versionId: z
|
|
41
|
+
versionId: z
|
|
42
|
+
.string()
|
|
43
|
+
.describe("The entity ID of the solution package version (e.g., 'r7z9yh8hgo3dg3dbgo0zmj1zh') — bare ID, no prefix"),
|
|
32
44
|
},
|
|
33
|
-
annotations: { title:
|
|
45
|
+
annotations: { title: 'Get Solution Package Version' },
|
|
34
46
|
},
|
|
35
47
|
[TOOL_GET_SOLUTION_PACKAGE_INSTALLATION]: {
|
|
36
|
-
description:
|
|
48
|
+
description: 'Get details for a solution package installation including workspace slot assignments, available upgrades, and modification count.',
|
|
37
49
|
inputSchema: {
|
|
38
|
-
installationId: z
|
|
50
|
+
installationId: z
|
|
51
|
+
.string()
|
|
52
|
+
.describe("The entity ID of the solution package installation (e.g., 'bgn1qli37ykzp92u6tlbefk3s') — bare ID, no prefix"),
|
|
39
53
|
},
|
|
40
|
-
annotations: { title:
|
|
54
|
+
annotations: { title: 'Get Solution Package Installation' },
|
|
41
55
|
},
|
|
42
56
|
[TOOL_INSTALL_SOLUTION_PACKAGE]: {
|
|
43
|
-
description:
|
|
57
|
+
description: 'Install a solution package version into workspaces. Each version slot must be mapped to either an existing workspace or a new workspace to be created. Returns a jobId — use cplace_get_job to poll for completion.',
|
|
44
58
|
inputSchema: {
|
|
45
|
-
versionId: z
|
|
46
|
-
|
|
47
|
-
|
|
59
|
+
versionId: z
|
|
60
|
+
.string()
|
|
61
|
+
.describe("The entity ID of the version to install (e.g., 'r7z9yh8hgo3dg3dbgo0zmj1zh') — bare ID, no prefix"),
|
|
62
|
+
slotMappings: z
|
|
63
|
+
.array(slotMappingSchema)
|
|
64
|
+
.describe('One entry per slot in the version. Each must map to a target workspace or create a new one.'),
|
|
65
|
+
pageMatchingStrategy: z
|
|
66
|
+
.enum(['NONE', 'FAIL_ON_UNMATCHED_PAGES', 'CREATE_UNMATCHED_PAGES'])
|
|
67
|
+
.optional()
|
|
68
|
+
.describe('Strategy for handling unmatched pages. Default: CREATE_UNMATCHED_PAGES'),
|
|
48
69
|
},
|
|
49
|
-
annotations: { title:
|
|
70
|
+
annotations: { title: 'Install Solution Package' },
|
|
50
71
|
},
|
|
51
72
|
[TOOL_UPGRADE_SOLUTION_PACKAGE_INSTALLATION]: {
|
|
52
|
-
description:
|
|
73
|
+
description: 'Upgrade an existing solution package installation to a newer version. Only new slots (not present in the current installation) require mappings. Returns a jobId — use cplace_get_job to poll for completion.',
|
|
53
74
|
inputSchema: {
|
|
54
|
-
installationId: z
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
75
|
+
installationId: z
|
|
76
|
+
.string()
|
|
77
|
+
.describe("The entity ID of the existing installation (e.g., 'bgn1qli37ykzp92u6tlbefk3s') — bare ID, no prefix"),
|
|
78
|
+
newVersionId: z
|
|
79
|
+
.string()
|
|
80
|
+
.describe("The entity ID of the target version to upgrade to (e.g., 'r7z9yh8hgo3dg3dbgo0zmj1zh') — bare ID, no prefix"),
|
|
81
|
+
pageMatchingStrategy: z
|
|
82
|
+
.enum(['NONE', 'FAIL_ON_UNMATCHED_PAGES', 'CREATE_UNMATCHED_PAGES'])
|
|
83
|
+
.optional()
|
|
84
|
+
.describe('Strategy for handling unmatched pages. Default: FAIL_ON_UNMATCHED_PAGES'),
|
|
85
|
+
forceMode: z
|
|
86
|
+
.boolean()
|
|
87
|
+
.optional()
|
|
88
|
+
.describe('Force import even with conflicts. Default: false'),
|
|
89
|
+
newSlotMappings: z
|
|
90
|
+
.array(slotMappingSchema)
|
|
91
|
+
.optional()
|
|
92
|
+
.describe('Mappings for slots that are new in the target version. Only needed if the new version introduces additional slots.'),
|
|
59
93
|
},
|
|
60
|
-
annotations: { title:
|
|
94
|
+
annotations: { title: 'Upgrade Solution Package Installation' },
|
|
61
95
|
},
|
|
62
96
|
[TOOL_PUBLISH_SOLUTION_PACKAGE_VERSION]: {
|
|
63
|
-
description:
|
|
97
|
+
description: 'Publish a solution package design as a new version. Validates the design and starts a background publish job. Returns a jobId (and optional warnings) — use cplace_get_job to poll for completion. Requires designer role.',
|
|
64
98
|
inputSchema: {
|
|
65
|
-
designId: z
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
99
|
+
designId: z
|
|
100
|
+
.string()
|
|
101
|
+
.describe("The entity ID of the design to publish (e.g., 'xaxxyw0m7si1pnh84td63j2iy') — bare ID, no prefix"),
|
|
102
|
+
versionNumber: z
|
|
103
|
+
.string()
|
|
104
|
+
.describe("Version number in format [0-9]+(\\.[0-9]+)* with max 10 characters (e.g., '1.0', '2.3.1')"),
|
|
105
|
+
changelog: z
|
|
106
|
+
.string()
|
|
107
|
+
.optional()
|
|
108
|
+
.describe('Changelog text describing changes in this version'),
|
|
109
|
+
shortname: z
|
|
110
|
+
.string()
|
|
111
|
+
.optional()
|
|
112
|
+
.describe("Short name for the version, pattern: [a-zA-Z0-9._-]{0,20} (e.g., 'v1.0-beta')"),
|
|
69
113
|
},
|
|
70
|
-
annotations: { title:
|
|
71
|
-
}
|
|
114
|
+
annotations: { title: 'Publish Solution Package Version' },
|
|
115
|
+
},
|
|
72
116
|
};
|
|
73
117
|
export function registerSolutionPackageTools(server, client) {
|
|
74
118
|
server.registerTool(TOOL_LIST_SOLUTION_PACKAGES, SOLUTION_PACKAGE_TOOL_DEFINITIONS[TOOL_LIST_SOLUTION_PACKAGES], async () => {
|
|
@@ -77,18 +121,28 @@ export function registerSolutionPackageTools(server, client) {
|
|
|
77
121
|
const sizeCheck = checkResponseSize(result);
|
|
78
122
|
if (sizeCheck.tooLarge) {
|
|
79
123
|
return {
|
|
80
|
-
content: [
|
|
81
|
-
|
|
124
|
+
content: [
|
|
125
|
+
{
|
|
126
|
+
type: 'text',
|
|
127
|
+
text: `Response too large (${sizeCheck.actualSize} characters). Use cplace_get_solution_package to retrieve individual packages instead.`,
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
isError: true,
|
|
82
131
|
};
|
|
83
132
|
}
|
|
84
133
|
return {
|
|
85
|
-
content: [{ type:
|
|
134
|
+
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
86
135
|
};
|
|
87
136
|
}
|
|
88
137
|
catch (error) {
|
|
89
138
|
return {
|
|
90
|
-
content: [
|
|
91
|
-
|
|
139
|
+
content: [
|
|
140
|
+
{
|
|
141
|
+
type: 'text',
|
|
142
|
+
text: `Error listing solution packages: ${error instanceof Error ? error.message : String(error)}`,
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
isError: true,
|
|
92
146
|
};
|
|
93
147
|
}
|
|
94
148
|
});
|
|
@@ -96,41 +150,60 @@ export function registerSolutionPackageTools(server, client) {
|
|
|
96
150
|
try {
|
|
97
151
|
const result = await client.makeApiRequest('json/solution-package', 'GET', { packageId });
|
|
98
152
|
return {
|
|
99
|
-
content: [{ type:
|
|
153
|
+
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
100
154
|
};
|
|
101
155
|
}
|
|
102
156
|
catch (error) {
|
|
103
157
|
return {
|
|
104
|
-
content: [
|
|
105
|
-
|
|
158
|
+
content: [
|
|
159
|
+
{
|
|
160
|
+
type: 'text',
|
|
161
|
+
text: `Error retrieving solution package: ${error instanceof Error ? error.message : String(error)}`,
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
isError: true,
|
|
106
165
|
};
|
|
107
166
|
}
|
|
108
167
|
});
|
|
109
168
|
server.registerTool(TOOL_GET_SOLUTION_PACKAGE_VERSION, SOLUTION_PACKAGE_TOOL_DEFINITIONS[TOOL_GET_SOLUTION_PACKAGE_VERSION], async ({ versionId }) => {
|
|
110
169
|
try {
|
|
111
|
-
const result = await client.makeApiRequest('json/solution-package/version', 'GET', {
|
|
170
|
+
const result = await client.makeApiRequest('json/solution-package/version', 'GET', {
|
|
171
|
+
versionId,
|
|
172
|
+
});
|
|
112
173
|
return {
|
|
113
|
-
content: [{ type:
|
|
174
|
+
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
114
175
|
};
|
|
115
176
|
}
|
|
116
177
|
catch (error) {
|
|
117
178
|
return {
|
|
118
|
-
content: [
|
|
119
|
-
|
|
179
|
+
content: [
|
|
180
|
+
{
|
|
181
|
+
type: 'text',
|
|
182
|
+
text: `Error retrieving solution package version: ${error instanceof Error ? error.message : String(error)}`,
|
|
183
|
+
},
|
|
184
|
+
],
|
|
185
|
+
isError: true,
|
|
120
186
|
};
|
|
121
187
|
}
|
|
122
188
|
});
|
|
123
189
|
server.registerTool(TOOL_GET_SOLUTION_PACKAGE_INSTALLATION, SOLUTION_PACKAGE_TOOL_DEFINITIONS[TOOL_GET_SOLUTION_PACKAGE_INSTALLATION], async ({ installationId }) => {
|
|
124
190
|
try {
|
|
125
|
-
const result = await client.makeApiRequest('json/solution-package/installation', 'GET', {
|
|
191
|
+
const result = await client.makeApiRequest('json/solution-package/installation', 'GET', {
|
|
192
|
+
installationId,
|
|
193
|
+
});
|
|
126
194
|
return {
|
|
127
|
-
content: [{ type:
|
|
195
|
+
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
128
196
|
};
|
|
129
197
|
}
|
|
130
198
|
catch (error) {
|
|
131
199
|
return {
|
|
132
|
-
content: [
|
|
133
|
-
|
|
200
|
+
content: [
|
|
201
|
+
{
|
|
202
|
+
type: 'text',
|
|
203
|
+
text: `Error retrieving solution package installation: ${error instanceof Error ? error.message : String(error)}`,
|
|
204
|
+
},
|
|
205
|
+
],
|
|
206
|
+
isError: true,
|
|
134
207
|
};
|
|
135
208
|
}
|
|
136
209
|
});
|
|
@@ -142,13 +215,18 @@ export function registerSolutionPackageTools(server, client) {
|
|
|
142
215
|
}
|
|
143
216
|
const result = await client.makeApiRequest('json/solution-package/installation', 'POST', undefined, requestBody);
|
|
144
217
|
return {
|
|
145
|
-
content: [{ type:
|
|
218
|
+
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
146
219
|
};
|
|
147
220
|
}
|
|
148
221
|
catch (error) {
|
|
149
222
|
return {
|
|
150
|
-
content: [
|
|
151
|
-
|
|
223
|
+
content: [
|
|
224
|
+
{
|
|
225
|
+
type: 'text',
|
|
226
|
+
text: `Error installing solution package: ${error instanceof Error ? error.message : String(error)}`,
|
|
227
|
+
},
|
|
228
|
+
],
|
|
229
|
+
isError: true,
|
|
152
230
|
};
|
|
153
231
|
}
|
|
154
232
|
});
|
|
@@ -166,13 +244,18 @@ export function registerSolutionPackageTools(server, client) {
|
|
|
166
244
|
}
|
|
167
245
|
const result = await client.makeApiRequest('json/solution-package/installation/upgrade', 'POST', undefined, requestBody);
|
|
168
246
|
return {
|
|
169
|
-
content: [{ type:
|
|
247
|
+
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
170
248
|
};
|
|
171
249
|
}
|
|
172
250
|
catch (error) {
|
|
173
251
|
return {
|
|
174
|
-
content: [
|
|
175
|
-
|
|
252
|
+
content: [
|
|
253
|
+
{
|
|
254
|
+
type: 'text',
|
|
255
|
+
text: `Error upgrading solution package installation: ${error instanceof Error ? error.message : String(error)}`,
|
|
256
|
+
},
|
|
257
|
+
],
|
|
258
|
+
isError: true,
|
|
176
259
|
};
|
|
177
260
|
}
|
|
178
261
|
});
|
|
@@ -187,13 +270,18 @@ export function registerSolutionPackageTools(server, client) {
|
|
|
187
270
|
}
|
|
188
271
|
const result = await client.makeApiRequest('json/solution-package/version/publish', 'POST', undefined, requestBody);
|
|
189
272
|
return {
|
|
190
|
-
content: [{ type:
|
|
273
|
+
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
191
274
|
};
|
|
192
275
|
}
|
|
193
276
|
catch (error) {
|
|
194
277
|
return {
|
|
195
|
-
content: [
|
|
196
|
-
|
|
278
|
+
content: [
|
|
279
|
+
{
|
|
280
|
+
type: 'text',
|
|
281
|
+
text: `Error publishing solution package version: ${error instanceof Error ? error.message : String(error)}`,
|
|
282
|
+
},
|
|
283
|
+
],
|
|
284
|
+
isError: true,
|
|
197
285
|
};
|
|
198
286
|
}
|
|
199
287
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solution-packages.js","sourceRoot":"","sources":["../../src/tools/solution-packages.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGhD,MAAM,2BAA2B,GAAG,+BAA+B,CAAC;AACpE,MAAM,yBAAyB,GAAG,6BAA6B,CAAC;AAChE,MAAM,iCAAiC,GAAG,qCAAqC,CAAC;AAChF,MAAM,sCAAsC,GAAG,0CAA0C,CAAC;AAC1F,MAAM,6BAA6B,GAAG,iCAAiC,CAAC;AACxE,MAAM,0CAA0C,GAAG,8CAA8C,CAAC;AAClG,MAAM,qCAAqC,GAAG,yCAAyC,CAAC;AAGxF,MAAM,iBAAiB,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"solution-packages.js","sourceRoot":"","sources":["../../src/tools/solution-packages.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGhD,MAAM,2BAA2B,GAAG,+BAA+B,CAAC;AACpE,MAAM,yBAAyB,GAAG,6BAA6B,CAAC;AAChE,MAAM,iCAAiC,GAAG,qCAAqC,CAAC;AAChF,MAAM,sCAAsC,GAAG,0CAA0C,CAAC;AAC1F,MAAM,6BAA6B,GAAG,iCAAiC,CAAC;AACxE,MAAM,0CAA0C,GAAG,8CAA8C,CAAC;AAClG,MAAM,qCAAqC,GAAG,yCAAyC,CAAC;AAGxF,MAAM,iBAAiB,GAAG,CAAC;KACxB,MAAM,CAAC;IACN,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IAC1E,iBAAiB,EAAE,CAAC;SACjB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,2FAA2F,CAC5F;IACH,eAAe,EAAE,CAAC;SACf,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C,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;qBAC7G;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/dist/tools/system.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { McpServer } from
|
|
2
|
-
import { CplaceApiClient } from
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { CplaceApiClient } from '../api.js';
|
|
3
3
|
export declare function registerSystemTools(server: McpServer, config: any, client?: CplaceApiClient): void;
|
|
4
4
|
//# sourceMappingURL=system.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../src/tools/system.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAS5C,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../src/tools/system.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAS5C,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,eAAe,QAmJ3F"}
|
package/dist/tools/system.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
import { DEBUG_LOGGING } from
|
|
3
|
-
import { registerVersionCheckTool } from
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { DEBUG_LOGGING } from '../logger.js';
|
|
3
|
+
import { registerVersionCheckTool } from './version-check.js';
|
|
4
4
|
import { coerceNumber } from './common-schemas.js';
|
|
5
5
|
const TOOL_GET_SYSTEM_INFO = 'cplace_get_system_info';
|
|
6
6
|
const TOOL_GET_ICON_NAMES = 'cplace_get_icon_names';
|
|
7
7
|
export function registerSystemTools(server, config, client) {
|
|
8
8
|
if (config.registerSystemInfoTool) {
|
|
9
9
|
server.registerTool(TOOL_GET_SYSTEM_INFO, {
|
|
10
|
-
description:
|
|
10
|
+
description: 'Get system information about the MCP server - including current working directory, CPLACE_URL setting, and debug state',
|
|
11
11
|
inputSchema: {},
|
|
12
|
-
annotations: { title:
|
|
12
|
+
annotations: { title: 'Get System Information' },
|
|
13
13
|
}, async () => {
|
|
14
14
|
const systemInfo = {
|
|
15
15
|
currentWorkingDirectory: process.cwd(),
|
|
16
16
|
cplaceUrl: config.url || 'Not set',
|
|
17
17
|
debugLogging: DEBUG_LOGGING,
|
|
18
18
|
nodeVersion: process.version,
|
|
19
|
-
platform: process.platform
|
|
19
|
+
platform: process.platform,
|
|
20
20
|
};
|
|
21
21
|
return {
|
|
22
|
-
content: [{ type:
|
|
22
|
+
content: [{ type: 'text', text: JSON.stringify(systemInfo, null, 2) }],
|
|
23
23
|
};
|
|
24
24
|
});
|
|
25
25
|
}
|
|
@@ -27,17 +27,29 @@ export function registerSystemTools(server, config, client) {
|
|
|
27
27
|
server.registerTool(TOOL_GET_ICON_NAMES, {
|
|
28
28
|
description: "Get all available icon names in the cplace system. Returns icon names from FontAwesome (fa-*), cplace custom icons (cf-*), and HUI utility icons (hui-*). Use this to discover valid icon names when configuring type definitions, layouts, workspaces, and widgets.\n\n⚠️ IMPORTANT: Single search terms often return suboptimal results. ALWAYS perform multiple searches with related terms to find the best icon. For example, when searching for project icons, try: 'project', 'folder', 'briefcase', 'tasks', 'board', 'chart', etc. Compare results and select the most appropriate icon.",
|
|
29
29
|
inputSchema: {
|
|
30
|
-
prefix: z
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
prefix: z
|
|
31
|
+
.array(z.string())
|
|
32
|
+
.optional()
|
|
33
|
+
.describe("Filter by icon prefixes. Available: ['fa', 'cf', 'hui']. Example: ['fa', 'cf']"),
|
|
34
|
+
search: z
|
|
35
|
+
.string()
|
|
36
|
+
.optional()
|
|
37
|
+
.describe("Filter icons by search term (searches in icon names). Example: 'project', 'user', 'home'. TIP: Try multiple related search terms to find the best icon."),
|
|
38
|
+
limit: coerceNumber(z.number().min(1).optional()).describe('Maximum number of icons to return. If not specified, returns all matching icons.'),
|
|
39
|
+
includeAll: z
|
|
40
|
+
.boolean()
|
|
41
|
+
.optional()
|
|
42
|
+
.describe('Optional: If true, bypasses all filters and returns all available icons. Default: false'),
|
|
34
43
|
},
|
|
35
|
-
annotations: { title:
|
|
44
|
+
annotations: { title: 'Get Available Icon Names' },
|
|
36
45
|
}, async (params) => {
|
|
37
46
|
try {
|
|
38
47
|
const result = await client.makeApiRequest('json/icon-names', 'GET', {});
|
|
39
48
|
let iconNames = [];
|
|
40
|
-
if (result &&
|
|
49
|
+
if (result &&
|
|
50
|
+
typeof result === 'object' &&
|
|
51
|
+
'result' in result &&
|
|
52
|
+
Array.isArray(result.result)) {
|
|
41
53
|
iconNames = result.result;
|
|
42
54
|
}
|
|
43
55
|
else if (Array.isArray(result)) {
|
|
@@ -48,16 +60,21 @@ export function registerSystemTools(server, config, client) {
|
|
|
48
60
|
}
|
|
49
61
|
if (params.includeAll) {
|
|
50
62
|
return {
|
|
51
|
-
content: [
|
|
63
|
+
content: [
|
|
64
|
+
{
|
|
65
|
+
type: 'text',
|
|
66
|
+
text: JSON.stringify({ result: iconNames, totalCount: iconNames.length }, null, 2),
|
|
67
|
+
},
|
|
68
|
+
],
|
|
52
69
|
};
|
|
53
70
|
}
|
|
54
71
|
let filteredIcons = iconNames;
|
|
55
72
|
if (params.prefix && params.prefix.length > 0) {
|
|
56
|
-
filteredIcons = filteredIcons.filter(icon => params.prefix.some(prefix => icon.startsWith(`${prefix}-`)));
|
|
73
|
+
filteredIcons = filteredIcons.filter((icon) => params.prefix.some((prefix) => icon.startsWith(`${prefix}-`)));
|
|
57
74
|
}
|
|
58
75
|
if (params.search) {
|
|
59
76
|
const searchLower = params.search.toLowerCase();
|
|
60
|
-
filteredIcons = filteredIcons.filter(icon => icon.toLowerCase().includes(searchLower));
|
|
77
|
+
filteredIcons = filteredIcons.filter((icon) => icon.toLowerCase().includes(searchLower));
|
|
61
78
|
}
|
|
62
79
|
if (params.limit) {
|
|
63
80
|
filteredIcons = filteredIcons.slice(0, params.limit);
|
|
@@ -69,17 +86,22 @@ export function registerSystemTools(server, config, client) {
|
|
|
69
86
|
filters: {
|
|
70
87
|
prefix: params.prefix || null,
|
|
71
88
|
search: params.search || null,
|
|
72
|
-
limit: params.limit || null
|
|
73
|
-
}
|
|
89
|
+
limit: params.limit || null,
|
|
90
|
+
},
|
|
74
91
|
};
|
|
75
92
|
return {
|
|
76
|
-
content: [{ type:
|
|
93
|
+
content: [{ type: 'text', text: JSON.stringify(response, null, 2) }],
|
|
77
94
|
};
|
|
78
95
|
}
|
|
79
96
|
catch (error) {
|
|
80
97
|
return {
|
|
81
|
-
content: [
|
|
82
|
-
|
|
98
|
+
content: [
|
|
99
|
+
{
|
|
100
|
+
type: 'text',
|
|
101
|
+
text: `Error retrieving icon names: ${error instanceof Error ? error.message : String(error)}`,
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
isError: true,
|
|
83
105
|
};
|
|
84
106
|
}
|
|
85
107
|
});
|
package/dist/tools/system.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system.js","sourceRoot":"","sources":["../../src/tools/system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE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;oBAChC,OAAO,EAAE;wBACP,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,IAAI;wBAC7B,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,IAAI;wBAC7B,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,IAAI;qBAC5B;iBACF,CAAC;gBAEF,OAAO;oBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;iBACrE,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,gCAAgC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;yBAC/F;qBACF;oBACD,OAAO,EAAE,IAAI;iBACd,CAAC;YACJ,CAAC;QACH,CAAC,CACF,CAAC;QAGF,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { McpServer } from
|
|
2
|
-
import { z } from
|
|
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 TYPE_LAYOUT_TOOL_DEFINITIONS: {
|
|
5
5
|
readonly cplace_list_type_alternative_layouts: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type-layouts.d.ts","sourceRoot":"","sources":["../../src/tools/type-layouts.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;AAS5C,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"type-layouts.d.ts","sourceRoot":"","sources":["../../src/tools/type-layouts.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;AAS5C,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoD/B,CAAC;AAEX,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,QA2IjF"}
|