genexus-mcp 2.4.2 → 2.5.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 +53 -2
- package/package.json +1 -1
- package/publish/GxMcp.Gateway.deps.json +2 -2
- package/publish/GxMcp.Gateway.dll +0 -0
- package/publish/GxMcp.Gateway.exe +0 -0
- package/publish/GxMcp.Gateway.pdb +0 -0
- package/publish/config.json +19 -19
- package/publish/worker/GxMcp.Worker.exe +0 -0
- package/publish/worker/GxMcp.Worker.pdb +0 -0
package/README.md
CHANGED
|
@@ -116,6 +116,14 @@ Once installed, here's what unlocks. Try these as your first prompts:
|
|
|
116
116
|
- *"Add a new attribute CreatedAt of type DateTime to the Customer transaction."*
|
|
117
117
|
- *"Rename the variable &qty to &quantity in procedure CreateOrder."*
|
|
118
118
|
|
|
119
|
+
**WorkWithPlus pattern editing** (full structural + theming control)
|
|
120
|
+
- *"In WorkWithPlusOrder, add a 'Duplicate' button to the transaction view alongside Save/Cancel/Delete."*
|
|
121
|
+
- *"Group the Customer transaction attributes into a 'Contact Info' section with theme class GroupTelaResp."*
|
|
122
|
+
- *"On the WorkWithPlusInvoice list, add a new ordering by InvoiceDate descending."*
|
|
123
|
+
- *"Style the Save button on WorkWithPlusOrder with buttonClass='btn ButtonGreen' and apply BigTitle to the form header."*
|
|
124
|
+
- *"Remove the Export action from the Selection grid of WorkWithPlusReport."*
|
|
125
|
+
- *"Read the Documentation part of the transaction Customer and rewrite it in markdown."*
|
|
126
|
+
|
|
119
127
|
**Analysis**
|
|
120
128
|
- *"Explain what the procedure ProcessShipment does, step by step."*
|
|
121
129
|
- *"What SQL does the query in WebPanel CustomerList generate?"*
|
|
@@ -170,16 +178,59 @@ The worker exposes these tool families to the MCP router. *(Detailed schemas in
|
|
|
170
178
|
- **Lifecycle & Build** — `genexus_lifecycle`, `genexus_test`, `genexus_format`
|
|
171
179
|
- **Native Layout SDK** — `genexus_layout` (`get_tree`, `find_controls`, `set_property`, `rename_printblock`, `add_printblock`, `get_preview`, …)
|
|
172
180
|
- **KB pool (v2.3.0+)** — `genexus_kb` (`list`, `open`, `close`, `set_default`) for multi-KB parallel work
|
|
173
|
-
- **
|
|
181
|
+
- **WorkWithPlus pattern editing** — full read/write of `PatternInstance` and `PatternVirtual` parts via `genexus_read` / `genexus_edit`. Supports the entire pattern XML surface: containers (`<table>`, groups), controls (`<textBlock>`, `<errorViewer>`, `<attribute>`, `<gridAttribute>`, `<filterAttribute>`), actions (`<standardAction>`, `<userAction>`), grids, orders, rules, and event blocks. Both **Transaction** and **Selection** views are addressable independently (XPath `/instance/transaction/...` vs `/instance/level/selection/...`).
|
|
182
|
+
- **Documentation & Help parts** — `Documentation` (rich text / markdown) and `Help` (HTML) are now first-class write targets via `genexus_edit` (fixed in v2.4.4 — both parts had a silent no-op bug previously).
|
|
183
|
+
- **Theme classes & styling** — apply real ThemeClass values (`themeClass`, `buttonClass`, `groupThemeClass`, `cellThemeClass`, etc) so generated screens use the KB's design system. Discover the available classes with `genexus_list_objects --typeFilter ThemeClass --nameFilter <Button|TextBlock|Title>` and apply them in the pattern XML.
|
|
174
184
|
|
|
175
185
|
> **Multi-KB (v2.3.0+):** every non-meta tool takes an optional `kb` argument (alias or absolute path). The gateway can hold up to `Server.MaxOpenKbs` (default 3) KBs open at once, each in its own Worker process — calls to different KBs run truly in parallel. See [Advanced Configuration](#advanced-configuration) for the `KBs[]` schema.
|
|
176
186
|
|
|
177
|
-
**Edit modes** (`genexus_edit`): `
|
|
187
|
+
**Edit modes** (`genexus_edit`): `full` (whole-part replacement, default), `patch` (Replace/Insert_After/Append over a context anchor — works on source code AND pattern XML), `ops` (typed semantic ops like `set_attribute`, `add_rule` for source-bearing parts).
|
|
188
|
+
|
|
189
|
+
**Pattern XML auto-reconcile**: WorkWithPlus encodes IDE rendering order in a per-parent `childrenOrderedList` attribute. The MCP now rebuilds (and **creates if missing**) every list from the actual XML child order on each write — callers only describe *where* an element goes in the tree and the MCP makes the IDE render it there. The response includes a `childrenOrderedListReconciliation` block listing each (re)written parent plus any structural elements that couldn't be inferred safely.
|
|
178
190
|
|
|
179
191
|
**Safe by default**: all write tools accept `dryRun: true` (returns a preview without mutating the KB) and `idempotencyKey` (safe retries; concurrent calls coalesce, results cached 15 min).
|
|
180
192
|
|
|
181
193
|
---
|
|
182
194
|
|
|
195
|
+
## WorkWithPlus pattern editing — what you can actually do
|
|
196
|
+
|
|
197
|
+
WorkWithPlus patterns are XML documents that drive Transaction-and-Selection screens. The MCP exposes the entire surface so an agent can design or restructure a screen without opening the IDE:
|
|
198
|
+
|
|
199
|
+
| Capability | Tool / pattern | Status |
|
|
200
|
+
|---|---|---|
|
|
201
|
+
| Read `PatternInstance` / `PatternVirtual` XML | `genexus_read --part PatternInstance` | ✅ |
|
|
202
|
+
| Replace whole pattern (`mode: full`) | `genexus_edit --mode full --part PatternInstance` | ✅ verified live |
|
|
203
|
+
| Find/replace text-style patches (`mode: patch`) | `genexus_edit --mode patch --part PatternInstance --operation Replace` | ✅ verified live |
|
|
204
|
+
| Add / remove / reorder structural elements (textBlock, attribute, standardAction, table-as-group, order, filterAttribute, gridAttribute, eventBlock…) | XML edit + auto-reconcile | ✅ verified live |
|
|
205
|
+
| Theme classes (`themeClass`, `buttonClass`, `groupThemeClass`, `cellThemeClass`, `format="HTML"`) | XML attribute on the element | ✅ verified live |
|
|
206
|
+
| Reorganize Transaction view (form layout, action row) | edit under `/instance/transaction/...` | ✅ verified live |
|
|
207
|
+
| Reorganize Selection view (list/grid, filters, orders) | edit under `/instance/level/selection/...` | ✅ verified live |
|
|
208
|
+
| Auto-rebuild `childrenOrderedList` from XML order | done implicitly on every write; report under `childrenOrderedListReconciliation` | ✅ verified live |
|
|
209
|
+
|
|
210
|
+
**Recommended workflow for a screen redesign:**
|
|
211
|
+
|
|
212
|
+
1. `genexus_list_objects --typeFilter ThemeClass --nameFilter Button` — discover the actual button classes available in this KB (`ButtonGreen`, `ButtonBlue`, `ButtonRed`, etc — names vary per KB).
|
|
213
|
+
2. `genexus_read --name WorkWithPlus<Object> --part PatternInstance` — get the current XML.
|
|
214
|
+
3. Edit the XML in memory (LLM): wrap attributes in a `<table isGroup="True" title="…" groupThemeClass="GroupTelaResp">`, reorder buttons, add a new `<standardAction>`, attach `buttonClass="btn ButtonGreen"`, etc.
|
|
215
|
+
4. `genexus_edit --mode full --part PatternInstance --content "<new xml>"` — the MCP rewrites the part, reconciles `childrenOrderedList` on every container, and verifies the round-trip.
|
|
216
|
+
5. Read back to confirm; refresh the GeneXus IDE to see the result.
|
|
217
|
+
|
|
218
|
+
**Custom buttons use `<userAction>`, not `<standardAction>`.** `Trn_Enter` / `Trn_Cancel` / `Trn_Delete` are the only registered standard actions on a WorkWithPlus transaction; any custom button (Duplicate, Audit, Export, etc.) must be a `<userAction caption="…" name="…" buttonClass="btn ButtonGreen" confirm="False" />`. The MCP's reconciler treats `<userAction>` as a peer of `<standardAction>` (same typeCode 17/18 by context), so they coexist in the same `TableActions` row and the IDE renders them side-by-side.
|
|
219
|
+
|
|
220
|
+
**Things to know (orientation, not gotchas):**
|
|
221
|
+
|
|
222
|
+
- **WorkWithPlus normalizes some attributes after every save.** Certain fields are bound to the underlying transaction (e.g., `title` on top-level groups derives from the transaction's friendly name). When `"Apply this pattern on save"` is enabled on the WorkWithPlus object, the engine recomputes those fields — same behavior whether you edit in the IDE or via MCP. To make a hard override stick, toggle that flag via MCP:
|
|
223
|
+
```jsonc
|
|
224
|
+
{ "tool": "genexus_properties",
|
|
225
|
+
"arguments": { "action": "set", "name": "WorkWithPlus<Object>",
|
|
226
|
+
"propertyName": "SDPlus_Editor_Apply_On_Save", "value": "False" } }
|
|
227
|
+
```
|
|
228
|
+
Accepts `"True" | "False" | "Default"` (Default inherits the KB-level setting). Set back to `"Default"` to re-enable engine recomputation. Validated live in this repo.
|
|
229
|
+
- **Structural safety is enforced by the SDK.** If you submit XML that violates pattern invariants (e.g., a `<transaction>` without a `<level>`, or a `<standardAction>` whose `name` isn't a registered action), the SDK rejects the save and the MCP returns the exact error so you can fix the input. The KB never ends up half-written.
|
|
230
|
+
- **The IDE Pattern preview is a structural mockup, not a styled render.** Theme CSS (`buttonClass`, `themeClass`, fonts, colors) is resolved at runtime, not in the preview canvas — so even after a successful MCP write the preview pane will look generic. To verify styling: open the element in the IDE tree and check the right-hand **Properties panel** (the applied classes show there), or hit **Run / Live Editing** to see the real CSS. This is GeneXus IDE behavior, independent of how the pattern was edited.
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
183
234
|
## AXI CLI (for agents and automation)
|
|
184
235
|
|
|
185
236
|
The `genexus-mcp` command itself is also an agent-facing CLI with token-optimized output:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "genexus-mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"mcpName": "io.github.lennix1337/genexus",
|
|
5
5
|
"description": "GeneXus 18 MCP server — read, edit, and analyze GeneXus knowledge base objects (transactions, web panels, procedures, SDTs) directly from Claude, Cursor, and other AI agents over the Model Context Protocol.",
|
|
6
6
|
"keywords": [
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"targets": {
|
|
8
8
|
".NETCoreApp,Version=v8.0": {},
|
|
9
9
|
".NETCoreApp,Version=v8.0/win-x64": {
|
|
10
|
-
"GxMcp.Gateway/2.
|
|
10
|
+
"GxMcp.Gateway/2.5.0": {
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"Newtonsoft.Json": "13.0.3",
|
|
13
13
|
"System.Management": "10.0.5",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
"libraries": {
|
|
69
|
-
"GxMcp.Gateway/2.
|
|
69
|
+
"GxMcp.Gateway/2.5.0": {
|
|
70
70
|
"type": "project",
|
|
71
71
|
"serviceable": false,
|
|
72
72
|
"sha512": ""
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/publish/config.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
{
|
|
2
|
-
"GeneXus": {
|
|
3
|
-
"InstallationPath": "C:\\Program Files (x86)\\GeneXus\\GeneXus18",
|
|
4
|
-
"WorkerExecutable": "C:\\Projetos\\Genexus18MCP\\publish\\worker\\GxMcp.Worker.exe"
|
|
5
|
-
},
|
|
6
|
-
"Server": {
|
|
7
|
-
"HttpPort": 5000,
|
|
8
|
-
"McpStdio": true,
|
|
9
|
-
"BindAddress": "127.0.0.1"
|
|
10
|
-
},
|
|
11
|
-
"Logging": {
|
|
12
|
-
"Level": "Debug",
|
|
13
|
-
"Path": "logs"
|
|
14
|
-
},
|
|
15
|
-
"Environment": {
|
|
16
|
-
"KBPath": "C:\\KBs\\AcademicoHomolog1",
|
|
17
|
-
"GX_SHADOW_PATH": "C:\\Projetos\\Genexus18MCP\\.gx_mirror",
|
|
18
|
-
"DefaultKb": "academicohomolog1"
|
|
19
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"GeneXus": {
|
|
3
|
+
"InstallationPath": "C:\\Program Files (x86)\\GeneXus\\GeneXus18",
|
|
4
|
+
"WorkerExecutable": "C:\\Projetos\\Genexus18MCP\\publish\\worker\\GxMcp.Worker.exe"
|
|
5
|
+
},
|
|
6
|
+
"Server": {
|
|
7
|
+
"HttpPort": 5000,
|
|
8
|
+
"McpStdio": true,
|
|
9
|
+
"BindAddress": "127.0.0.1"
|
|
10
|
+
},
|
|
11
|
+
"Logging": {
|
|
12
|
+
"Level": "Debug",
|
|
13
|
+
"Path": "logs"
|
|
14
|
+
},
|
|
15
|
+
"Environment": {
|
|
16
|
+
"KBPath": "C:\\KBs\\AcademicoHomolog1",
|
|
17
|
+
"GX_SHADOW_PATH": "C:\\Projetos\\Genexus18MCP\\.gx_mirror",
|
|
18
|
+
"DefaultKb": "academicohomolog1"
|
|
19
|
+
}
|
|
20
20
|
}
|
|
Binary file
|
|
Binary file
|