@cplace/test-mcp-server 0.1.9 → 0.1.11

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 (77) hide show
  1. package/README.md +126 -20
  2. package/dist/api.d.ts +3 -2
  3. package/dist/api.d.ts.map +1 -1
  4. package/dist/api.js +4 -1
  5. package/dist/api.js.map +1 -1
  6. package/dist/conditional-registration.d.ts +4 -0
  7. package/dist/conditional-registration.d.ts.map +1 -0
  8. package/dist/conditional-registration.js +40 -0
  9. package/dist/conditional-registration.js.map +1 -0
  10. package/dist/index.js +49 -1129
  11. package/dist/index.js.map +1 -1
  12. package/dist/profiles.d.ts +10 -0
  13. package/dist/profiles.d.ts.map +1 -0
  14. package/dist/profiles.js +138 -0
  15. package/dist/profiles.js.map +1 -0
  16. package/dist/searchSchema.d.ts +44 -44
  17. package/dist/tools/change-listeners.d.ts +4 -0
  18. package/dist/tools/change-listeners.d.ts.map +1 -0
  19. package/dist/tools/change-listeners.js +98 -0
  20. package/dist/tools/change-listeners.js.map +1 -0
  21. package/dist/tools/common-schemas.d.ts +228 -0
  22. package/dist/tools/common-schemas.d.ts.map +1 -0
  23. package/dist/tools/common-schemas.js +68 -0
  24. package/dist/tools/common-schemas.js.map +1 -0
  25. package/dist/tools/pages.d.ts +4 -0
  26. package/dist/tools/pages.d.ts.map +1 -0
  27. package/dist/tools/pages.js +275 -0
  28. package/dist/tools/pages.js.map +1 -0
  29. package/dist/tools/ppt-export-profiles.d.ts +4 -0
  30. package/dist/tools/ppt-export-profiles.d.ts.map +1 -0
  31. package/dist/tools/ppt-export-profiles.js +242 -0
  32. package/dist/tools/ppt-export-profiles.js.map +1 -0
  33. package/dist/tools/references.d.ts +4 -0
  34. package/dist/tools/references.d.ts.map +1 -0
  35. package/dist/tools/references.js +57 -0
  36. package/dist/tools/references.js.map +1 -0
  37. package/dist/tools/search.d.ts +4 -0
  38. package/dist/tools/search.d.ts.map +1 -0
  39. package/dist/tools/search.js +304 -0
  40. package/dist/tools/search.js.map +1 -0
  41. package/dist/tools/system.d.ts +3 -0
  42. package/dist/tools/system.d.ts.map +1 -0
  43. package/dist/tools/system.js +22 -0
  44. package/dist/tools/system.js.map +1 -0
  45. package/dist/tools/type-layouts.d.ts +4 -0
  46. package/dist/tools/type-layouts.d.ts.map +1 -0
  47. package/dist/tools/type-layouts.js +56 -0
  48. package/dist/tools/type-layouts.js.map +1 -0
  49. package/dist/tools/users.d.ts +4 -0
  50. package/dist/tools/users.d.ts.map +1 -0
  51. package/dist/tools/users.js +62 -0
  52. package/dist/tools/users.js.map +1 -0
  53. package/dist/tools/validators.d.ts +4 -0
  54. package/dist/tools/validators.d.ts.map +1 -0
  55. package/dist/tools/validators.js +87 -0
  56. package/dist/tools/validators.js.map +1 -0
  57. package/dist/tools/version-history.d.ts +4 -0
  58. package/dist/tools/version-history.d.ts.map +1 -0
  59. package/dist/tools/version-history.js +142 -0
  60. package/dist/tools/version-history.js.map +1 -0
  61. package/dist/tools/widgets.d.ts +4 -0
  62. package/dist/tools/widgets.d.ts.map +1 -0
  63. package/dist/tools/widgets.js +516 -0
  64. package/dist/tools/widgets.js.map +1 -0
  65. package/dist/tools/workspace.d.ts +4 -0
  66. package/dist/tools/workspace.d.ts.map +1 -0
  67. package/dist/tools/workspace.js +396 -0
  68. package/dist/tools/workspace.js.map +1 -0
  69. package/dist/types.d.ts +2 -22
  70. package/dist/types.d.ts.map +1 -1
  71. package/dist/types.js +2 -9
  72. package/dist/types.js.map +1 -1
  73. package/dist/utils.d.ts +15 -2
  74. package/dist/utils.d.ts.map +1 -1
  75. package/dist/utils.js +90 -12
  76. package/dist/utils.js.map +1 -1
  77. package/package.json +2 -2
@@ -0,0 +1,304 @@
1
+ import { z } from "zod";
2
+ import SearchFilterSchema from "../searchSchema.js";
3
+ import { convertSearchFilterToCplaceFormat } from "../searchConversion.js";
4
+ import { filterSearchResult, checkResponseSize } from "../utils.js";
5
+ import { debugLogWithTag } from "../logger.js";
6
+ import { convertPagesToCsv } from "../csvUtils.js";
7
+ export function registerSearchTools(server, client) {
8
+ server.registerTool("cplace_search_pages", {
9
+ description: "Search pages of a type in cplace.",
10
+ inputSchema: {
11
+ workspaceId: z.string().optional().describe("The ID of the workspace to search in. If not provided, searches across all accessible workspaces."),
12
+ internalTypeName: z.string().describe(`The internal name of the type to filter by. Examples:
13
+ - "cf.cplace.solution.safe.feature" for Feature pages
14
+ - "cf.cplace.solution.safe.epic" for Epic pages
15
+ - "cf.cplace.solution.safe.story" for Story pages
16
+ - "cf.projectNavigator.project" for Project pages
17
+ - "cf.cplace.solution.safe.portfolio" for Portfolio pages
18
+ Use cplace_get_types_in_workspace to discover available types in a workspace.`),
19
+ search_filter: SearchFilterSchema.describe(`Search Filters using cplace filter format. Examples:
20
+
21
+ Basic string filter:
22
+ [{"attribute": "cf.cplace.workflow", "string": {"equals": "approved"}}]
23
+
24
+ Multiple conditions:
25
+ [
26
+ {"name": {"equals": "Project Alpha"}},
27
+ {"attribute": "cf.cplace.location", "reference": {"equals": "page/abc123"}}
28
+ ]
29
+
30
+ Date range filter:
31
+ [
32
+ {"attribute": "cf.cplace.projectStart", "date": {"on_or_after": "2023-01-01"}},
33
+ {"attribute": "cf.cplace.projectFinish", "date": {"on_or_before": "2024-12-31"}}
34
+ ]
35
+
36
+ Number comparison:
37
+ [{"attribute": "cf.cplace.estimatedCost", "number": {"greater_than": 1000}}]
38
+
39
+ Logical OR operator:
40
+ [{
41
+ "or": [
42
+ {"attribute": "cf.cplace.managementPriority", "string": {"equals": "Focus"}},
43
+ {"attribute": "cf.cplace.managementPriority", "string": {"equals": "Accelerate"}}
44
+ ]
45
+ }]
46
+
47
+ Complex AND/OR combination:
48
+ [{
49
+ "and": [
50
+ {"attribute": "cf.cplace.workflow", "string": {"equals": "inProgress"}},
51
+ {
52
+ "or": [
53
+ {"attribute": "cf.cplace.priority", "string": {"equals": "High"}},
54
+ {"attribute": "cf.cplace.priority", "string": {"equals": "Critical"}}
55
+ ]
56
+ }
57
+ ]
58
+ }]
59
+
60
+ Boolean filter:
61
+ [{"attribute": "cf.cplace.isActive", "boolean": {"equals": true}}]
62
+
63
+ Empty/not empty checks:
64
+ [{"attribute": "cf.cplace.description", "string": {"is_not_empty": true}}]`),
65
+ limit: z.number().min(1).max(1000).default(50).describe("Maximum number of results to return (1-1000)"),
66
+ offset: z.number().min(0).max(10000).default(0).describe("Number of results to skip for pagination, cannot be larger than 10000"),
67
+ responseFormat: z.enum(["minimal", "count"]).optional().describe(`Response format options:
68
+ - Default (not specified): Complete page data, respects 'attributes' parameter
69
+ - "minimal": Only core fields (id, name, url, type, workspace)
70
+ - "count": Only return the total count of matching pages`),
71
+ attributes: z.array(z.string()).optional().describe("Specific attribute names to include in response. If not provided, all attributes are included. Examples: ['cf.cplace.workflow', 'cf.cplace.priority']"),
72
+ },
73
+ annotations: { title: "Search Pages" }
74
+ }, async ({ workspaceId, internalTypeName, search_filter, limit = 50, offset = 0, responseFormat, attributes, }) => {
75
+ debugLogWithTag('SEARCH', `Starting search with params: workspaceId=${workspaceId || 'none'}, type=${internalTypeName}, filter=${JSON.stringify(search_filter)}, limit=${limit}, offset=${offset}`);
76
+ try {
77
+ const cplaceFilter = convertSearchFilterToCplaceFormat(search_filter);
78
+ debugLogWithTag('SEARCH', `Converted filter: ${JSON.stringify(cplaceFilter)}`);
79
+ if (workspaceId) {
80
+ cplaceFilter.filters.unshift({
81
+ type: "Workspace",
82
+ workspaceIds: [workspaceId]
83
+ });
84
+ }
85
+ if (internalTypeName) {
86
+ cplaceFilter.filters.unshift({
87
+ type: "Type",
88
+ types: [internalTypeName]
89
+ });
90
+ }
91
+ debugLogWithTag('SEARCH', `Final cplace filter: ${JSON.stringify(cplaceFilter)}`);
92
+ const result = await client.makeApiRequest('json/search', 'GET', {
93
+ filter: JSON.stringify(cplaceFilter),
94
+ limit,
95
+ offset
96
+ });
97
+ if (responseFormat === "count") {
98
+ const countResult = {
99
+ count: result.pagination?.total || 0
100
+ };
101
+ return {
102
+ content: [{ type: "text", text: JSON.stringify(countResult, null, 2) }]
103
+ };
104
+ }
105
+ const filteredResults = result.results ? result.results.map((item) => filterSearchResult(item, {
106
+ minimal: responseFormat === "minimal",
107
+ includeAttributes: responseFormat !== "minimal",
108
+ includeMetadata: false,
109
+ attributeFields: attributes,
110
+ truncateLargeValues: true
111
+ })) : [];
112
+ const filteredResult = {
113
+ results: filteredResults,
114
+ pagination: {
115
+ total: result.pagination?.total || 0,
116
+ limit: result.pagination?.limit || limit,
117
+ offset: result.pagination?.offset || offset,
118
+ hasMore: result.pagination?.hasMore || false
119
+ },
120
+ humanReadableRepresentation: result.summary,
121
+ cplaceJson: result.cplaceJson
122
+ };
123
+ const sizeCheck = checkResponseSize(filteredResult);
124
+ if (sizeCheck.tooLarge) {
125
+ return {
126
+ content: [{ type: "text", text: sizeCheck.suggestion }]
127
+ };
128
+ }
129
+ return {
130
+ content: [{ type: "text", text: JSON.stringify(filteredResult, null, 2) }]
131
+ };
132
+ }
133
+ catch (error) {
134
+ debugLogWithTag('SEARCH', `Error during search: ${error instanceof Error ? error.message : String(error)}`);
135
+ return {
136
+ content: [{ type: "text", text: `Error converting or executing search: ${error instanceof Error ? error.message : String(error)}` }]
137
+ };
138
+ }
139
+ });
140
+ server.registerTool("cplace_search_pages_fulltext", {
141
+ description: "Make a fulltext search across all pages in cplace. Use this when searching for text content within pages.",
142
+ inputSchema: {
143
+ workspaceId: z.string().optional().describe("The ID of the workspace to search in. If not provided, searches across all accessible workspaces."),
144
+ fulltext: z.string().describe("The fulltext search query to filter pages by. The results will include pages that contain this string in their name, attributes, or content."),
145
+ limit: z.number().min(1).max(1000).default(50).describe("Maximum number of results to return (1-1000)"),
146
+ offset: z.number().min(0).max(10000).default(0).describe("Number of results to skip for pagination, cannot be larger than 10000"),
147
+ },
148
+ annotations: { title: "Search Pages by Fulltext" }
149
+ }, async ({ workspaceId, fulltext, limit = 50, offset = 0, }) => {
150
+ if (!fulltext) {
151
+ return {
152
+ content: [{ type: "text", text: "fulltext is required" }]
153
+ };
154
+ }
155
+ try {
156
+ const result = await client.makeApiRequest('json/fulltext-search', 'GET', {
157
+ workspaceId: workspaceId,
158
+ fulltext: `"${fulltext}"`,
159
+ limit,
160
+ offset
161
+ });
162
+ const filteredResults = result.results ? result.results.map((item) => filterSearchResult(item, {
163
+ minimal: false,
164
+ includeAttributes: true,
165
+ includeMetadata: false,
166
+ truncateLargeValues: true
167
+ })) : [];
168
+ const filteredResult = {
169
+ results: filteredResults,
170
+ pagination: {
171
+ total: result.pagination?.total || 0,
172
+ limit: result.pagination?.limit || limit,
173
+ offset: result.pagination?.offset || offset,
174
+ hasMore: result.pagination?.hasMore || false
175
+ },
176
+ summary: result.summary,
177
+ cplaceJson: result.cplaceJson
178
+ };
179
+ const sizeCheck = checkResponseSize(filteredResult);
180
+ if (sizeCheck.tooLarge) {
181
+ return {
182
+ content: [{ type: "text", text: sizeCheck.suggestion }]
183
+ };
184
+ }
185
+ return {
186
+ content: [{ type: "text", text: JSON.stringify(filteredResult, null, 2) }]
187
+ };
188
+ }
189
+ catch (error) {
190
+ return {
191
+ content: [{ type: "text", text: `Error converting or executing search: ${error instanceof Error ? error.message : String(error)}` }]
192
+ };
193
+ }
194
+ });
195
+ server.registerTool("cplace_list_pages_of_type", {
196
+ description: "List all pages of a specific type in a workspace in cplace. Use this to retrieve multiple pages of the same type.",
197
+ inputSchema: {
198
+ workspaceId: z.string().describe("The ID of the workspace to get pages from"),
199
+ typeName: z.string().describe("The internal name of the type to retrieve pages for"),
200
+ limit: z.number().min(1).max(1000).default(50).describe("Maximum number of results to return (1-1000)"),
201
+ offset: z.number().min(0).max(10000).default(0).describe("Number of results to skip for pagination, cannot be larger than 10000"),
202
+ },
203
+ annotations: { title: "List Pages of Type" }
204
+ }, async ({ workspaceId, typeName, limit = 50, offset = 0, }) => {
205
+ try {
206
+ const cplaceFilter = {
207
+ filters: [
208
+ {
209
+ type: "Workspace",
210
+ workspaceIds: [workspaceId]
211
+ },
212
+ {
213
+ type: "Type",
214
+ types: [typeName]
215
+ }
216
+ ]
217
+ };
218
+ const result = await client.makeApiRequest('json/search', 'GET', {
219
+ filter: JSON.stringify(cplaceFilter),
220
+ limit,
221
+ offset
222
+ });
223
+ const filteredResults = result.results ? result.results.map((item) => filterSearchResult(item, {
224
+ minimal: false,
225
+ includeAttributes: true,
226
+ includeMetadata: false,
227
+ truncateLargeValues: true
228
+ })) : [];
229
+ const filteredResult = {
230
+ results: filteredResults,
231
+ pagination: {
232
+ total: result.pagination?.total || 0,
233
+ limit: result.pagination?.limit || limit,
234
+ offset: result.pagination?.offset || offset,
235
+ hasMore: result.pagination?.hasMore || false
236
+ },
237
+ summary: result.summary
238
+ };
239
+ const sizeCheck = checkResponseSize(filteredResult);
240
+ if (sizeCheck.tooLarge) {
241
+ return {
242
+ content: [{ type: "text", text: sizeCheck.suggestion }]
243
+ };
244
+ }
245
+ return {
246
+ content: [{ type: "text", text: JSON.stringify(filteredResult, null, 2) }]
247
+ };
248
+ }
249
+ catch (error) {
250
+ return {
251
+ content: [{ type: "text", text: `Error retrieving pages: ${error instanceof Error ? error.message : String(error)}` }]
252
+ };
253
+ }
254
+ });
255
+ server.registerTool("cplace_search_pages_csv", {
256
+ description: "Same as cplace_search_pages but returns results in CSV format instead of JSON. Only use this tool after first calling cplace_search_pages to establish and validate the search parameters. The CSV result should always be stored as an artifact.",
257
+ inputSchema: {
258
+ workspaceId: z.string().optional().describe("Same as cplace_search_pages"),
259
+ internalTypeName: z.string().describe("Same as cplace_search_pages"),
260
+ search_filter: SearchFilterSchema.describe("Same as cplace_search_pages"),
261
+ limit: z.number().min(1).max(1000).default(50).describe("Same as cplace_search_pages"),
262
+ offset: z.number().min(0).max(10000).default(0).describe("Same as cplace_search_pages"),
263
+ attributes: z.array(z.string()).optional().describe("Same as cplace_search_pages"),
264
+ },
265
+ annotations: { title: "Search Pages (CSV Export)" }
266
+ }, async ({ workspaceId, internalTypeName, search_filter, limit = 50, offset = 0, attributes, }) => {
267
+ debugLogWithTag('CSV_SEARCH', `Starting CSV search with params: workspaceId=${workspaceId || 'none'}, type=${internalTypeName}, filter=${JSON.stringify(search_filter)}, limit=${limit}, offset=${offset}`);
268
+ try {
269
+ const cplaceFilter = convertSearchFilterToCplaceFormat(search_filter);
270
+ debugLogWithTag('CSV_SEARCH', `Converted filter: ${JSON.stringify(cplaceFilter)}`);
271
+ if (workspaceId) {
272
+ cplaceFilter.filters.unshift({
273
+ type: "Workspace",
274
+ workspaceIds: [workspaceId]
275
+ });
276
+ }
277
+ if (internalTypeName) {
278
+ cplaceFilter.filters.unshift({
279
+ type: "Type",
280
+ types: [internalTypeName]
281
+ });
282
+ }
283
+ debugLogWithTag('CSV_SEARCH', `Final cplace filter: ${JSON.stringify(cplaceFilter)}`);
284
+ const result = await client.makeApiRequest('json/search', 'GET', {
285
+ filter: JSON.stringify(cplaceFilter),
286
+ limit,
287
+ offset
288
+ });
289
+ const searchResults = result.results || [];
290
+ debugLogWithTag('CSV_SEARCH', `Retrieved ${searchResults.length} results for CSV conversion`);
291
+ const csvContent = await convertPagesToCsv(searchResults, client, attributes);
292
+ return {
293
+ content: [{ type: "text", text: csvContent }]
294
+ };
295
+ }
296
+ catch (error) {
297
+ debugLogWithTag('CSV_SEARCH', `Error during CSV search: ${error instanceof Error ? error.message : String(error)}`);
298
+ return {
299
+ content: [{ type: "text", text: `Error converting or executing CSV search: ${error instanceof Error ? error.message : String(error)}` }]
300
+ };
301
+ }
302
+ });
303
+ }
304
+ //# sourceMappingURL=search.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/tools/search.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,kBAAkB,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,iCAAiC,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,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C,YAAY,CAAC;gBACpC,KAAK;gBACL,MAAM;aACP,CAAC,CAAC;YAGH,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC;YAE3C,eAAe,CAAC,YAAY,EAAE,aAAa,aAAa,CAAC,MAAM,6BAA6B,CAAC,CAAC;YAG9F,MAAM,UAAU,GAAG,MAAM,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;YAE9E,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;aAC9C,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,eAAe,CAAC,YAAY,EAAE,4BAA4B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACpH,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,6CAA6C,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC;aACzI,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare function registerSystemTools(server: McpServer, config: any): void;
3
+ //# sourceMappingURL=system.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../src/tools/system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,QAwBjE"}
@@ -0,0 +1,22 @@
1
+ import { DEBUG_LOGGING } from "../logger.js";
2
+ export function registerSystemTools(server, config) {
3
+ if (config.registerSystemInfoTool) {
4
+ server.registerTool("cplace_get_system_info", {
5
+ description: "Get system information about the MCP server - including current working directory, CPLACE_URL setting, and debug state",
6
+ inputSchema: {},
7
+ annotations: { title: "Get System Information" }
8
+ }, async () => {
9
+ const systemInfo = {
10
+ currentWorkingDirectory: process.cwd(),
11
+ cplaceUrl: config.url || 'Not set',
12
+ debugLogging: DEBUG_LOGGING,
13
+ nodeVersion: process.version,
14
+ platform: process.platform
15
+ };
16
+ return {
17
+ content: [{ type: "text", text: JSON.stringify(systemInfo, null, 2) }]
18
+ };
19
+ });
20
+ }
21
+ }
22
+ //# sourceMappingURL=system.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system.js","sourceRoot":"","sources":["../../src/tools/system.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,UAAU,mBAAmB,CAAC,MAAiB,EAAE,MAAW;IAEhE,IAAI,MAAM,CAAC,sBAAsB,EAAE,CAAC;QAClC,MAAM,CAAC,YAAY,CAAC,wBAAwB,EAC5C;YACE,WAAW,EAAE,wHAAwH;YACrI,WAAW,EAAE,EAAE;YACf,WAAW,EAAE,EAAE,KAAK,EAAE,wBAAwB,EAAE;SACjD,EACD,KAAK,IAAI,EAAE;YACT,MAAM,UAAU,GAAG;gBACjB,uBAAuB,EAAE,OAAO,CAAC,GAAG,EAAE;gBACtC,SAAS,EAAE,MAAM,CAAC,GAAG,IAAI,SAAS;gBAClC,YAAY,EAAE,aAAa;gBAC3B,WAAW,EAAE,OAAO,CAAC,OAAO;gBAC5B,QAAQ,EAAE,OAAO,CAAC,QAAQ;aAC3B,CAAC;YAEF,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;aACvE,CAAC;QACJ,CAAC,CACF,CAAC;IACF,CAAC;AACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { CplaceApiClient } from '../api.js';
3
+ export declare function registerTypeLayoutTools(server: McpServer, client: CplaceApiClient): void;
4
+ //# sourceMappingURL=type-layouts.d.ts.map
@@ -0,0 +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;AAEpE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAU5C,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,QAqEjF"}
@@ -0,0 +1,56 @@
1
+ import { z } from "zod";
2
+ import { debugLogWithTag } from "../logger.js";
3
+ export function registerTypeLayoutTools(server, client) {
4
+ server.registerTool("cplace_get_type_layout", {
5
+ description: "Retrieves the widget layout structure of a specific type definition, including all widget configurations and layout definitions. This endpoint returns the effective layout used by the type, which can be either the default layout or an alternative layout.",
6
+ inputSchema: {
7
+ workspaceId: z.string().describe("The ID of the workspace containing the type definition"),
8
+ typeInternalName: z.string().describe("The internal name of the type definition"),
9
+ alternativeLayoutName: z.string().optional().describe("The name of the alternative layout to retrieve. If not provided, returns the default layout")
10
+ },
11
+ annotations: { title: "Get Type Layout" }
12
+ }, async ({ workspaceId, typeInternalName, alternativeLayoutName }) => {
13
+ debugLogWithTag('TYPE_LAYOUT', `Getting type layout for ${typeInternalName} in workspace ${workspaceId}${alternativeLayoutName ? ` (layout: ${alternativeLayoutName})` : ' (default)'}`);
14
+ try {
15
+ const params = { workspaceId, typeInternalName };
16
+ if (alternativeLayoutName) {
17
+ params.alternativeLayoutName = alternativeLayoutName;
18
+ }
19
+ const result = await client.makeApiRequest('json/typeLayout', 'GET', params);
20
+ debugLogWithTag('TYPE_LAYOUT', `Successfully retrieved type layout for ${typeInternalName}`);
21
+ return {
22
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
23
+ };
24
+ }
25
+ catch (error) {
26
+ debugLogWithTag('TYPE_LAYOUT', `Error retrieving type layout: ${error instanceof Error ? error.message : String(error)}`);
27
+ return {
28
+ content: [{ type: "text", text: `Error retrieving type layout: ${error instanceof Error ? error.message : String(error)}` }]
29
+ };
30
+ }
31
+ });
32
+ server.registerTool("cplace_list_type_alternative_layouts", {
33
+ description: "Retrieves a comprehensive list of all available layouts for a specific type definition, including the default layout and all alternative layouts, along with usage statistics.",
34
+ inputSchema: {
35
+ workspaceId: z.string().describe("The ID of the workspace containing the type definition"),
36
+ typeInternalName: z.string().describe("The internal name of the type definition")
37
+ },
38
+ annotations: { title: "List Type Alternative Layouts" }
39
+ }, async ({ workspaceId, typeInternalName }) => {
40
+ debugLogWithTag('TYPE_LAYOUT', `Listing alternative layouts for type ${typeInternalName} in workspace ${workspaceId}`);
41
+ try {
42
+ const result = await client.makeApiRequest('json/typeLayout/list', 'GET', { workspaceId, typeInternalName });
43
+ debugLogWithTag('TYPE_LAYOUT', `Successfully listed layouts for type ${typeInternalName}`);
44
+ return {
45
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
46
+ };
47
+ }
48
+ catch (error) {
49
+ debugLogWithTag('TYPE_LAYOUT', `Error listing type layouts: ${error instanceof Error ? error.message : String(error)}`);
50
+ return {
51
+ content: [{ type: "text", text: `Error listing type layouts: ${error instanceof Error ? error.message : String(error)}` }]
52
+ };
53
+ }
54
+ });
55
+ }
56
+ //# sourceMappingURL=type-layouts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-layouts.js","sourceRoot":"","sources":["../../src/tools/type-layouts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAS/C,MAAM,UAAU,uBAAuB,CA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E,CAAC;YACf,eAAe,CAAC,aAAa,EAAE,+BAA+B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACxH,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,+BAA+B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC;aAC3H,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AAIJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { CplaceApiClient } from '../api.js';
3
+ export declare function registerUserTools(server: McpServer, client: CplaceApiClient): void;
4
+ //# sourceMappingURL=users.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/tools/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAG5C,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,QA0E3E"}
@@ -0,0 +1,62 @@
1
+ import { z } from "zod";
2
+ import { debugLogWithTag } from "../logger.js";
3
+ export function registerUserTools(server, client) {
4
+ server.registerTool("cplace_get_person_by_id", {
5
+ description: "Get details about a person including their name and email.",
6
+ inputSchema: {
7
+ id: z.string().describe("The ID of the person to get, e.g. 'person/kkt8ol745jqur4581kelm5ply'")
8
+ },
9
+ annotations: { title: "Get Person by ID" }
10
+ }, async ({ id }) => {
11
+ try {
12
+ const result = await client.makeApiRequest('json/person', 'GET', { id });
13
+ return {
14
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
15
+ };
16
+ }
17
+ catch (error) {
18
+ return {
19
+ content: [{ type: "text", text: `Error retrieving person: ${error instanceof Error ? error.message : String(error)}` }]
20
+ };
21
+ }
22
+ });
23
+ server.registerTool("cplace_get_person_by_name", {
24
+ description: "Get details about a person by searching for their name.",
25
+ inputSchema: {
26
+ name: z.string().describe("The name of the person or part of the name to search for"),
27
+ },
28
+ annotations: { title: "Get Person by Name" }
29
+ }, async ({ name }) => {
30
+ try {
31
+ const result = await client.makeApiRequest('json/person', 'GET', { name });
32
+ return {
33
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
34
+ };
35
+ }
36
+ catch (error) {
37
+ return {
38
+ content: [{ type: "text", text: `Error searching for person: ${error instanceof Error ? error.message : String(error)}` }]
39
+ };
40
+ }
41
+ });
42
+ server.registerTool("cplace_get_current_user", {
43
+ description: "Get information about the currently logged-in user, including their attributes and metadata",
44
+ inputSchema: {},
45
+ annotations: { title: "Get Current User" }
46
+ }, async () => {
47
+ debugLogWithTag('CURRENT_USER', 'Starting current user request');
48
+ try {
49
+ const result = await client.makeApiRequest('json/current-user');
50
+ debugLogWithTag('CURRENT_USER', `Retrieved current user information`);
51
+ return {
52
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
53
+ };
54
+ }
55
+ catch (error) {
56
+ return {
57
+ content: [{ type: "text", text: `Error retrieving current user information: ${error instanceof Error ? error.message : String(error)}` }]
58
+ };
59
+ }
60
+ });
61
+ }
62
+ //# sourceMappingURL=users.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/tools/users.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,UAAU,iBAAiB,CAAC,MAAiB,EAAE,MAAuB;IAE1E,MAAM,CAAC,YAAY,CAAC,yBAAyB,EAC3C;QACE,WAAW,EAAE,4DAA4D;QACzE,WAAW,E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,4 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { CplaceApiClient } from '../api.js';
3
+ export declare function registerValidatorTools(server: McpServer, client: CplaceApiClient): void;
4
+ //# sourceMappingURL=validators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/tools/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,QAuGhF"}
@@ -0,0 +1,87 @@
1
+ import { z } from "zod";
2
+ export function registerValidatorTools(server, client) {
3
+ server.registerTool("cplace_get_validator_by_attribute", {
4
+ description: "Retrieves the JavaScript validator script and metadata for a specific attribute definition. Returns comprehensive context information including workspace, type, and attribute details along with the validator code if it exists.",
5
+ inputSchema: {
6
+ workspaceId: z.string().describe("The workspace identifier (e.g., 'workspace/abc123')"),
7
+ typeInternalName: z.string().describe("The internal name of the type definition (e.g., 'cf.example.task')"),
8
+ attributeName: z.string().describe("The name of the attribute (e.g., 'taskTitle')")
9
+ },
10
+ annotations: { title: "Get Validator by Attribute" }
11
+ }, async ({ workspaceId, typeInternalName, attributeName }) => {
12
+ try {
13
+ const result = await client.makeApiRequest('json/validator', 'GET', {
14
+ workspaceId,
15
+ typeInternalName,
16
+ attributeName
17
+ });
18
+ return {
19
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
20
+ };
21
+ }
22
+ catch (error) {
23
+ return {
24
+ content: [{ type: "text", text: `Error retrieving validator: ${error instanceof Error ? error.message : String(error)}` }]
25
+ };
26
+ }
27
+ });
28
+ server.registerTool("cplace_manage_validator", {
29
+ description: "Create or update JavaScript validators for attribute definitions. Validators are JavaScript functions executed to validate attribute values during page creation and updates.",
30
+ inputSchema: {
31
+ operation: z.enum(["create", "update"]).describe("Operation type: 'create' for new validators, 'update' for existing validators"),
32
+ workspaceId: z.string().describe("Required: Target workspace identifier (e.g., 'workspace/abc123')"),
33
+ typeInternalName: z.string().describe("Required: Target type internal name (e.g., 'cf.example.task')"),
34
+ attributeName: z.string().describe("Required: Target attribute name (e.g., 'taskTitle')"),
35
+ script: z.string().optional().describe("⚠️ REQUIRED: Review cplace Low-Code documentation before writing validator scripts. Access via web (https://docs.cplace.io/lowcode/features/validators/), MCP tools, or local file system."),
36
+ description: z.string().optional().describe("Optional: Human-readable description of the validator")
37
+ },
38
+ annotations: { title: "Manage Validator" }
39
+ }, async (params) => {
40
+ try {
41
+ if (params.operation === "create") {
42
+ if (!params.script) {
43
+ return {
44
+ content: [{ type: "text", text: "Error: Create operation requires script parameter" }]
45
+ };
46
+ }
47
+ const requestBody = {
48
+ workspaceId: params.workspaceId,
49
+ typeInternalName: params.typeInternalName,
50
+ attributeName: params.attributeName,
51
+ script: params.script
52
+ };
53
+ if (params.description) {
54
+ requestBody.description = params.description;
55
+ }
56
+ const result = await client.makeApiRequest('json/validator', 'POST', undefined, requestBody);
57
+ return {
58
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
59
+ };
60
+ }
61
+ else {
62
+ const requestBody = {
63
+ workspaceId: params.workspaceId,
64
+ typeInternalName: params.typeInternalName,
65
+ attributeName: params.attributeName
66
+ };
67
+ if (params.script !== undefined) {
68
+ requestBody.script = params.script;
69
+ }
70
+ if (params.description !== undefined) {
71
+ requestBody.description = params.description;
72
+ }
73
+ const result = await client.makeApiRequest('json/validator', 'PATCH', undefined, requestBody);
74
+ return {
75
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
76
+ };
77
+ }
78
+ }
79
+ catch (error) {
80
+ const operationText = params.operation === "create" ? "creating" : "updating";
81
+ return {
82
+ content: [{ type: "text", text: `Error ${operationText} validator: ${error instanceof Error ? error.message : String(error)}` }]
83
+ };
84
+ }
85
+ });
86
+ }
87
+ //# sourceMappingURL=validators.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O,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,aAAa,eAAe,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC;aACjI,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { CplaceApiClient } from '../api.js';
3
+ export declare function registerVersionHistoryTools(server: McpServer, client: CplaceApiClient): void;
4
+ //# sourceMappingURL=version-history.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version-history.d.ts","sourceRoot":"","sources":["../../src/tools/version-history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAG5C,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,QAkLrF"}