@cplace/test-mcp-server 0.1.15 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/README.md +248 -113
  2. package/dist/conditional-registration.d.ts.map +1 -1
  3. package/dist/conditional-registration.js +19 -3
  4. package/dist/conditional-registration.js.map +1 -1
  5. package/dist/index.js +21 -93
  6. package/dist/index.js.map +1 -1
  7. package/dist/preference-file.d.ts +16 -0
  8. package/dist/preference-file.d.ts.map +1 -0
  9. package/dist/preference-file.js +133 -0
  10. package/dist/preference-file.js.map +1 -0
  11. package/dist/profiles.d.ts +1 -3
  12. package/dist/profiles.d.ts.map +1 -1
  13. package/dist/profiles.js +60 -112
  14. package/dist/profiles.js.map +1 -1
  15. package/dist/searchConversion.d.ts.map +1 -1
  16. package/dist/searchConversion.js +18 -5
  17. package/dist/searchConversion.js.map +1 -1
  18. package/dist/searchSchema.d.ts +25 -25
  19. package/dist/searchSchema.d.ts.map +1 -1
  20. package/dist/searchSchema.js +5 -5
  21. package/dist/searchSchema.js.map +1 -1
  22. package/dist/token-hashing.d.ts +3 -0
  23. package/dist/token-hashing.d.ts.map +1 -0
  24. package/dist/token-hashing.js +18 -0
  25. package/dist/token-hashing.js.map +1 -0
  26. package/dist/tool-metadata.d.ts +2 -0
  27. package/dist/tool-metadata.d.ts.map +1 -0
  28. package/dist/tool-metadata.js +43 -0
  29. package/dist/tool-metadata.js.map +1 -0
  30. package/dist/tools/change-listeners.d.ts +30 -0
  31. package/dist/tools/change-listeners.d.ts.map +1 -1
  32. package/dist/tools/change-listeners.js +24 -18
  33. package/dist/tools/change-listeners.js.map +1 -1
  34. package/dist/tools/common-schemas.d.ts +2 -0
  35. package/dist/tools/common-schemas.d.ts.map +1 -1
  36. package/dist/tools/common-schemas.js +16 -0
  37. package/dist/tools/common-schemas.js.map +1 -1
  38. package/dist/tools/csv-export.d.ts +1849 -0
  39. package/dist/tools/csv-export.d.ts.map +1 -0
  40. package/dist/tools/csv-export.js +61 -0
  41. package/dist/tools/csv-export.js.map +1 -0
  42. package/dist/tools/generic-layouts.d.ts +302 -0
  43. package/dist/tools/generic-layouts.d.ts.map +1 -1
  44. package/dist/tools/generic-layouts.js +102 -70
  45. package/dist/tools/generic-layouts.js.map +1 -1
  46. package/dist/tools/get-operations.d.ts +16 -0
  47. package/dist/tools/get-operations.d.ts.map +1 -0
  48. package/dist/tools/get-operations.js +63 -0
  49. package/dist/tools/get-operations.js.map +1 -0
  50. package/dist/tools/pages.d.ts +55 -0
  51. package/dist/tools/pages.d.ts.map +1 -1
  52. package/dist/tools/pages.js +173 -257
  53. package/dist/tools/pages.js.map +1 -1
  54. package/dist/tools/ppt-export-schemas.d.ts +16 -16
  55. package/dist/tools/ppt-export.d.ts +1493 -0
  56. package/dist/tools/ppt-export.d.ts.map +1 -1
  57. package/dist/tools/ppt-export.js +23 -17
  58. package/dist/tools/ppt-export.js.map +1 -1
  59. package/dist/tools/profile-management.d.ts +20 -0
  60. package/dist/tools/profile-management.d.ts.map +1 -0
  61. package/dist/tools/profile-management.js +250 -0
  62. package/dist/tools/profile-management.js.map +1 -0
  63. package/dist/tools/references.d.ts +36 -0
  64. package/dist/tools/references.d.ts.map +1 -1
  65. package/dist/tools/references.js +48 -45
  66. package/dist/tools/references.js.map +1 -1
  67. package/dist/tools/richstring-widgets.d.ts +51 -0
  68. package/dist/tools/richstring-widgets.d.ts.map +1 -0
  69. package/dist/tools/richstring-widgets.js +173 -0
  70. package/dist/tools/richstring-widgets.js.map +1 -0
  71. package/dist/tools/schedule.d.ts +14 -0
  72. package/dist/tools/schedule.d.ts.map +1 -1
  73. package/dist/tools/schedule.js +7 -3
  74. package/dist/tools/schedule.js.map +1 -1
  75. package/dist/tools/script-logs.d.ts +29 -0
  76. package/dist/tools/script-logs.d.ts.map +1 -0
  77. package/dist/tools/script-logs.js +144 -0
  78. package/dist/tools/script-logs.js.map +1 -0
  79. package/dist/tools/search.d.ts +1870 -0
  80. package/dist/tools/search.d.ts.map +1 -1
  81. package/dist/tools/search.js +49 -75
  82. package/dist/tools/search.js.map +1 -1
  83. package/dist/tools/system.d.ts.map +1 -1
  84. package/dist/tools/system.js +4 -2
  85. package/dist/tools/system.js.map +1 -1
  86. package/dist/tools/type-layouts.d.ts +37 -0
  87. package/dist/tools/type-layouts.d.ts.map +1 -1
  88. package/dist/tools/type-layouts.js +30 -22
  89. package/dist/tools/type-layouts.js.map +1 -1
  90. package/dist/tools/type-management.d.ts +134 -0
  91. package/dist/tools/type-management.d.ts.map +1 -0
  92. package/dist/tools/{workspace.js → type-management.js} +67 -307
  93. package/dist/tools/type-management.js.map +1 -0
  94. package/dist/tools/users.d.ts +19 -0
  95. package/dist/tools/users.d.ts.map +1 -1
  96. package/dist/tools/users.js +14 -28
  97. package/dist/tools/users.js.map +1 -1
  98. package/dist/tools/validators.d.ts +28 -0
  99. package/dist/tools/validators.d.ts.map +1 -1
  100. package/dist/tools/validators.js +21 -15
  101. package/dist/tools/validators.js.map +1 -1
  102. package/dist/tools/version-check.d.ts.map +1 -1
  103. package/dist/tools/version-check.js +11 -9
  104. package/dist/tools/version-check.js.map +1 -1
  105. package/dist/tools/version-history.d.ts +48 -0
  106. package/dist/tools/version-history.d.ts.map +1 -1
  107. package/dist/tools/version-history.js +39 -29
  108. package/dist/tools/version-history.js.map +1 -1
  109. package/dist/tools/widgets.d.ts +182 -0
  110. package/dist/tools/widgets.d.ts.map +1 -1
  111. package/dist/tools/widgets.js +122 -343
  112. package/dist/tools/widgets.js.map +1 -1
  113. package/dist/tools/workflow-scripts.d.ts +40 -0
  114. package/dist/tools/workflow-scripts.d.ts.map +1 -0
  115. package/dist/tools/workflow-scripts.js +186 -0
  116. package/dist/tools/workflow-scripts.js.map +1 -0
  117. package/dist/tools/workflow.d.ts +70 -0
  118. package/dist/tools/workflow.d.ts.map +1 -0
  119. package/dist/tools/workflow.js +259 -0
  120. package/dist/tools/workflow.js.map +1 -0
  121. package/dist/tools/workspace-admin.d.ts +40 -0
  122. package/dist/tools/workspace-admin.d.ts.map +1 -0
  123. package/dist/tools/workspace-admin.js +125 -0
  124. package/dist/tools/workspace-admin.js.map +1 -0
  125. package/dist/tools/workspace-core.d.ts +45 -0
  126. package/dist/tools/workspace-core.d.ts.map +1 -0
  127. package/dist/tools/workspace-core.js +153 -0
  128. package/dist/tools/workspace-core.js.map +1 -0
  129. package/dist/types.d.ts +3 -3
  130. package/dist/types.d.ts.map +1 -1
  131. package/dist/utils/dateValidation.d.ts +5 -0
  132. package/dist/utils/dateValidation.d.ts.map +1 -0
  133. package/dist/utils/dateValidation.js +57 -0
  134. package/dist/utils/dateValidation.js.map +1 -0
  135. package/dist/utils.js +7 -7
  136. package/dist/utils.js.map +1 -1
  137. package/package.json +1 -1
  138. package/dist/tools/workspace.d.ts +0 -4
  139. package/dist/tools/workspace.d.ts.map +0 -1
  140. package/dist/tools/workspace.js.map +0 -1
package/README.md CHANGED
@@ -6,15 +6,10 @@ The server supports a profile-based tool loading system to optimize LLM context
6
6
 
7
7
  ## Installation & Setup
8
8
 
9
- > **⚠️ Important**: The `CPLACE_URL` must end with a forward slash (`/`) when working with a tenant. Missing this slash will result in 404 errors.
10
- >
11
- > ✅ Correct: `https://your-cplace-instance.com/your-tenant/`
12
- > ❌ Incorrect: `https://your-cplace-instance.com/your-tenant`
13
-
14
9
  ### Claude Desktop Installation
15
10
 
16
- #### Basic Setup (All tools)
17
- By default, all tools are loaded. Add this entry to your Claude Desktop MCP server configuration file:
11
+ #### Basic Setup
12
+ By default, only the core tools are loaded. Add this entry to your Claude Desktop MCP server configuration file:
18
13
 
19
14
  **Option 1: Separate credentials (traditional)**
20
15
  ```json
@@ -22,9 +17,9 @@ By default, all tools are loaded. Add this entry to your Claude Desktop MCP serv
22
17
  "mcpServers": {
23
18
  "cplace": {
24
19
  "command": "npx",
25
- "args": ["--ignore-existing", "-y", "@cplace/test-mcp-server"],
20
+ "args": ["--ignore-existing", "-y", "@cplace/test-mcp-server@latest"],
26
21
  "env": {
27
- "CPLACE_URL": "https://your-cplace-instance.com/your-tenant/",
22
+ "CPLACE_URL": "https://your-cplace-instance.com/your-tenant",
28
23
  "API_TOKEN": "your-api-token"
29
24
  }
30
25
  }
@@ -38,93 +33,73 @@ By default, all tools are loaded. Add this entry to your Claude Desktop MCP serv
38
33
  "mcpServers": {
39
34
  "cplace": {
40
35
  "command": "npx",
41
- "args": ["--ignore-existing", "-y", "@cplace/test-mcp-server"],
36
+ "args": ["--ignore-existing", "-y", "@cplace/test-mcp-server@latest"],
42
37
  "env": {
43
- "CPLACE_URL": "https://your-api-token@your-cplace-instance.com/your-tenant/"
38
+ "CPLACE_URL": "https://your-api-token@your-cplace-instance.com/your-tenant"
44
39
  }
45
40
  }
46
41
  }
47
42
  }
48
43
  ```
49
44
 
50
- #### With Profile Selection (Recommended for reduced token usage)
51
- To load only specific tool groups and reduce LLM context usage, add the `--profiles` argument:
45
+ ### Claude Code Installation
52
46
 
47
+ #### All tools (default):
53
48
  **Option 1: Separate credentials**
54
- ```json
55
- {
56
- "mcpServers": {
57
- "cplace": {
58
- "command": "npx",
59
- "args": ["--ignore-existing", "-y", "@cplace/test-mcp-server", "--profiles=layouts"],
60
- "env": {
61
- "CPLACE_URL": "https://your-cplace-instance.com/your-tenant/",
62
- "API_TOKEN": "your-api-token"
63
- }
64
- }
65
- }
66
- }
49
+ ```bash
50
+ claude mcp add cplace \
51
+ --env CPLACE_URL=https://your-cplace-instance.com/your-tenant \
52
+ --env API_TOKEN=your-api-token \
53
+ -- npx --ignore-existing -y @cplace/test-mcp-server@latest
67
54
  ```
68
55
 
69
56
  **Option 2: URL-embedded credentials**
57
+ ```bash
58
+ claude mcp add cplace \
59
+ --env CPLACE_URL=https://your-api-token@your-cplace-instance.com/your-tenant \
60
+ -- npx --ignore-existing -y @cplace/test-mcp-server@latest
61
+ ```
62
+
63
+ Verify the installation:
64
+ ```bash
65
+ claude mcp list
66
+ ```
67
+
68
+ ### Installing a Specific Version
69
+
70
+ By default, `npx` installs the latest version of the MCP server. To install a specific version, add the version number to the package name:
71
+
72
+ #### Claude Desktop
70
73
  ```json
71
74
  {
72
75
  "mcpServers": {
73
76
  "cplace": {
74
77
  "command": "npx",
75
- "args": ["--ignore-existing", "-y", "@cplace/test-mcp-server", "--profiles=layouts"],
78
+ "args": ["--ignore-existing", "-y", "@cplace/test-mcp-server@0.1.15"],
76
79
  "env": {
77
- "CPLACE_URL": "https://your-api-token@your-cplace-instance.com/your-tenant/"
80
+ "CPLACE_URL": "https://your-cplace-instance.com/your-tenant",
81
+ "API_TOKEN": "your-api-token"
78
82
  }
79
83
  }
80
84
  }
81
85
  }
82
86
  ```
83
87
 
84
- ### Claude Code Installation
85
-
86
- #### All tools (default):
87
- **Option 1: Separate credentials**
88
- ```bash
89
- claude mcp add cplace \
90
- --env CPLACE_URL=https://your-cplace-instance.com/your-tenant/ \
91
- --env API_TOKEN=your-api-token \
92
- -- npx --ignore-existing -y @cplace/test-mcp-server
93
- ```
94
-
95
- **Option 2: URL-embedded credentials**
96
- ```bash
97
- claude mcp add cplace \
98
- --env CPLACE_URL=https://your-api-token@your-cplace-instance.com/your-tenant/ \
99
- -- npx --ignore-existing -y @cplace/test-mcp-server
100
- ```
101
-
102
- #### With specific profiles (recommended):
103
- **Option 1: Separate credentials**
88
+ #### Claude Code
104
89
  ```bash
105
90
  claude mcp add cplace \
106
- --env CPLACE_URL=https://your-cplace-instance.com/your-tenant/ \
91
+ --env CPLACE_URL=https://your-cplace-instance.com/your-tenant \
107
92
  --env API_TOKEN=your-api-token \
108
- -- npx --ignore-existing -y @cplace/test-mcp-server --profiles=layouts
93
+ -- npx --ignore-existing -y @cplace/test-mcp-server@0.1.15
109
94
  ```
110
95
 
111
- **Option 2: URL-embedded credentials**
112
- ```bash
113
- claude mcp add cplace \
114
- --env CPLACE_URL=https://your-api-token@your-cplace-instance.com/your-tenant/ \
115
- -- npx --ignore-existing -y @cplace/test-mcp-server --profiles=layouts
116
- ```
117
-
118
- Verify the installation:
119
- ```bash
120
- claude mcp list
121
- ```
96
+ **Note**: Replace `0.1.15` with your desired version number. You can find available versions on [npm](https://www.npmjs.com/package/@cplace/test-mcp-server?activeTab=versions).
122
97
 
123
98
  ## Authentication Notes
124
99
 
125
100
  The installation examples above show two authentication approaches:
126
101
  - **Separate credentials**: Traditional `CPLACE_URL` + `API_TOKEN` approach
127
- - **URL-embedded credentials**: Token embedded in the URL like `https://token@host.com/tenant/`
102
+ - **URL-embedded credentials**: Token embedded in the URL like `https://token@host.com/tenant`
128
103
 
129
104
  **Priority**: If both `API_TOKEN` and URL-embedded credentials are provided, `API_TOKEN` takes precedence. This ensures backwards compatibility and allows secure credential override.
130
105
 
@@ -153,83 +128,239 @@ The following configuration properties must be set for API Token authentication
153
128
  4. Add the MCP server configuration to Claude Desktop
154
129
  5. Open Claude Desktop - the cplace tools should now be available
155
130
 
131
+ ## Version Compatibility
132
+
133
+ The MCP server and cplace backend must be synchronized to work correctly. Version mismatches can occur when either component is upgraded independently.
134
+
135
+ ### Checking Version Compatibility
136
+
137
+ Ask Claude to check version compatibility:
138
+ ```
139
+ Check the version compatibility between the MCP server and the cplace backend
140
+ ```
141
+
142
+ Claude will internally use the `cplace_check_version_compatibility` tool to perform the check.
143
+
144
+ ### Understanding the Results
145
+
146
+ Claude will report one of these outcomes:
147
+
148
+ #### ✅ Compatible
149
+
150
+ Your MCP server package version matches what the backend expects. Everything is working correctly, and no action is needed.
151
+
152
+ #### ⚠️ Version Mismatch
153
+
154
+ The versions don't match. There are two possible scenarios:
155
+
156
+ ##### Scenario 1: MCP Server Newer Than Backend
157
+
158
+ ```
159
+ ⚠️ Version Mismatch Detected
160
+
161
+ Your MCP server package is newer than what the cplace backend currently supports:
162
+
163
+ - Your MCP server package version: 1.0.5
164
+ - Backend expects version: 1.0.2
165
+ ```
166
+
167
+ **What This Means:** The cplace backend hasn't been upgraded yet to support features in your MCP server package version. This could lead to unexpected behavior or errors when using certain tools.
168
+
169
+ **Resolution Options:**
170
+
171
+ **Option A: Downgrade MCP Server (Recommended for Local Installations)**
172
+
173
+ If you're using a local MCP server installation, you can downgrade to match the backend version. Follow the instructions in the [Installing a Specific Version](#installing-a-specific-version) section above to install version `1.0.2` (the version your backend expects).
174
+
175
+ Example for Claude Desktop:
176
+ ```json
177
+ {
178
+ "mcpServers": {
179
+ "cplace": {
180
+ "command": "npx",
181
+ "args": ["--ignore-existing", "-y", "@cplace/test-mcp-server@1.0.2"],
182
+ "env": {
183
+ "CPLACE_URL": "https://your-cplace-instance.com/your-tenant",
184
+ "API_TOKEN": "your-api-token"
185
+ }
186
+ }
187
+ }
188
+ }
189
+ ```
190
+
191
+ After updating the configuration, close and reopen Claude Desktop, then run the version check again to confirm compatibility.
192
+
193
+ **Option B: Upgrade Backend**
194
+
195
+ Contact your cplace administrator to upgrade the backend deployment to the latest version.
196
+
197
+ ##### Scenario 2: Backend Newer Than MCP Server
198
+
199
+ ```
200
+ ⚠️ Version Mismatch Detected
201
+
202
+ Your cplace backend has been upgraded and now expects a newer package version:
203
+
204
+ - Your MCP server package version: 1.0.2
205
+ - Backend expects version: 1.0.5
206
+ ```
207
+
208
+ **What This Means:** The backend has been upgraded with new features that require a newer MCP server package version.
209
+
210
+ **Resolution:**
211
+
212
+ The MCP server will automatically upgrade to the latest version on the next restart when using `@latest`. If you're using a version-pinned installation (e.g., `@1.0.2`), update your configuration to either specify the new version or use `@latest` to always fetch the newest version:
213
+
214
+ Example for Claude Desktop (auto-upgrade to latest):
215
+ ```json
216
+ {
217
+ "mcpServers": {
218
+ "cplace": {
219
+ "command": "npx",
220
+ "args": ["--ignore-existing", "-y", "@cplace/test-mcp-server@latest"],
221
+ "env": {
222
+ "CPLACE_URL": "https://your-cplace-instance.com/your-tenant",
223
+ "API_TOKEN": "your-api-token"
224
+ }
225
+ }
226
+ }
227
+ }
228
+ ```
229
+
230
+ Close and reopen Claude Desktop to apply the changes, then run the version check again to confirm compatibility.
231
+
156
232
  ## Changing the cplace System
157
233
 
158
234
  To change `CPLACE_URL` or `API_TOKEN`, update the values in the Claude Desktop configuration, then close & reopen Claude Desktop.
159
235
 
160
236
  ## Profile System
161
237
 
162
- The server uses a profile-based tool loading system to optimize LLM context usage. By default, **all tools are loaded** if no profiles are specified. You can restrict to specific tool groups to reduce LLM context usage.
238
+ The MCP server uses a profile-based tool loading system to optimize LLM context usage. By default, only the **core** profile is loaded if no profiles are specified, providing essential operations while keeping context usage low. You can load additional tool groups by specifying profiles via CLI arguments or by using the `cplace_manage_profiles` tool.
239
+
240
+ ### Available Tool Profiles
163
241
 
164
- ### Available Tool Groups
242
+ | Profile | Description | Tool Count |
243
+ |---------|-------------|------------|
244
+ | `core` | Essential operations | 18 tools |
245
+ | `workspace-admin` | Workspace creation and app management | 3 tools |
246
+ | `history` | Version history | 4 tools |
247
+ | `layouts` | Widget and layout management | 21 tools |
248
+ | `types-write` | Type and attribute management | 2 tools |
249
+ | `low-code` | Validators, change listeners, workflows | 11 tools |
250
+ | `ppt-export` | PowerPoint export | 2 tools |
251
+ | `csv-export` | CSV export functionality | 1 tool |
252
+ | `schedule` | Schedule analysis | 1 tool |
253
+
254
+ ### Token Usage by Profile
255
+
256
+ The visualization below shows the LLM context token usage for each profile. Loading multiple profiles increases the total context consumed:
257
+
258
+ ```
259
+ ┌─────────────────────────────────────────────────────────────────┐
260
+ │ LAYOUTS 20.8k ████████████████████████████████████████ │
261
+ │ CORE 17.4k ██████████████████████████████████ │
262
+ │ LOW_CODE 10.3k ████████████████ │
263
+ │ PPT_EXPORT 5.2k ████████ │
264
+ │ TYPES_WRITE 3.4k █████ │
265
+ │ HISTORY 2.8k ████ │
266
+ │ WORKSPACE_ADMIN 2.3k ███ │
267
+ │ CSV_EXPORT 2.2k ███ │
268
+ │ SCHEDULE 860 █ │
269
+ └─────────────────────────────────────────────────────────────────┘
270
+ Total: ~65.3k tokens across all profiles
271
+ ```
165
272
 
166
- | Group | Description | Tools |
167
- |-------|-------------|-------|
168
- | **core** | Essential operations | Workspace navigation, page CRUD, search, users, references |
169
- | **history** | Version history | Track changes and view page history |
170
- | **layouts** | Widget and layout management | Full dashboard and widget management |
171
- | **types_write** | Type and attribute management | Create and modify type definitions |
172
- | **low_code** | Validators and change listeners | Automation scripts and validation |
173
- | **ppt_export** | PowerPoint export | Create PowerPoint export profiles |
174
- | **csv_export** | CSV export functionality | Export search results to CSV |
175
- | **schedule** | Schedule analysis | Cross-schedule dependencies and links |
273
+ **Note**: The core profile is always loaded automatically. When you specify additional profiles, their token counts are added to the core profile's usage.
176
274
 
177
275
  ### Profile Usage Examples
178
276
 
179
277
  ```bash
180
- # All tools (default - no profiles specified)
181
- npx --ignore-existing -y @cplace/test-mcp-server
182
-
183
- # Just core functionality
184
- npx --ignore-existing -y @cplace/test-mcp-server --profiles=core
278
+ # Default - core functionality only
279
+ npx --ignore-existing -y @cplace/test-mcp-server@latest
185
280
 
186
281
  # Dashboard development (core + layouts)
187
- npx --ignore-existing -y @cplace/test-mcp-server --profiles=layouts
282
+ npx --ignore-existing -y @cplace/test-mcp-server@latest --profiles=layouts
188
283
 
189
- # Type development (core + types_write + low_code)
190
- npx --ignore-existing -y @cplace/test-mcp-server --profiles=types_write+low_code
284
+ # Type development (core + types-write + low-code)
285
+ npx --ignore-existing -y @cplace/test-mcp-server@latest --profiles=types-write+low-code
191
286
 
192
- # Data analysis (core + csv_export + history)
193
- npx --ignore-existing -y @cplace/test-mcp-server --profiles=csv_export+history
287
+ # Load all available profiles
288
+ npx --ignore-existing -y @cplace/test-mcp-server@latest --profiles=all
194
289
  ```
195
290
 
196
- ### Checking Active Profiles
291
+ ### Dynamic Profile Management
292
+
293
+ You can ask Claude to manage profiles at runtime using natural language. Claude will use the `cplace_manage_profiles` tool to handle your requests:
294
+
295
+ **Example messages:**
296
+ - "What profiles are currently active?"
297
+ - "Show me all available profiles"
298
+ - "Switch to the layouts and types-write profiles"
299
+
300
+ **Note**: Profile changes are saved to `~/.cplace-mcp-profiles.json` but require a server reconnect to take effect. The MCP server loads tools once at startup and cannot dynamically register/unregister tools during runtime.
301
+
302
+ **To reconnect in Claude Code**: Use the `/mcp` command, then select the cplace MCP server and click `Reconnect`.
303
+ **To reconnect in Claude Desktop**: Close and reopen the application.
304
+
305
+ ### Profile Resolution Priority
306
+
307
+ The server uses a three-tier priority system to determine which profiles are active at startup:
308
+
309
+ 1. **Stored Preferences (Highest Priority)**: Profiles saved via `cplace_manage_profiles` tool, stored in `~/.cplace-mcp-profiles.json`. These are path-specific (keyed by working directory), user-specific (API token hash), and tenant-specific (URL).
197
310
 
198
- Use the `cplace_profile_info` tool in Claude to see which profiles are currently active and what tools are available.
311
+ 2. **CLI Argument (Medium Priority)**: The `--profiles=` argument in your MCP server configuration. Used when no stored preference exists for the current directory/user/tenant combination.
199
312
 
200
- ## Available Tools
313
+ 3. **Code Default (Lowest Priority)**: Falls back to the "core" profile only when neither stored preferences nor CLI arguments are provided.
314
+
315
+ **Special Rules**:
316
+ - The "core" profile is always included automatically, regardless of configuration
317
+ - Profile preferences are directory-specific: `/project-a` can have different profiles than `/project-b` for the same user
318
+ - The `cplace_manage_profiles` tool is always available
319
+
320
+ ## Available Profiles and Tools
201
321
 
202
322
  ### Core (Always Loaded)
203
323
  Essential operations including workspace navigation, page CRUD operations, search, users, and references.
204
324
 
325
+ **Workspace Management:**
205
326
  - `cplace_list_workspaces` - Get all workspaces with essential properties
206
327
  - `cplace_get_workspace_details` - Get comprehensive details about a specific workspace including all metadata, permissions, type definitions, styling, and configuration
207
- - `cplace_create_workspace` - Create a new workspace with specified configuration including name, permissions, and apps
208
- - `cplace_list_workspace_apps` - Get comprehensive information about applications within a workspace, including installed apps, available apps for installation, dependency information, and compatibility status
209
- - `cplace_install_workspace_app` - Install a specific application into a workspace, including automatic dependency resolution
210
328
  - `cplace_list_types` - List all types available in a workspace
211
329
  - `cplace_get_type_datamodel` - Get the datamodel of a type including its attributes, constraints, and permissions
212
- - `cplace_get_page_by_id` - Get page by ID with full details
213
- - `cplace_create_page` - Create a new page with specified attributes and content
214
- - `cplace_update_page` - Update an existing page's attributes, content, or structure
330
+
331
+ **Page Operations:**
332
+ - `cplace_get_by_uid` - Get entity (page or person) by UID with full details
333
+ - `cplace_manage_page` - Create or update a page with attributes and content
215
334
  - `cplace_delete_page` - Permanently delete a single page (leaf pages only)
216
335
  - `cplace_delete_page_with_children` - Permanently delete a page and optionally all its children
217
- - `cplace_copy_page` - Copy a single page (leaf pages only) to a new location with attributes and content
218
- - `cplace_copy_page_with_children` - Copy a page and all its children to a new location preserving the hierarchy
336
+ - `cplace_copy_page` - Copy a page with optional children to a new location
337
+
338
+ **Search:**
219
339
  - `cplace_search_pages` - Search pages of a type in cplace with advanced filtering
220
340
  - `cplace_search_pages_fulltext` - Make a fulltext search across all pages in cplace
221
341
  - `cplace_list_pages_of_type` - List all pages of a specific type in a workspace
222
- - `cplace_get_person_by_id` - Get details about a person including their name and email
342
+
343
+ **Users & References:**
223
344
  - `cplace_get_person_by_name` - Get details about a person by searching for their name
224
345
  - `cplace_get_current_user` - Get information about the currently logged-in user
225
- - `cplace_get_type_incoming_references` - Get comprehensive information about all incoming references to a specific type definition
226
- - `cplace_get_page_incoming_references` - Get comprehensive information about all incoming references to a specific page
346
+ - `cplace_get_incoming_references` - Get incoming references for pages or types
347
+
348
+ **Utilities:**
227
349
  - `cplace_get_icon_names` - Get all available icon names in the cplace system (FontAwesome, cplace custom, HUI utility icons)
228
350
  - `cplace_check_version_compatibility` - Check version compatibility between the MCP server and the cplace backend API
229
- - `cplace_profile_info` - Get information about active MCP profiles and available groups
351
+
352
+ **Profile Management:**
353
+ - `cplace_manage_profiles` - Dynamically manage active profiles
354
+
355
+ ### Workspace Admin (Profile: workspace-admin)
356
+ Workspace creation and app management.
357
+
358
+ - `cplace_create_workspace` - Create a new workspace with specified configuration including name, permissions, and apps
359
+ - `cplace_list_workspace_apps` - Get comprehensive information about applications within a workspace, including installed apps, available apps for installation, dependency information, and compatibility status
360
+ - `cplace_install_workspace_app` - Install a specific application into a workspace, including automatic dependency resolution
230
361
 
231
362
  ### Layouts (Profile: layouts)
232
- Widget and dashboard layout management.
363
+ Widget and dashboard layout management, plus richstring widget operations.
233
364
 
234
365
  - `cplace_list_widget_definitions` - Get a list of all available widget definitions with their metadata
235
366
  - `cplace_get_widget_definition` - Get detailed information about a specific widget definition including its configuration schema
@@ -252,22 +383,33 @@ Widget and dashboard layout management.
252
383
  - `cplace_layout_update_widget` - Update widget configuration or collapse state in page or type layout (unified interface)
253
384
  - `cplace_layout_move_widget` - Move widget to different position in page or type layout (unified interface)
254
385
  - `cplace_layout_compact` - Remove empty rows from page or type layout (unified interface)
386
+ - `cplace_richstring_extract_widgets` - Extract all embedded widgets from a richstring attribute value
387
+ - `cplace_richstring_insert_widget` - Insert a widget into a richstring attribute at a specific position
388
+ - `cplace_richstring_update_widget` - Update an existing widget configuration within a richstring attribute
389
+ - `cplace_richstring_delete_widget` - Delete a widget from a richstring attribute
255
390
 
256
- ### Type and Attribute Definition (Profile: types_write)
391
+ ### Type and Attribute Definition (Profile: types-write)
257
392
  Type and attribute creation and updates.
258
393
 
259
394
  - `cplace_manage_type_definition` - Create or update type definitions in a workspace with comprehensive configuration options
260
395
  - `cplace_manage_attribute_definition` - Create or update attribute definitions within existing type definitions
261
396
 
262
- ### Low-Code (Profile: low_code)
263
- Validators and change listeners.
397
+ ### Low-Code (Profile: low-code)
398
+ Validators, change listeners, workflow state machines, workflow scripts, and script logging.
264
399
 
265
400
  - `cplace_get_validator_by_attribute` - Get JavaScript validator script and metadata for a specific attribute
266
401
  - `cplace_manage_validator` - Create or update JavaScript validators for attribute definitions
267
402
  - `cplace_get_change_listeners_by_type` - Get all JavaScript automation scripts (change listeners) for a type
268
403
  - `cplace_manage_change_listener` - Create or update JavaScript automation scripts that execute when specified attributes change
269
-
270
- ### PPT Export (Profile: ppt_export)
404
+ - `cplace_manage_workflow_state` - Create or update workflow states for type definitions with comprehensive configuration
405
+ - `cplace_delete_workflow_state` - Delete a workflow state from a type definition
406
+ - `cplace_manage_workflow_transition` - Create or update workflow transitions between states with validation and JavaScript actions
407
+ - `cplace_delete_workflow_transition` - Delete a workflow transition from a type definition
408
+ - `cplace_get_workflow_script` - Get the JavaScript script associated with a workflow state or transition
409
+ - `cplace_manage_workflow_script` - Create or update JavaScript scripts for workflow states or transitions
410
+ - `cplace_get_script_logs` - Retrieve filtered and paginated script execution logs for debugging and monitoring low-code scripts
411
+
412
+ ### PPT Export (Profile: ppt-export)
271
413
  PowerPoint export profiles.
272
414
 
273
415
  - `cplace_create_ppt_export_profile` - Create PowerPoint Export Profiles with comprehensive configuration for page layout, timeline settings, task classes, and visual formatting
@@ -281,7 +423,7 @@ Version history and change tracking.
281
423
  - `cplace_get_page_diff` - Compare page states between two timestamps and return the differences
282
424
  - `cplace_get_page_changesets_summary` - Get a summary of recent changes for a page (convenience tool for last 7 days by default)
283
425
 
284
- ### CSV Export (Profile: csv_export)
426
+ ### CSV Export (Profile: csv-export)
285
427
  CSV export functionality for search results.
286
428
 
287
429
  - `cplace_search_pages_csv` - Export search results to CSV format
@@ -294,10 +436,3 @@ Schedule analysis and cross-schedule dependencies.
294
436
  ## Development
295
437
 
296
438
  For development setup, contribution guidelines, and extending the server, see [DEVELOPMENT.md](DEVELOPMENT.md).
297
-
298
- ## Troubleshooting
299
-
300
- ### 404 Errors
301
- If you're getting 404 errors, ensure your `CPLACE_URL` ends with a forward slash (`/`) when working with a tenant:
302
- - ✅ Correct: `https://your-cplace-instance.com/your-tenant/`
303
- - ❌ Incorrect: `https://your-cplace-instance.com/your-tenant`
@@ -1 +1 @@
1
- {"version":3,"file":"conditional-registration.d.ts","sourceRoot":"","sources":["../src/conditional-registration.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAuC3C,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,eAAe,EACvB,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,GACxB,IAAI,CAeN"}
1
+ {"version":3,"file":"conditional-registration.d.ts","sourceRoot":"","sources":["../src/conditional-registration.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAuD3C,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,eAAe,EACvB,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,GACxB,IAAI,CAeN"}
@@ -1,8 +1,11 @@
1
1
  import { getRequiredModules } from './profiles.js';
2
2
  import { debugLogWithTag } from './logger.js';
3
- import { registerWorkspaceTools } from './tools/workspace.js';
3
+ import { registerWorkspaceCoreTools } from './tools/workspace-core.js';
4
+ import { registerWorkspaceAdminTools } from './tools/workspace-admin.js';
5
+ import { registerTypeManagementTools } from './tools/type-management.js';
4
6
  import { registerPageTools } from './tools/pages.js';
5
7
  import { registerSearchTools } from './tools/search.js';
8
+ import { registerCsvExportTools } from './tools/csv-export.js';
6
9
  import { registerUserTools } from './tools/users.js';
7
10
  import { registerReferenceTools } from './tools/references.js';
8
11
  import { registerWidgetTools } from './tools/widgets.js';
@@ -13,10 +16,18 @@ import { registerValidatorTools } from './tools/validators.js';
13
16
  import { registerPPTExportProfileTools } from './tools/ppt-export.js';
14
17
  import { registerScheduleTools } from './tools/schedule.js';
15
18
  import { registerLayoutTools } from './tools/generic-layouts.js';
19
+ import { registerRichStringWidgetTools } from './tools/richstring-widgets.js';
20
+ import { registerWorkflowTools } from './tools/workflow.js';
21
+ import { registerWorkflowScriptTools } from './tools/workflow-scripts.js';
22
+ import { registerScriptLogsTools } from './tools/script-logs.js';
23
+ import { registerGetOperationTools } from './tools/get-operations.js';
16
24
  const MODULE_REGISTRY = {
17
- 'workspace': registerWorkspaceTools,
25
+ 'workspace-core': registerWorkspaceCoreTools,
26
+ 'workspace-admin': registerWorkspaceAdminTools,
27
+ 'type-management': registerTypeManagementTools,
18
28
  'pages': registerPageTools,
19
29
  'search': registerSearchTools,
30
+ 'csv-export': registerCsvExportTools,
20
31
  'users': registerUserTools,
21
32
  'references': registerReferenceTools,
22
33
  'widgets': registerWidgetTools,
@@ -26,7 +37,12 @@ const MODULE_REGISTRY = {
26
37
  'validators': registerValidatorTools,
27
38
  'ppt-export': registerPPTExportProfileTools,
28
39
  'schedule': registerScheduleTools,
29
- 'generic-layouts': registerLayoutTools
40
+ 'generic-layouts': registerLayoutTools,
41
+ 'richstring-widgets': registerRichStringWidgetTools,
42
+ 'workflow': registerWorkflowTools,
43
+ 'workflow-scripts': registerWorkflowScriptTools,
44
+ 'script-logs': registerScriptLogsTools,
45
+ 'get-operations': registerGetOperationTools
30
46
  };
31
47
  export function registerActiveTools(server, client, activeGroups) {
32
48
  const requiredModules = getRequiredModules(activeGroups);
@@ -1 +1 @@
1
- {"version":3,"file":"conditional-registration.js","sourceRoot":"","sources":["../src/conditional-registration.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,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