@cplace/mcp-server 1.10.9 → 1.11.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.
package/README.md CHANGED
@@ -309,7 +309,7 @@ The MCP server uses a profile-based tool loading system to optimize LLM context
309
309
  | `layouts` | Widget and layout management |
310
310
  | `resource-management` | Resource planner widget configuration |
311
311
  | `types-write` | Type and attribute management |
312
- | `low-code` | Validators, change listeners, workflows, script execution, job scripts |
312
+ | `low-code` | Validators, enum providers, change listeners, workflows, script execution, job scripts |
313
313
  | `jobs` | Job monitoring and management |
314
314
  | `project-planning` | Schedule analysis and PowerPoint export |
315
315
  | `solution-management` | Solution package management and inspection |
@@ -475,13 +475,18 @@ Type and attribute creation, updates, and deletion.
475
475
  - `cplace_delete_attribute_definition` - Delete an attribute definition from a type
476
476
 
477
477
  ### Low-Code (Profile: low-code)
478
- Validators, change listeners, workflow state machines, workflow scripts, script linting, script logging, script execution, job scripts, and job schedule triggers.
478
+ Validators, enum providers, change listeners, workflow state machines, workflow scripts, script linting, script logging, script execution, job scripts, and job schedule triggers.
479
479
 
480
480
  **Validators:**
481
481
  - `cplace_get_validator_by_attribute` - Get JavaScript validator script and metadata for a specific attribute
482
482
  - `cplace_manage_validator` - Create or update JavaScript validators for attribute definitions
483
483
  - `cplace_delete_validator` - Delete a validator from an attribute definition
484
484
 
485
+ **Enum Providers:**
486
+ - `cplace_get_enum_provider_by_attribute` - Get the low-code enum provider script and the current enumeration options for an enumeration attribute
487
+ - `cplace_manage_enum_provider` - Create or update a low-code enum provider script that computes enumeration options dynamically (incl. enable/disable)
488
+ - `cplace_delete_enum_provider` - Remove an enum provider from an attribute; the last computed options remain as a static list
489
+
485
490
  **Change Listeners:**
486
491
  - `cplace_get_change_listeners_by_type` - Get all JavaScript automation scripts (change listeners) for a type
487
492
  - `cplace_manage_change_listener` - Create or update JavaScript automation scripts that execute when specified attributes change
@@ -1 +1 @@
1
- {"version":3,"file":"low-code.d.ts","sourceRoot":"","sources":["../../src/plugins/low-code.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAuCpD,eAAO,MAAM,aAAa,EAAE,SAgD3B,CAAC"}
1
+ {"version":3,"file":"low-code.d.ts","sourceRoot":"","sources":["../../src/plugins/low-code.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AA+CpD,eAAO,MAAM,aAAa,EAAE,SAwD3B,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { PLUGIN_VERSION } from './version.js';
2
2
  import { registerValidatorTools, VALIDATOR_TOOL_DEFINITIONS } from '../tools/validators.js';
3
+ import { registerEnumProviderTools, ENUM_PROVIDER_TOOL_DEFINITIONS, } from '../tools/enum-providers.js';
3
4
  import { registerChangeListenerTools, CHANGE_LISTENER_TOOL_DEFINITIONS, } from '../tools/change-listeners.js';
4
5
  import { registerWorkflowTools, WORKFLOW_TOOL_DEFINITIONS } from '../tools/workflow.js';
5
6
  import { registerWorkflowScriptTools, WORKFLOW_SCRIPT_TOOL_DEFINITIONS, } from '../tools/workflow-scripts.js';
@@ -12,6 +13,7 @@ import { registerJobScheduleTriggerTools, JOB_SCHEDULE_TRIGGER_TOOL_DEFINITIONS,
12
13
  import { registerWorkflowExecutionTools, WORKFLOW_EXECUTION_TOOL_DEFINITIONS, } from '../tools/workflow-execution.js';
13
14
  import { registerWidgetSimulationTools, WIDGET_SIMULATION_TOOL_DEFINITIONS, } from '../tools/widget-simulation.js';
14
15
  import { registerPageActionSimulationTools, PAGE_ACTION_SIMULATION_TOOL_DEFINITIONS, } from '../tools/page-action-simulation.js';
16
+ import { registerEnumProviderSimulationTools, ENUM_PROVIDER_SIMULATION_TOOL_DEFINITIONS, } from '../tools/enum-provider-simulation.js';
15
17
  import { fileURLToPath } from 'url';
16
18
  import { dirname } from 'path';
17
19
  const __filename = fileURLToPath(import.meta.url);
@@ -19,10 +21,14 @@ const __dirname = dirname(__filename);
19
21
  export const lowCodePlugin = {
20
22
  name: 'low-code',
21
23
  version: PLUGIN_VERSION,
22
- description: 'Validators, change listeners, workflow management, script logs, script execution, and job monitoring',
24
+ description: 'Validators, enum providers, change listeners, workflow management, script logs, script execution, and job monitoring',
23
25
  sourcePath: __dirname,
24
26
  modules: {
25
27
  validators: { register: registerValidatorTools, toolDefinitions: VALIDATOR_TOOL_DEFINITIONS },
28
+ 'enum-providers': {
29
+ register: registerEnumProviderTools,
30
+ toolDefinitions: ENUM_PROVIDER_TOOL_DEFINITIONS,
31
+ },
26
32
  'change-listeners': {
27
33
  register: registerChangeListenerTools,
28
34
  toolDefinitions: CHANGE_LISTENER_TOOL_DEFINITIONS,
@@ -62,6 +68,10 @@ export const lowCodePlugin = {
62
68
  register: registerPageActionSimulationTools,
63
69
  toolDefinitions: PAGE_ACTION_SIMULATION_TOOL_DEFINITIONS,
64
70
  },
71
+ 'enum-provider-simulation': {
72
+ register: registerEnumProviderSimulationTools,
73
+ toolDefinitions: ENUM_PROVIDER_SIMULATION_TOOL_DEFINITIONS,
74
+ },
65
75
  },
66
76
  };
67
77
  //# sourceMappingURL=low-code.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"low-code.js","sourceRoot":"","sources":["../../src/plugins/low-code.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAC5F,OAAO,EACL,2BAA2B,EAC3B,gCAAgC,GACjC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,EACL,2BAA2B,EAC3B,gCAAgC,GACjC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAChG,OAAO,EAAE,mBAA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;QACD,QAAQ,EAAE,EAAE,QAAQ,EAAE,qBAAqB,EAAE,eAAe,EAAE,yBAAyB,EAAE;QACzF,kBAAkB,EAAE;YAClB,QAAQ,EAAE,2BAA2B;YACrC,eAAe,EAAE,gCAAgC;SAClD;QACD,aAAa,EAAE;YACb,QAAQ,EAAE,uBAAuB;YACjC,eAAe,EAAE,4BAA4B;SAC9C;QACD,MAAM,EAAE,EAAE,QAAQ,EAAE,mBAAmB,EAAE,eAAe,EAAE,uBAAuB,EAAE;QACnF,OAAO,EAAE,EAAE,QAAQ,EAAE,oBAAoB,EAAE,eAAe,EAAE,wBAAwB,EAAE;QACtF,aAAa,EAAE;YACb,QAAQ,EAAE,uBAAuB;YACjC,eAAe,EAAE,4BAA4B;SAC9C;QACD,cAAc,EAAE;YACd,QAAQ,EAAE,wBAAwB;YAClC,eAAe,EAAE,6BAA6B;SAC/C;QACD,sBAAsB,EAAE;YACtB,QAAQ,EAAE,+BAA+B;YACzC,eAAe,EAAE,qCAAqC;SACvD;QACD,oBAAoB,EAAE;YACpB,QAAQ,EAAE,8BAA8B;YACxC,eAAe,EAAE,mCAAmC;SACrD;QACD,mBAAmB,EAAE;YACnB,QAAQ,EAAE,6BAA6B;YACvC,eAAe,EAAE,kCAAkC;SACpD;QACD,wBAAwB,EAAE;YACxB,QAAQ,EAAE,iCAAiC;YAC3C,eAAe,EAAE,uCAAuC;SACzD;QACD,0BAA0B,EAAE;YAC1B,QAAQ,EAAE,mCAAmC;YAC7C,eAAe,EAAE,yCAAyC;SAC3D;KACF;CACF,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { z } from 'zod';
3
+ import { CplaceApiClient } from '../api.js';
4
+ export declare const ENUM_PROVIDER_SIMULATION_TOOL_DEFINITIONS: {
5
+ readonly cplace_simulate_enum_provider: {
6
+ readonly description: "Execute an enum provider script under the production enum-provider engine context — without persisting anything.\n\n**Two primary use cases:**\n1. **Pre-attach testing of a candidate script.** Attaching a provider via\ncplace_manage_enum_provider is destructive: its enumOptions() result REPLACES the\nattribute's stored enumeration options and the old static list cannot be recovered.\nSimulate the candidate first to see exactly what it would compute — zero changes\nto the attribute.\n2. **Per-page filterByValues verification.** filterByValues(ownerEntity) runs per\nentity at display time only; no write triggers it, so no other tool can verify it.\nPass ownerEntityUid to see the filtered subset a specific page would show.\n\n**Four modes** from the two optional parameters:\n- no `script`, no `ownerEntityUid`: re-runs the stored provider (cheap \"does the\n stored script still run\" check; executes the attached script even when the\n provider is disabled)\n- `script` only: candidate options preview\n- `script` + `ownerEntityUid`: candidate options + filtered subset for that page\n- `ownerEntityUid` only: stored provider options + filtered subset for that page\n\n**⚠️ Mode-dependent intersection semantics for filteredOptions:**\n- **Stored mode** (no `script`) mirrors what the page shows TODAY: the\n filterByValues result is intersected with the attribute's currently stored\n elements (production's display formula).\n- **Candidate mode** (`script` given) predicts the POST-ATTACH state: the\n filterByValues result is intersected with the candidate's own enumOptions()\n output instead.\nThe same script text can therefore yield different filteredOptions in the two\nmodes. The response names the base used in `intersectionBase`\n(\"storedElements\" | \"candidateOptions\").\n\n**Response**: `mode`, `options` (the enumOptions() output as\n{value, localizedName?, icon?}), `invalidOptionValues` (only when present:\noptions whose value is missing or type-mismatched for the attribute kind), and —\nonly when `ownerEntityUid` was given — `filterByValuesPresent`,\n`filteredOptions`, `intersectionBase`. When the script has no filterByValues,\n`filterByValuesPresent` is false and `filteredOptions` equals the full\nintersection base (production: no filtering). Script errors return\n{error: {message, line}}.\n\n**Injected bindings** (replicating the production engine row — see\n`script-context-cards/enum-provider.md`): `messages` (the type's message\nprovider), `enumValues` (the stored enumeration elements as primitives),\n`defaultValues` (the attribute's default values as primitives),\n`customAttribute` (the attribute's internal name).\n**Allowed type classes**: `Search`, `Filters`. **Mode**: read-only — the\nprovider script's execution path never writes. **Timeout**: 30 seconds.\n\n**Known deviations from production**: runs with the caller's read permissions\n(production suspends read checks); plugin-extension enumeration filters\n(FilterEnumerationValuesPluginExtension) are not applied.\n\n**Script contract**: the script must end with a top-level return of an object\nwith a mandatory enumOptions() function returning an array of options\n(plain value or {value, name, icon}), and an optional\nfilterByValues(ownerEntity) function. triggerEntities()/systemTriggers() may be\npresent but are not exercised by the simulation — nothing is persisted, so no\ntrigger registration happens. Only for low-code ENUM_PROVIDER scripts —\nnot the Java-class DynamicEnumerationProvider.";
7
+ readonly inputSchema: {
8
+ readonly workspaceId: z.ZodString;
9
+ readonly typeInternalName: z.ZodString;
10
+ readonly attributeName: z.ZodString;
11
+ readonly script: z.ZodOptional<z.ZodString>;
12
+ readonly ownerEntityUid: z.ZodOptional<z.ZodString>;
13
+ };
14
+ readonly annotations: {
15
+ readonly title: "Simulate Enum Provider Script";
16
+ };
17
+ };
18
+ };
19
+ export declare function registerEnumProviderSimulationTools(server: McpServer, client: CplaceApiClient): void;
20
+ //# sourceMappingURL=enum-provider-simulation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enum-provider-simulation.d.ts","sourceRoot":"","sources":["../../src/tools/enum-provider-simulation.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;AAQ5C,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;CAwF5C,CAAC;AAEX,wBAAgB,mCAAmC,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,QAsE7F"}
@@ -0,0 +1,139 @@
1
+ import { z } from 'zod';
2
+ import { debugLogWithTag } from '../logger.js';
3
+ import { checkResponseSize } from '../utils.js';
4
+ import { CPLACEJS_COMMON_API_CHEAT_SHEET } from './common-schemas.js';
5
+ import { formatEnumProviderError } from './enum-providers.js';
6
+ const TOOL_SIMULATE_ENUM_PROVIDER = 'cplace_simulate_enum_provider';
7
+ export const ENUM_PROVIDER_SIMULATION_TOOL_DEFINITIONS = {
8
+ [TOOL_SIMULATE_ENUM_PROVIDER]: {
9
+ description: `Execute an enum provider script under the production enum-provider engine context — without persisting anything.
10
+
11
+ **Two primary use cases:**
12
+ 1. **Pre-attach testing of a candidate script.** Attaching a provider via
13
+ cplace_manage_enum_provider is destructive: its enumOptions() result REPLACES the
14
+ attribute's stored enumeration options and the old static list cannot be recovered.
15
+ Simulate the candidate first to see exactly what it would compute — zero changes
16
+ to the attribute.
17
+ 2. **Per-page filterByValues verification.** filterByValues(ownerEntity) runs per
18
+ entity at display time only; no write triggers it, so no other tool can verify it.
19
+ Pass ownerEntityUid to see the filtered subset a specific page would show.
20
+
21
+ **Four modes** from the two optional parameters:
22
+ - no \`script\`, no \`ownerEntityUid\`: re-runs the stored provider (cheap "does the
23
+ stored script still run" check; executes the attached script even when the
24
+ provider is disabled)
25
+ - \`script\` only: candidate options preview
26
+ - \`script\` + \`ownerEntityUid\`: candidate options + filtered subset for that page
27
+ - \`ownerEntityUid\` only: stored provider options + filtered subset for that page
28
+
29
+ **⚠️ Mode-dependent intersection semantics for filteredOptions:**
30
+ - **Stored mode** (no \`script\`) mirrors what the page shows TODAY: the
31
+ filterByValues result is intersected with the attribute's currently stored
32
+ elements (production's display formula).
33
+ - **Candidate mode** (\`script\` given) predicts the POST-ATTACH state: the
34
+ filterByValues result is intersected with the candidate's own enumOptions()
35
+ output instead.
36
+ The same script text can therefore yield different filteredOptions in the two
37
+ modes. The response names the base used in \`intersectionBase\`
38
+ ("storedElements" | "candidateOptions").
39
+
40
+ **Response**: \`mode\`, \`options\` (the enumOptions() output as
41
+ {value, localizedName?, icon?}), \`invalidOptionValues\` (only when present:
42
+ options whose value is missing or type-mismatched for the attribute kind), and —
43
+ only when \`ownerEntityUid\` was given — \`filterByValuesPresent\`,
44
+ \`filteredOptions\`, \`intersectionBase\`. When the script has no filterByValues,
45
+ \`filterByValuesPresent\` is false and \`filteredOptions\` equals the full
46
+ intersection base (production: no filtering). Script errors return
47
+ {error: {message, line}}.
48
+
49
+ **Injected bindings** (replicating the production engine row — see
50
+ \`script-context-cards/enum-provider.md\`): \`messages\` (the type's message
51
+ provider), \`enumValues\` (the stored enumeration elements as primitives),
52
+ \`defaultValues\` (the attribute's default values as primitives),
53
+ \`customAttribute\` (the attribute's internal name).
54
+ **Allowed type classes**: \`Search\`, \`Filters\`. **Mode**: read-only — the
55
+ provider script's execution path never writes. **Timeout**: 30 seconds.
56
+
57
+ **Known deviations from production**: runs with the caller's read permissions
58
+ (production suspends read checks); plugin-extension enumeration filters
59
+ (FilterEnumerationValuesPluginExtension) are not applied.
60
+
61
+ **Script contract**: the script must end with a top-level return of an object
62
+ with a mandatory enumOptions() function returning an array of options
63
+ (plain value or {value, name, icon}), and an optional
64
+ filterByValues(ownerEntity) function. triggerEntities()/systemTriggers() may be
65
+ present but are not exercised by the simulation — nothing is persisted, so no
66
+ trigger registration happens. Only for low-code ENUM_PROVIDER scripts —
67
+ not the Java-class DynamicEnumerationProvider.`,
68
+ inputSchema: {
69
+ workspaceId: z.string().describe("The workspace identifier (e.g., 'abc123')"),
70
+ typeInternalName: z
71
+ .string()
72
+ .describe("The internal name of the type definition (e.g., 'cf.example.task')"),
73
+ attributeName: z
74
+ .string()
75
+ .describe("The name of the textEnumeration or numberEnumeration attribute (e.g., 'taskCategory')"),
76
+ script: z
77
+ .string()
78
+ .optional()
79
+ .describe(`Candidate enum provider script to simulate (candidate mode). When omitted, the attribute's stored provider script is simulated instead (stored mode).
80
+ The script must end with a top-level return of an object with a mandatory enumOptions() function returning an array of options ('alpha' or { value: 'alpha', name: { en: 'Alpha' }, icon: 'fa-flag' }), and an optional filterByValues(ownerEntity) function.` +
81
+ CPLACEJS_COMMON_API_CHEAT_SHEET),
82
+ ownerEntityUid: z
83
+ .string()
84
+ .optional()
85
+ .describe('Page UID bound as `ownerEntity` for filterByValues. When given, the response also contains filteredOptions (the subset this page would show) and intersectionBase. Must be an existing page.'),
86
+ },
87
+ annotations: { title: 'Simulate Enum Provider Script' },
88
+ },
89
+ };
90
+ export function registerEnumProviderSimulationTools(server, client) {
91
+ server.registerTool(TOOL_SIMULATE_ENUM_PROVIDER, ENUM_PROVIDER_SIMULATION_TOOL_DEFINITIONS[TOOL_SIMULATE_ENUM_PROVIDER], async ({ workspaceId, typeInternalName, attributeName, script, ownerEntityUid }) => {
92
+ debugLogWithTag('ENUM_PROVIDER_SIM', `Simulating enum provider (${script ? 'candidate' : 'stored'} mode) attribute=${attributeName} type=${typeInternalName}${ownerEntityUid ? ` ownerEntity=${ownerEntityUid}` : ''}`);
93
+ try {
94
+ const requestBody = {
95
+ workspaceId,
96
+ typeInternalName,
97
+ attributeName,
98
+ };
99
+ if (script !== undefined) {
100
+ requestBody.script = script;
101
+ }
102
+ if (ownerEntityUid !== undefined) {
103
+ requestBody.ownerEntityUid = ownerEntityUid;
104
+ }
105
+ const response = await client.makeApiRequest('json/enum-provider/simulateScript', 'POST', undefined, requestBody);
106
+ const result = { result: response };
107
+ const sizeCheck = checkResponseSize(result);
108
+ if (sizeCheck.tooLarge) {
109
+ debugLogWithTag('ENUM_PROVIDER_SIM', `Response too large: ${sizeCheck.actualSize} characters`);
110
+ return {
111
+ content: [
112
+ {
113
+ type: 'text',
114
+ text: `Enum provider simulation result too large (${sizeCheck.actualSize} characters). Modify your script to return less data.`,
115
+ },
116
+ ],
117
+ isError: true,
118
+ };
119
+ }
120
+ debugLogWithTag('ENUM_PROVIDER_SIM', 'Enum provider script simulated successfully');
121
+ return {
122
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
123
+ };
124
+ }
125
+ catch (error) {
126
+ debugLogWithTag('ENUM_PROVIDER_SIM', `Error: ${error instanceof Error ? error.message : String(error)}`);
127
+ return {
128
+ content: [
129
+ {
130
+ type: 'text',
131
+ text: formatEnumProviderError('Error simulating enum provider', error),
132
+ },
133
+ ],
134
+ isError: true,
135
+ };
136
+ }
137
+ });
138
+ }
139
+ //# sourceMappingURL=enum-provider-simulation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enum-provider-simulation.js","sourceRoot":"","sources":["../../src/tools/enum-provider-simulation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,MAAM,2BAA2B,GAAG,+BAA+B,CAAC;AAEpE,MAAM,CAAC,MAAM,yCAAyC,GAAG;IACvD,CAAC,2BAA2B,CAAC,EAAE;QAC7B,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+CA0D8B;QAC3C,WAAW,EAAE;YACX,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;YAC7E,gBAAgB,EAAE,CAAC;iBAChB,MAAM,EAAE;iBACR,QAAQ,CAAC,oEAAoE,CAAC;YACjF,aAAa,EAAE,CAAC;iBACb,MAAM,EAAE;iBACR,QAAQ,CACP,uFAAuF,CACxF;YACH,MAAM,EAAE,CAAC;iBACN,MAAM,EAAE;iBACR,QAAQ,EAAE;iBACV,QAAQ,CACP;8PACoP;gBAClP,+BAA+B,CAClC;YACH,cAAc,EAAE,CAAC;iBACd,MAAM,EAAE;iBACR,QAAQ,EAAE;iBACV,QAAQ,CACP,8LAA8L,CAC/L;SACJ;QACD,WAAW,EAAE,EAAE,KAAK,EAAE,+BAA+B,EAAE;KACxD;CACO,CAAC;AAEX,MAAM,UAAU,mCAAmC,CAAC,MAAiB,EAAE,MAAuB;IAC5F,MAAM,CAAC,YAAY,CACjB,2BAA2B,EAC3B,yCAAyC,CAAC,2BAA2B,CAAC,EACtE,KAAK,EAAE,EA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I,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;aAC5E,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,eAAe,CACb,mBAAmB,EACnB,UAAU,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CACnE,CAAC;YACF,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,uBAAuB,CAAC,gCAAgC,EAAE,KAAK,CAAC;qBACvE;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { z } from 'zod';
3
+ import { CplaceApiClient } from '../api.js';
4
+ export declare function formatEnumProviderError(prefix: string, error: unknown): string;
5
+ export declare const ENUM_PROVIDER_TOOL_DEFINITIONS: {
6
+ readonly cplace_get_enum_provider_by_attribute: {
7
+ readonly description: string;
8
+ readonly inputSchema: {
9
+ readonly workspaceId: z.ZodString;
10
+ readonly typeInternalName: z.ZodString;
11
+ readonly attributeName: z.ZodString;
12
+ };
13
+ readonly annotations: {
14
+ readonly title: "Get Enum Provider by Attribute";
15
+ };
16
+ };
17
+ readonly cplace_manage_enum_provider: {
18
+ readonly description: string;
19
+ readonly inputSchema: {
20
+ readonly operation: z.ZodEnum<["create", "update"]>;
21
+ readonly workspaceId: z.ZodString;
22
+ readonly typeInternalName: z.ZodString;
23
+ readonly attributeName: z.ZodString;
24
+ readonly script: z.ZodOptional<z.ZodString>;
25
+ readonly enabled: z.ZodOptional<z.ZodBoolean>;
26
+ readonly description: z.ZodOptional<z.ZodString>;
27
+ };
28
+ readonly annotations: {
29
+ readonly title: "Manage Enum Provider";
30
+ };
31
+ };
32
+ readonly cplace_delete_enum_provider: {
33
+ readonly description: string;
34
+ readonly inputSchema: {
35
+ readonly workspaceId: z.ZodString;
36
+ readonly typeInternalName: z.ZodString;
37
+ readonly attributeName: z.ZodString;
38
+ };
39
+ readonly annotations: {
40
+ readonly title: "Delete Enum Provider";
41
+ };
42
+ };
43
+ };
44
+ export declare function registerEnumProviderTools(server: McpServer, client: CplaceApiClient): void;
45
+ //# sourceMappingURL=enum-providers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enum-providers.d.ts","sourceRoot":"","sources":["../../src/tools/enum-providers.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;AAuB5C,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM,CAM9E;AAGD,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+DjC,CAAC;AAEX,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,QA6JnF"}
@@ -0,0 +1,190 @@
1
+ import { z } from 'zod';
2
+ import { debugLogWithTag } from '../logger.js';
3
+ const TOOL_GET_ENUM_PROVIDER_BY_ATTRIBUTE = 'cplace_get_enum_provider_by_attribute';
4
+ const TOOL_MANAGE_ENUM_PROVIDER = 'cplace_manage_enum_provider';
5
+ const TOOL_DELETE_ENUM_PROVIDER = 'cplace_delete_enum_provider';
6
+ const SCRIPT_PARAMETER_DESCRIPTION = '⚠️ REQUIRED for create: Review cplace Low-Code documentation before writing enum provider scripts (https://docs.cplace.io/lowcode/features/enumeration-provider/). ' +
7
+ 'The script must end with a top-level return of an object containing a mandatory enumOptions() function that returns an array of options. ' +
8
+ "Each option is a plain value ('alpha') or an object { value: 'alpha', name: { en: 'Alpha' }, icon: 'fa-flag' } (name accepts a string or a localized object; icon is optional). " +
9
+ 'Optional functions: filterByValues(ownerEntity) — narrows the visible options per entity at display time. ' +
10
+ "triggerEntities() — returns an array of entity UIDs (e.g. 'page/<id>'); when any of those entities is created, updated, or deleted, cplace automatically re-runs enumOptions() and replaces the stored options. " +
11
+ "systemTriggers() — returns an array of 'SPACES' | 'TYPES' | 'ATTRIBUTES' (case-insensitive) to re-run enumOptions() whenever any workspace, type definition, or attribute definition changes. " +
12
+ 'Both trigger functions are evaluated and registered when the script is saved; invalid UIDs or unknown system-trigger values make the save fail. ' +
13
+ 'Without them, the stored options only refresh on script save or via cplace.actions().updateEnumOptions(...). Triggers affect enumOptions() only — never filterByValues().';
14
+ export function formatEnumProviderError(prefix, error) {
15
+ const message = error instanceof Error ? error.message : String(error);
16
+ if (message.includes('(Status: 404)')) {
17
+ return `${prefix}: ${message}\nThis may mean the cplace instance does not yet support enum provider endpoints. Check with cplace_check_version_compatibility.`;
18
+ }
19
+ return `${prefix}: ${message}`;
20
+ }
21
+ export const ENUM_PROVIDER_TOOL_DEFINITIONS = {
22
+ [TOOL_GET_ENUM_PROVIDER_BY_ATTRIBUTE]: {
23
+ description: 'Retrieves the low-code enumeration provider script and metadata for a textEnumeration or numberEnumeration attribute, including the currently stored enumeration options (values, labels, icons). ' +
24
+ 'Returns workspace, type, and attribute context; the elements are returned even when no provider exists. ' +
25
+ 'Not related to the Java-class DynamicEnumerationProvider used by dynamicEnumeration attributes.',
26
+ inputSchema: {
27
+ workspaceId: z.string().describe("The workspace identifier (e.g., 'abc123')"),
28
+ typeInternalName: z
29
+ .string()
30
+ .describe("The internal name of the type definition (e.g., 'cf.example.task')"),
31
+ attributeName: z.string().describe("The name of the attribute (e.g., 'taskCategory')"),
32
+ },
33
+ annotations: { title: 'Get Enum Provider by Attribute' },
34
+ },
35
+ [TOOL_MANAGE_ENUM_PROVIDER]: {
36
+ description: 'Create or update a low-code enumeration provider script on a textEnumeration or numberEnumeration attribute. ' +
37
+ 'The script must return an object with a mandatory enumOptions() function — its result REPLACES the stored enumeration options on save, and the response includes the computed options for verification. ' +
38
+ 'Optional functions: filterByValues(ownerEntity) (narrows the visible options per entity at display time — not reflected in the computed options), triggerEntities(), systemTriggers(). ' +
39
+ 'Invalid scripts are rejected on save with a specific validation message. ' +
40
+ 'Setting enabled: false disables the provider without deleting it (current options stay unchanged); re-enabling recomputes the options. ' +
41
+ 'Only for low-code ENUM_PROVIDER scripts — not the Java-class DynamicEnumerationProvider.',
42
+ inputSchema: {
43
+ operation: z
44
+ .enum(['create', 'update'])
45
+ .describe("Operation type: 'create' for new enum providers, 'update' for existing enum providers"),
46
+ workspaceId: z.string().describe("Required: Target workspace identifier (e.g., 'abc123')"),
47
+ typeInternalName: z
48
+ .string()
49
+ .describe("Required: Target type internal name (e.g., 'cf.example.task')"),
50
+ attributeName: z.string().describe("Required: Target attribute name (e.g., 'taskCategory')"),
51
+ script: z.string().optional().describe(SCRIPT_PARAMETER_DESCRIPTION),
52
+ enabled: z
53
+ .boolean()
54
+ .optional()
55
+ .describe('Whether the provider is active. Disabled providers are skipped; the current enumeration options remain unchanged. Defaults to true on create.'),
56
+ description: z
57
+ .string()
58
+ .optional()
59
+ .describe('Optional: Human-readable description of the enum provider'),
60
+ },
61
+ annotations: { title: 'Manage Enum Provider' },
62
+ },
63
+ [TOOL_DELETE_ENUM_PROVIDER]: {
64
+ description: 'Removes the low-code enumeration provider script from an attribute. The last computed enumeration options remain as a static list; the attribute becomes a normal static enumeration. ' +
65
+ 'To temporarily turn a provider off without losing the script, use cplace_manage_enum_provider with enabled: false instead.',
66
+ inputSchema: {
67
+ workspaceId: z.string().describe("The workspace identifier (e.g., 'abc123')"),
68
+ typeInternalName: z
69
+ .string()
70
+ .describe("The internal name of the type definition (e.g., 'cf.example.task')"),
71
+ attributeName: z
72
+ .string()
73
+ .describe("The name of the attribute whose enum provider to delete (e.g., 'taskCategory')"),
74
+ },
75
+ annotations: { title: 'Delete Enum Provider' },
76
+ },
77
+ };
78
+ export function registerEnumProviderTools(server, client) {
79
+ server.registerTool(TOOL_GET_ENUM_PROVIDER_BY_ATTRIBUTE, ENUM_PROVIDER_TOOL_DEFINITIONS[TOOL_GET_ENUM_PROVIDER_BY_ATTRIBUTE], async ({ workspaceId, typeInternalName, attributeName }) => {
80
+ try {
81
+ const result = await client.makeApiRequest('json/enum-provider', 'GET', {
82
+ workspaceId,
83
+ typeInternalName,
84
+ attributeName,
85
+ });
86
+ return {
87
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
88
+ };
89
+ }
90
+ catch (error) {
91
+ return {
92
+ content: [
93
+ {
94
+ type: 'text',
95
+ text: formatEnumProviderError('Error retrieving enum provider', error),
96
+ },
97
+ ],
98
+ isError: true,
99
+ };
100
+ }
101
+ });
102
+ server.registerTool(TOOL_MANAGE_ENUM_PROVIDER, ENUM_PROVIDER_TOOL_DEFINITIONS[TOOL_MANAGE_ENUM_PROVIDER], async (params) => {
103
+ try {
104
+ if (params.operation === 'create') {
105
+ if (!params.script) {
106
+ return {
107
+ content: [
108
+ { type: 'text', text: 'Error: Create operation requires script parameter' },
109
+ ],
110
+ isError: true,
111
+ };
112
+ }
113
+ const requestBody = {
114
+ workspaceId: params.workspaceId,
115
+ typeInternalName: params.typeInternalName,
116
+ attributeName: params.attributeName,
117
+ script: params.script,
118
+ };
119
+ if (params.enabled !== undefined) {
120
+ requestBody.enabled = params.enabled;
121
+ }
122
+ if (params.description) {
123
+ requestBody.description = params.description;
124
+ }
125
+ const result = await client.makeApiRequest('json/enum-provider', 'POST', undefined, requestBody);
126
+ return {
127
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
128
+ };
129
+ }
130
+ else {
131
+ const requestBody = {
132
+ workspaceId: params.workspaceId,
133
+ typeInternalName: params.typeInternalName,
134
+ attributeName: params.attributeName,
135
+ };
136
+ if (params.script !== undefined) {
137
+ requestBody.script = params.script;
138
+ }
139
+ if (params.enabled !== undefined) {
140
+ requestBody.enabled = params.enabled;
141
+ }
142
+ if (params.description !== undefined) {
143
+ requestBody.description = params.description;
144
+ }
145
+ const result = await client.makeApiRequest('json/enum-provider', 'PATCH', undefined, requestBody);
146
+ return {
147
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
148
+ };
149
+ }
150
+ }
151
+ catch (error) {
152
+ const operationText = params.operation === 'create' ? 'creating' : 'updating';
153
+ return {
154
+ content: [
155
+ {
156
+ type: 'text',
157
+ text: formatEnumProviderError(`Error ${operationText} enum provider`, error),
158
+ },
159
+ ],
160
+ isError: true,
161
+ };
162
+ }
163
+ });
164
+ server.registerTool(TOOL_DELETE_ENUM_PROVIDER, ENUM_PROVIDER_TOOL_DEFINITIONS[TOOL_DELETE_ENUM_PROVIDER], async ({ workspaceId, typeInternalName, attributeName }) => {
165
+ debugLogWithTag('ENUM_PROVIDER_DELETE', `Deleting enum provider for attribute '${attributeName}' on type '${typeInternalName}'`);
166
+ try {
167
+ const result = await client.makeApiRequest('json/enum-provider', 'DELETE', {
168
+ workspaceId,
169
+ typeInternalName,
170
+ attributeName,
171
+ });
172
+ debugLogWithTag('ENUM_PROVIDER_DELETE', `Successfully deleted enum provider for attribute '${attributeName}'`);
173
+ return {
174
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
175
+ };
176
+ }
177
+ catch (error) {
178
+ return {
179
+ content: [
180
+ {
181
+ type: 'text',
182
+ text: formatEnumProviderError('Error deleting enum provider', error),
183
+ },
184
+ ],
185
+ isError: true,
186
+ };
187
+ }
188
+ });
189
+ }
190
+ //# sourceMappingURL=enum-providers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enum-providers.js","sourceRoot":"","sources":["../../src/tools/enum-providers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C,MAAM,mCAAmC,GAAG,uCAA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C;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cplace/mcp-server",
3
- "version": "1.10.9",
3
+ "version": "1.11.0",
4
4
  "description": "MCP server that provides Claude Desktop with tools to interact with cplace APIs",
5
5
  "main": "dist/public-api.js",
6
6
  "types": "dist/public-api.d.ts",