@stellisoft/stellify-mcp 0.1.29 → 0.1.31

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/dist/index.js CHANGED
@@ -63,29 +63,7 @@ const STELLIFY_FRAMEWORK_API = {
63
63
  const tools = [
64
64
  {
65
65
  name: 'get_stellify_framework_api',
66
- description: `Get the complete Stellify Framework API reference for Vue/JS development.
67
-
68
- Returns all modules and their methods for AI-friendly frontend code generation.
69
-
70
- Use this tool when you need to:
71
- - Look up available methods for a Stellify module
72
- - Verify method names before generating code
73
- - Understand the full API surface
74
-
75
- IMPORTANT - Stellify Framework Import:
76
- The npm package is "stellify-framework" (NOT @stellify/core).
77
- Import like: import { Http, Collection, Form } from 'stellify-framework';
78
-
79
- IMPORTANT - Collection class and Vue reactivity:
80
- Collection is iterable and works directly with Vue's v-for directive.
81
- Use Collection.collect() to wrap arrays for chainable operations (filter, map, sort, etc.).
82
-
83
- Example response:
84
- {
85
- "Form": ["create", "set", "get", "validate", "store", "update", "delete", ...],
86
- "Http": ["create", "get", "post", "put", "delete", "withToken", ...],
87
- ...
88
- }`,
66
+ description: `Get Stellify Framework API reference. Import from "stellify-framework" (not @stellify/core). Collection is iterable with v-for.`,
89
67
  inputSchema: {
90
68
  type: 'object',
91
69
  properties: {
@@ -98,18 +76,7 @@ Example response:
98
76
  },
99
77
  {
100
78
  name: 'get_project',
101
- description: `Get the active Stellify project for the authenticated user.
102
-
103
- IMPORTANT: Call this first before any other operations.
104
-
105
- Returns:
106
- - uuid: Project UUID (needed for most operations)
107
- - name: Project name
108
- - branch/branches: Git branch info
109
- - directories: Array of {uuid, name} for existing directories (js, controllers, models, etc.)
110
-
111
- Use the directories array to find existing directories before creating new ones.
112
- For example, look for a "js" directory before creating Vue components.`,
79
+ description: `Get active project. Returns uuid, name, branches, and directories array.`,
113
80
  inputSchema: {
114
81
  type: 'object',
115
82
  properties: {},
@@ -117,35 +84,16 @@ For example, look for a "js" directory before creating Vue components.`,
117
84
  },
118
85
  {
119
86
  name: 'create_file',
120
- description: `Create a new file in a Stellify project.
121
-
122
- This creates an EMPTY file shell - no methods, statements, or template yet. The file exists but has no content.
123
-
124
- COMPLETE WORKFLOW:
125
- 1. create_file → creates empty shell, returns file UUID
126
- 2. create_statement_with_code → add variables/imports in ONE call (returns statement UUIDs)
127
- 3. create_method with body param → add functions in ONE call (returns method UUIDs)
128
- 4. html_to_elements → create template elements (returns element UUIDs)
129
- 5. save_file → FINALIZE by wiring template/data arrays with all collected UUIDs
130
-
131
- TWO-STEP ALTERNATIVES (still supported but prefer combined tools above):
132
- - create_statement + add_statement_code (2 calls instead of 1)
133
- - create_method (without body) + add_method_body (2 calls instead of 1)
134
-
135
- NOTE: add_method_body is also useful for APPENDING code to an existing method.
87
+ description: `Create an empty file shell in a Stellify project. Returns file UUID.
136
88
 
137
- For PHP: Use type='class', 'model', 'controller', or 'middleware'.
138
- For Vue: Use type='js' and extension='vue'. Place in the 'js' directory.
139
- - Auto-creates app.js (check response.appJs)
140
- - Auto-creates template route for visual editor (check response.templateRoute.uuid)
89
+ For PHP: type='class', 'model', 'controller', or 'middleware'.
90
+ For Vue: type='js', extension='vue'. Auto-creates app.js and template route.
141
91
 
142
- DEPENDENCY RESOLUTION (automatic):
143
- Pass 'includes' as an array of namespace strings for FRAMEWORK classes (e.g., ["Illuminate\\Http\\Request", "Illuminate\\Support\\Facades\\Hash"]).
144
- The system resolves these to UUIDs automatically:
145
- - Illuminate\\*/Laravel\\* → fetches from Laravel API, creates in Application DB
146
- - Vendor packages → fetches from vendor, creates in Application DB
92
+ Pass 'includes' array for framework class dependencies (auto-resolved to UUIDs). Use 'models' array in save_file for project models.
147
93
 
148
- NOTE: For controllers that use PROJECT models (Feedback, Vote, etc.), add those to the 'models' array in save_file instead. Do NOT put project models in includes - this causes duplicate use statement errors.`,
94
+ **IMPORTANT - Check appJs response for Vue components:**
95
+ - If \`appJs.action_required === "create_or_select_mount_file"\`: No mount file exists. You MUST ask the user if they want to create a new app.js mount file before proceeding.
96
+ - If \`appJs.action_required === "register_component"\`: Mount file exists but component isn't registered. Call save_file on the mount file to add the component UUID to its includes array.`,
149
97
  inputSchema: {
150
98
  type: 'object',
151
99
  properties: {
@@ -185,42 +133,7 @@ NOTE: For controllers that use PROJECT models (Feedback, Vote, etc.), add those
185
133
  },
186
134
  {
187
135
  name: 'create_method',
188
- description: `Create a method in a file. Can optionally include the body and async flag in a single call.
189
-
190
- **NEW: Combined creation** - Pass 'body' to create the complete method in ONE call. Async is auto-detected when body contains \`await\`.
191
-
192
- **Nested code is handled correctly.** The parser tracks brace/bracket/paren depth and only splits statements on semicolons at the top level. This means computed properties, arrow functions with block bodies, and other nested constructs work correctly as single statements.
193
-
194
- Parameters are automatically created as clauses. The response includes the clause UUIDs for each parameter.
195
-
196
- Example request (simple - signature only):
197
- {
198
- "file": "file-uuid",
199
- "name": "verify",
200
- "visibility": "public",
201
- "returnType": "object",
202
- "nullable": true,
203
- "parameters": [
204
- { "name": "credentials", "datatype": "array" }
205
- ]
206
- }
207
-
208
- Example request (combined - with body, async auto-detected):
209
- {
210
- "file": "file-uuid",
211
- "name": "fetchData",
212
- "body": "const response = await Http.get('/api/data');\\nreturn response.data;"
213
- }
214
-
215
- Example response includes:
216
- {
217
- "uuid": "method-uuid",
218
- "name": "fetchData",
219
- "is_async": true,
220
- "parameters": ["clause-uuid-for-credentials"],
221
- "statements": {...}, // Only if body was provided
222
- "clauses": {...} // Only if body was provided
223
- }`,
136
+ description: `Create a method in a file. Pass 'body' to include implementation. Async auto-detected from \`await\`. For significant methods, include context fields.`,
224
137
  inputSchema: {
225
138
  type: 'object',
226
139
  properties: {
@@ -239,11 +152,11 @@ Example response includes:
239
152
  },
240
153
  is_static: {
241
154
  type: 'boolean',
242
- description: 'Whether the method is static (PHP only)',
155
+ description: 'Static method (PHP only)',
243
156
  },
244
157
  is_async: {
245
158
  type: 'boolean',
246
- description: 'Whether the method is async (JavaScript/Vue only). Set to true for methods that use await.',
159
+ description: 'Async method (JS/Vue). Auto-detected if body contains await.',
247
160
  },
248
161
  returnType: {
249
162
  type: 'string',
@@ -251,37 +164,43 @@ Example response includes:
251
164
  },
252
165
  nullable: {
253
166
  type: 'boolean',
254
- description: 'Whether the return type is nullable (e.g., ?object)',
167
+ description: 'Nullable return type (e.g., ?object)',
255
168
  },
256
169
  parameters: {
257
170
  type: 'array',
258
- description: 'Array of method parameters. Each parameter is created as a clause.',
171
+ description: 'Method parameters (created as clauses)',
259
172
  items: {
260
173
  type: 'object',
261
174
  properties: {
262
- name: {
263
- type: 'string',
264
- description: 'Parameter name (e.g., "credentials", "id")',
265
- },
266
- datatype: {
267
- type: 'string',
268
- description: 'Parameter data type (e.g., "array", "int", "string", "Request")',
269
- },
270
- type: {
271
- type: 'string',
272
- description: 'Clause type, defaults to "variable"',
273
- },
274
- value: {
275
- type: 'string',
276
- description: 'Parameter value, defaults to the name',
277
- },
175
+ name: { type: 'string', description: 'Parameter name' },
176
+ datatype: { type: 'string', description: 'Data type' },
177
+ type: { type: 'string', description: 'Clause type (default: variable)' },
178
+ value: { type: 'string', description: 'Default value' },
278
179
  },
279
180
  required: ['name'],
280
181
  },
281
182
  },
282
183
  body: {
283
184
  type: 'string',
284
- description: 'Method body code (optional). If provided, automatically parses and adds the code. Example: "const response = await Http.get(\\"/api/data\\");\\nreturn response.data;"',
185
+ description: 'Method body code. Auto-parses statements.',
186
+ },
187
+ summary: {
188
+ type: 'string',
189
+ description: 'Context: What this method does',
190
+ },
191
+ rationale: {
192
+ type: 'string',
193
+ description: 'Context: Why built this way',
194
+ },
195
+ references: {
196
+ type: 'array',
197
+ description: 'Context: Related entities [{uuid, type, relationship, note}]',
198
+ items: { type: 'object' },
199
+ },
200
+ decisions: {
201
+ type: 'array',
202
+ description: 'Context: Design decisions',
203
+ items: { type: 'string' },
285
204
  },
286
205
  },
287
206
  required: ['file', 'name'],
@@ -321,32 +240,9 @@ IMPORTANT: This APPENDS to existing method statements. To REPLACE a method's cod
321
240
  },
322
241
  {
323
242
  name: 'save_method',
324
- description: `Update an existing method's properties (name, visibility, returnType, nullable, parameters, data, is_async).
325
-
326
- Use this to modify a method after creation. For updating the method body, use add_method_body instead.
327
-
328
- Parameters:
329
- - data: Array of statement UUIDs that form the method body. Use this to reorder statements or remove unwanted statements from the method.
330
- - is_async: Set to true for JavaScript/Vue methods that use await.
331
-
332
- Example - Update return type:
333
- {
334
- "uuid": "method-uuid",
335
- "returnType": "object",
336
- "nullable": true
337
- }
338
-
339
- Example - Mark method as async (for methods using await):
340
- {
341
- "uuid": "method-uuid",
342
- "is_async": true
343
- }
243
+ description: `Update a method's properties. Use add_method_body to append code.
344
244
 
345
- Example - Remove duplicate/unwanted statements:
346
- {
347
- "uuid": "method-uuid",
348
- "data": ["statement-uuid-1", "statement-uuid-2"] // Only keep these statements
349
- }`,
245
+ For significant changes, include context fields: summary, rationale, references, decisions.`,
350
246
  inputSchema: {
351
247
  type: 'object',
352
248
  properties: {
@@ -389,6 +285,32 @@ Example - Remove duplicate/unwanted statements:
389
285
  type: 'boolean',
390
286
  description: 'Whether the method is async (JavaScript/Vue only). Set to true for methods that use await.',
391
287
  },
288
+ summary: {
289
+ type: 'string',
290
+ description: 'Context: Brief description of what this method does',
291
+ },
292
+ rationale: {
293
+ type: 'string',
294
+ description: 'Context: Why it was built this way',
295
+ },
296
+ references: {
297
+ type: 'array',
298
+ description: 'Context: Links to related entities [{uuid, type, relationship, note}]',
299
+ items: {
300
+ type: 'object',
301
+ properties: {
302
+ uuid: { type: 'string' },
303
+ type: { type: 'string', enum: ['model', 'route', 'method', 'file', 'setting', 'element'] },
304
+ relationship: { type: 'string', enum: ['uses', 'creates', 'updates', 'calls', 'contains', 'triggers'] },
305
+ note: { type: 'string' },
306
+ },
307
+ },
308
+ },
309
+ decisions: {
310
+ type: 'array',
311
+ description: 'Context: Design decisions made',
312
+ items: { type: 'string' },
313
+ },
392
314
  },
393
315
  required: ['uuid'],
394
316
  },
@@ -531,27 +453,7 @@ Use this to look up a route you created or to find existing routes in the projec
531
453
  },
532
454
  {
533
455
  name: 'save_route',
534
- description: `Update an existing route/page. Use this to wire a route to a controller method.
535
-
536
- IMPORTANT: This is how you connect API routes to controller methods!
537
- IMPORTANT: You MUST provide BOTH controller AND controller_method together - they are a pair.
538
-
539
- Example - Wire an API route to a controller method:
540
- {
541
- "uuid": "route-uuid",
542
- "controller": "controller-file-uuid",
543
- "controller_method": "method-uuid"
544
- }
545
-
546
- Available fields:
547
- - controller: UUID of the controller file (MUST be paired with controller_method)
548
- - controller_method: UUID of the method to execute (MUST be paired with controller)
549
- - path: URL path
550
- - name: Route name
551
- - type: "web" or "api"
552
- - method: HTTP method (GET, POST, PUT, DELETE, PATCH)
553
- - middleware: Array of middleware names
554
- - public: Whether the route is public (no auth required)`,
456
+ description: `Update a route/page. Wire to controller with both controller and controller_method UUIDs. For significant routes, include context fields.`,
555
457
  inputSchema: {
556
458
  type: 'object',
557
459
  properties: {
@@ -561,11 +463,11 @@ Available fields:
561
463
  },
562
464
  controller: {
563
465
  type: 'string',
564
- description: 'UUID of the controller file. MUST be provided together with controller_method.',
466
+ description: 'Controller file UUID. Requires controller_method.',
565
467
  },
566
468
  controller_method: {
567
469
  type: 'string',
568
- description: 'UUID of the method to execute. MUST be provided together with controller.',
470
+ description: 'Method UUID. Requires controller.',
569
471
  },
570
472
  path: {
571
473
  type: 'string',
@@ -578,21 +480,36 @@ Available fields:
578
480
  type: {
579
481
  type: 'string',
580
482
  enum: ['web', 'api'],
581
- description: 'Route type',
582
483
  },
583
484
  method: {
584
485
  type: 'string',
585
486
  enum: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'],
586
- description: 'HTTP method',
587
487
  },
588
488
  middleware: {
589
489
  type: 'array',
590
490
  items: { type: 'string' },
591
- description: 'Array of middleware names',
592
491
  },
593
492
  public: {
594
493
  type: 'boolean',
595
- description: 'Whether the route is public (no auth required)',
494
+ description: 'Public route (no auth)',
495
+ },
496
+ summary: {
497
+ type: 'string',
498
+ description: 'Context: What this endpoint does',
499
+ },
500
+ rationale: {
501
+ type: 'string',
502
+ description: 'Context: Why built this way',
503
+ },
504
+ references: {
505
+ type: 'array',
506
+ description: 'Context: Related entities [{uuid, type, relationship, note}]',
507
+ items: { type: 'object' },
508
+ },
509
+ decisions: {
510
+ type: 'array',
511
+ description: 'Context: Design decisions',
512
+ items: { type: 'string' },
596
513
  },
597
514
  },
598
515
  required: ['uuid'],
@@ -602,7 +519,7 @@ Available fields:
602
519
  name: 'delete_route',
603
520
  description: `Delete a route/page from the project by UUID. This permanently removes the route.
604
521
 
605
- WARNING: This is destructive and cannot be undone. Any elements attached to this route will become orphaned.`,
522
+ WARNING: This is destructive and cannot be undone. Any elements attached to this route will be deleted also.`,
606
523
  inputSchema: {
607
524
  type: 'object',
608
525
  properties: {
@@ -641,23 +558,7 @@ Use the returned UUID with html_to_elements (page parameter) or get_route for fu
641
558
  },
642
559
  {
643
560
  name: 'create_element',
644
- description: `Create a new UI element on a page (for Elements v2). Provide either page (route UUID) for root elements, or parent (element UUID) for child elements.
645
-
646
- Valid element types:
647
- - HTML5: s-wrapper, s-input, s-form, s-svg, s-shape, s-media, s-iframe
648
- - Components: s-loop, s-transition, s-freestyle, s-motion
649
- - Blade: s-directive
650
- - Shadcn/ui: s-chart, s-table, s-combobox, s-accordion, s-calendar, s-contiguous
651
-
652
- s-loop ELEMENT TYPE:
653
- Use s-loop for elements that should render with v-for directive.
654
- Required attributes (set via update_element after creation):
655
- - loop: The v-for expression (e.g., "note in notes", "item in items")
656
- - key: The :key binding (e.g., "note.id", "item.id")
657
-
658
- Example: After creating s-loop, update it with:
659
- { "tag": "div", "loop": "note in notes", "key": "note.id", "classes": ["card", "p-4"] }
660
- Generates: <div class="card p-4" v-for="note in notes" :key="note.id">`,
561
+ description: `Create a UI element. Provide page (route UUID) for root elements, or parent (element UUID) for children. Use s-loop for v-for elements.`,
661
562
  inputSchema: {
662
563
  type: 'object',
663
564
  properties: {
@@ -666,8 +567,7 @@ Generates: <div class="card p-4" v-for="note in notes" :key="note.id">`,
666
567
  enum: [
667
568
  's-wrapper', 's-input', 's-form', 's-svg', 's-shape', 's-media', 's-iframe',
668
569
  's-loop', 's-transition', 's-freestyle', 's-motion',
669
- 's-directive',
670
- 's-chart', 's-table', 's-combobox', 's-accordion', 's-calendar', 's-contiguous'
570
+ 's-directive'
671
571
  ],
672
572
  description: 'Element type - must be one of the valid Stellify element types',
673
573
  },
@@ -685,29 +585,7 @@ Generates: <div class="card p-4" v-for="note in notes" :key="note.id">`,
685
585
  },
686
586
  {
687
587
  name: 'update_element',
688
- description: `Update a UI element's attributes.
689
-
690
- Pass data object with: tag, classes (array), text, variable (for v-model), and event handlers.
691
-
692
- Key fields: inputType (not 'type') for button/input HTML type. clickArgs for handler arguments in v-for loops.
693
-
694
- EVENT HANDLERS - Use method UUIDs:
695
- { "click": "method-uuid" } → @click="methodName"
696
- { "click": "method-uuid", "clickArgs": "item" } → @click="methodName(item)"
697
-
698
- Create methods for all handlers, including simple state changes like opening modals or toggling flags.
699
-
700
- Event types: click, submit, change, input, focus, blur, keydown, keyup, mouseenter, mouseleave.
701
-
702
- DYNAMIC CLASS BINDINGS - For classes that toggle based on expressions:
703
- { "classBindings": { "rotate-180": "panel.open", "bg-red-500": "hasError" } }
704
- Assembles to: :class="{ 'rotate-180': panel.open, 'bg-red-500': hasError }"
705
- Use for state-dependent styling in v-for loops or reactive components.
706
-
707
- EFFICIENCY - Prefer updates over delete/recreate:
708
- - Move between routes: change \`routeParent\` attribute
709
- - Reparent elements: change \`parent\` attribute
710
- - Reorder children: update parent's \`data\` array with new UUID order`,
588
+ description: `Update a UI element. Data object: tag, classes, text, event handlers (method UUIDs), classBindings. Include context for significant UI components.`,
711
589
  inputSchema: {
712
590
  type: 'object',
713
591
  properties: {
@@ -717,7 +595,7 @@ EFFICIENCY - Prefer updates over delete/recreate:
717
595
  },
718
596
  data: {
719
597
  type: 'object',
720
- description: 'Flat object with HTML attributes and Stellify fields (name, type, locked, tag, classes, text, classBindings)',
598
+ description: 'HTML attributes and Stellify fields (tag, classes, text, classBindings, click, submit). Context fields: summary, rationale, references, decisions.',
721
599
  },
722
600
  },
723
601
  required: ['uuid', 'data'],
@@ -849,19 +727,7 @@ Prefer SVG icons over emoji (encoding issues).`,
849
727
  },
850
728
  {
851
729
  name: 'create_statement',
852
- description: `Create an empty statement in a file. This is step 1 of 2 - you MUST call add_statement_code next to add the actual code.
853
-
854
- **ALTERNATIVE:** Use create_statement_with_code for a single-call approach that combines both steps.
855
-
856
- IMPORTANT: This is a TWO-STEP process:
857
- 1. create_statement → returns statement UUID
858
- 2. add_statement_code → adds the actual code to that statement
859
-
860
- Use cases:
861
- - PHP: Class properties, use statements, constants
862
- - JS/Vue: Variable declarations, imports, reactive refs
863
-
864
- For Vue components, include the returned statement UUID in save_file's 'statements' array (NOT 'data' - that's for methods).`,
730
+ description: `Create empty statement (step 1 of 2). Call add_statement_code next. Prefer create_statement_with_code for single call.`,
865
731
  inputSchema: {
866
732
  type: 'object',
867
733
  properties: {
@@ -878,17 +744,7 @@ For Vue components, include the returned statement UUID in save_file's 'statemen
878
744
  },
879
745
  {
880
746
  name: 'create_statement_with_code',
881
- description: `Create a statement with code in a SINGLE call. This combines create_statement and add_statement_code.
882
-
883
- **PREFERRED:** Use this instead of the two-step create_statement → add_statement_code process.
884
-
885
- **Nested code is handled correctly.** The parser tracks brace/bracket/paren depth and only splits on top-level semicolons. Computed properties, arrow functions with block bodies, and other nested constructs are kept as single statements.
886
-
887
- Examples:
888
- - PHP: "use Illuminate\\Http\\Request;" or "private $items = [];"
889
- - JS/Vue: "const count = ref(0);" or "import { ref } from 'vue';"
890
-
891
- For Vue components, include the returned statement UUIDs in save_file's 'statements' array (NOT 'data' - that's for methods).`,
747
+ description: `Create a statement with code in one call. Preferred over two-step create_statement + add_statement_code.`,
892
748
  inputSchema: {
893
749
  type: 'object',
894
750
  properties: {
@@ -980,38 +836,9 @@ Examples:
980
836
  },
981
837
  {
982
838
  name: 'save_file',
983
- description: `Save/update a file with its full configuration. This FINALIZES the file after create_file.
984
-
985
- WORKFLOW: create_file creates an empty shell → add methods/statements → save_file wires everything together.
986
-
987
- IMPORTANT: This is a full replacement, not a partial update. To update an existing file:
988
- 1. Call get_file to fetch current state
989
- 2. Modify the returned object
990
- 3. Call save_file with the complete object
991
-
992
- Required fields: uuid, name, type
839
+ description: `Finalize a file. Full replacement - call get_file first to update existing files.
993
840
 
994
- IMPORTANT - data vs statements:
995
- - 'data' array = METHOD UUIDs only (functions)
996
- - 'statements' array = STATEMENT UUIDs (imports, variables, refs - code outside methods)
997
-
998
- Vue SFC example:
999
- save_file({
1000
- uuid: fileUuid,
1001
- name: "Counter",
1002
- type: "js",
1003
- extension: "vue",
1004
- template: [rootElementUuid], // From html_to_elements
1005
- data: [methodUuid], // Method UUIDs only
1006
- statements: [importStmtUuid, refStmtUuid] // Statement UUIDs (imports, refs)
1007
- })
1008
-
1009
- For <script setup> content, the order in statements array determines output order.
1010
-
1011
- DEPENDENCY RESOLUTION (includes array):
1012
- The 'includes' array accepts BOTH UUIDs and namespace strings.
1013
- Namespace strings (e.g., "Illuminate\\Http\\JsonResponse") are automatically resolved to UUIDs.
1014
- This works the same as create_file's dependency resolution.`,
841
+ Required: uuid, name, type. For significant changes, include context fields: summary, rationale, references, decisions.`,
1015
842
  inputSchema: {
1016
843
  type: 'object',
1017
844
  properties: {
@@ -1035,27 +862,45 @@ This works the same as create_file's dependency resolution.`,
1035
862
  template: {
1036
863
  type: 'array',
1037
864
  items: { type: 'string' },
1038
- description: 'Array of root element UUIDs for Vue <template> section (from html_to_elements)',
865
+ description: 'Root element UUIDs for Vue <template>',
1039
866
  },
1040
867
  data: {
1041
868
  type: 'array',
1042
869
  items: { type: 'string' },
1043
- description: 'Array of METHOD UUIDs only (functions created via create_method)',
870
+ description: 'Method UUIDs (from create_method)',
1044
871
  },
1045
872
  statements: {
1046
873
  type: 'array',
1047
874
  items: { type: 'string' },
1048
- description: 'Array of STATEMENT UUIDs (imports, variables, refs - created via create_statement)',
875
+ description: 'Statement UUIDs (imports, variables, refs)',
1049
876
  },
1050
877
  includes: {
1051
878
  type: 'array',
1052
879
  items: { type: 'string' },
1053
- description: 'Array of file UUIDs OR namespace strings for FRAMEWORK classes only (Request, JsonResponse, etc.). Do NOT put project models here - use the models array instead.',
880
+ description: 'File UUIDs for local imports (e.g., Vue components imported by app.js) AND framework class UUIDs/namespaces. CRITICAL: For JS mount files, add imported Vue component UUIDs here or they won\'t be bundled. Use models array for project models.',
1054
881
  },
1055
882
  models: {
1056
883
  type: 'array',
1057
884
  items: { type: 'string' },
1058
- description: 'Array of model file UUIDs for PROJECT models (Feedback, Vote, etc.). These get sandbox namespace automatically. Do NOT also add these to includes or you will get duplicate use statement errors.',
885
+ description: 'Project model UUIDs (auto-namespaced). Do NOT duplicate in includes.',
886
+ },
887
+ summary: {
888
+ type: 'string',
889
+ description: 'Context: What this file does and why it exists',
890
+ },
891
+ rationale: {
892
+ type: 'string',
893
+ description: 'Context: Why it was built this way',
894
+ },
895
+ references: {
896
+ type: 'array',
897
+ description: 'Context: Related entities [{uuid, type, relationship, note}]',
898
+ items: { type: 'object' },
899
+ },
900
+ decisions: {
901
+ type: 'array',
902
+ description: 'Context: Design decisions',
903
+ items: { type: 'string' },
1059
904
  },
1060
905
  },
1061
906
  required: ['uuid', 'name', 'type'],
@@ -1192,15 +1037,7 @@ Changes are EPHEMERAL (not saved). For persistent changes, use update_element or
1192
1037
  },
1193
1038
  {
1194
1039
  name: 'create_resources',
1195
- description: `Scaffold Model, Controller, Service, and Migration in ONE operation.
1196
-
1197
- Creates: Model ($fillable, $casts, relationships), Controller (CRUD actions), Service (optional), Migration.
1198
-
1199
- IMPORTANT: Routes are NOT auto-wired. After creation, use create_route with the returned controller UUID and method UUIDs.
1200
-
1201
- IMPORTANT: After creation, check the controller methods for return types and parameter types. If methods use classes not already in includes (e.g., JsonResponse), add those class UUIDs to the controller's includes via save_file.
1202
-
1203
- Response includes controller.methods array with {uuid, name} for each action (index, store, update, destroy).`,
1040
+ description: `Scaffold Model, Controller, Service, and Migration. Routes are NOT auto-wired - use create_route after.`,
1204
1041
  inputSchema: {
1205
1042
  type: 'object',
1206
1043
  properties: {
@@ -1299,40 +1136,7 @@ Response includes controller.methods array with {uuid, name} for each action (in
1299
1136
  },
1300
1137
  {
1301
1138
  name: 'run_code',
1302
- description: `Execute a method in the Stellify project environment and return the output.
1303
-
1304
- This tool allows you to run methods you've created and see the results. Use this for:
1305
- - Testing methods you've created
1306
- - Verifying code behavior
1307
- - Debugging issues
1308
- - Getting real feedback on code execution
1309
-
1310
- REQUIRED: Both file and method UUIDs must be provided.
1311
-
1312
- EXAMPLES:
1313
-
1314
- Run a method:
1315
- {
1316
- "file": "file-uuid",
1317
- "method": "method-uuid",
1318
- "args": []
1319
- }
1320
-
1321
- Run with benchmarking enabled:
1322
- {
1323
- "file": "file-uuid",
1324
- "method": "method-uuid",
1325
- "benchmark": true
1326
- }
1327
-
1328
- RESPONSE includes:
1329
- - output: The return value or printed output
1330
- - success: Whether execution succeeded
1331
- - error: Error message if failed
1332
- - execution_time: Time taken (if benchmark enabled)
1333
- - memory_usage: Memory used (if benchmark enabled)
1334
-
1335
- SECURITY: Code runs in a sandboxed environment with limited permissions.`,
1139
+ description: `Execute a method in sandboxed environment. Requires file and method UUIDs. Returns output, success, error, and optional benchmark data.`,
1336
1140
  inputSchema: {
1337
1141
  type: 'object',
1338
1142
  properties: {
@@ -1363,18 +1167,7 @@ SECURITY: Code runs in a sandboxed environment with limited permissions.`,
1363
1167
  },
1364
1168
  {
1365
1169
  name: 'request_capability',
1366
- description: `Log a missing system-level capability request.
1367
-
1368
- Use this when you encounter a user requirement that needs framework-level functionality
1369
- that doesn't exist in Stellify. This creates a ticket in the Stellify backlog.
1370
-
1371
- DO NOT try to build system capabilities yourself - log them here instead.
1372
-
1373
- Examples of capability requests:
1374
- - "Need WebSocket support for real-time chat"
1375
- - "Need S3 file upload with signed URLs"
1376
- - "Need scheduled task runner for daily reports"
1377
- - "Need OAuth2 social login (Google, GitHub)"`,
1170
+ description: `Log a missing framework-level capability. Creates a ticket in the Stellify backlog.`,
1378
1171
  inputSchema: {
1379
1172
  type: 'object',
1380
1173
  properties: {
@@ -1405,33 +1198,7 @@ Examples of capability requests:
1405
1198
  },
1406
1199
  {
1407
1200
  name: 'analyze_performance',
1408
- description: `Analyze code execution performance from logs. Identifies slow methods, N+1 query patterns, high memory usage, and failure rates.
1409
-
1410
- Use this tool PROACTIVELY to:
1411
- - Review performance after creating new methods
1412
- - Identify optimization opportunities
1413
- - Detect N+1 query patterns (high query counts)
1414
- - Find methods that need caching or refactoring
1415
- - Check failure rates and error patterns
1416
-
1417
- ANALYSIS TYPES:
1418
- - full: Comprehensive report with all issues, recommendations, and statistics
1419
- - slow_methods: Methods exceeding 500ms execution time
1420
- - high_query_methods: Methods with >10 queries (potential N+1 problems)
1421
- - high_memory_methods: Methods using >50MB memory
1422
- - failure_rates: Methods with high error rates
1423
- - trend: Performance trend over time (daily averages)
1424
-
1425
- EXAMPLE - Full analysis:
1426
- { "type": "full", "days": 7 }
1427
-
1428
- EXAMPLE - Check for N+1 queries:
1429
- { "type": "high_query_methods", "limit": 10 }
1430
-
1431
- The response includes actionable recommendations like:
1432
- - "Consider eager loading relationships" for N+1 patterns
1433
- - "Add database indexes" for slow queries
1434
- - "Use chunking" for high memory usage`,
1201
+ description: `Analyze execution performance from logs. Types: full, slow_methods, high_query_methods, high_memory_methods, failure_rates, trend.`,
1435
1202
  inputSchema: {
1436
1203
  type: 'object',
1437
1204
  properties: {
@@ -1453,32 +1220,7 @@ The response includes actionable recommendations like:
1453
1220
  },
1454
1221
  {
1455
1222
  name: 'analyze_quality',
1456
- description: `Analyze Laravel code structure for quality issues. Detects missing relationships, fillables, casts, and route problems.
1457
-
1458
- Use this tool PROACTIVELY to:
1459
- - Review code quality after creating models or controllers
1460
- - Detect missing Eloquent relationships (belongsTo, hasMany)
1461
- - Find migration fields not in $fillable
1462
- - Suggest type casts for columns (json → array, datetime → datetime)
1463
- - Identify broken route bindings (orphaned methods, missing controllers)
1464
-
1465
- ANALYSIS TYPES:
1466
- - full: Comprehensive analysis of all categories with recommendations
1467
- - relationships: Missing belongsTo/hasMany based on foreign keys
1468
- - fillables: Migration fields not in Model $fillable array
1469
- - casts: Columns that should have type casts
1470
- - routes: Orphaned controller methods, routes pointing to missing methods
1471
-
1472
- EXAMPLE - Full analysis:
1473
- { "type": "full" }
1474
-
1475
- EXAMPLE - Check relationships only:
1476
- { "type": "relationships" }
1477
-
1478
- The response includes actionable suggestions like:
1479
- - "Add belongsTo relationship: public function user() { return $this->belongsTo(User::class); }"
1480
- - "Add 'published_at' to $fillable array"
1481
- - "Add cast: 'metadata' => 'array'"`,
1223
+ description: `Analyze Laravel code for quality issues. Types: full, relationships, fillables, casts, routes. Returns actionable suggestions.`,
1482
1224
  inputSchema: {
1483
1225
  type: 'object',
1484
1226
  properties: {
@@ -1492,27 +1234,7 @@ The response includes actionable suggestions like:
1492
1234
  },
1493
1235
  {
1494
1236
  name: 'get_setting',
1495
- description: `Get a setting/config value from the tenant's settings table.
1496
-
1497
- These settings are read by the config() function in sandbox code execution.
1498
- Use this to check existing configuration values before modifying them.
1499
-
1500
- EXAMPLE:
1501
- { "name": "app" }
1502
-
1503
- Returns the setting data as key-value pairs, e.g.:
1504
- {
1505
- "name": "My App",
1506
- "timezone": "UTC",
1507
- "locale": "en"
1508
- }
1509
-
1510
- Common setting profiles:
1511
- - "app": Application settings (name, timezone, locale)
1512
- - "database": Database connection settings
1513
- - "mail": Mail configuration
1514
- - "cache": Cache settings
1515
- - Custom profiles for app-specific config`,
1237
+ description: `Get a setting profile by name. Returns key-value pairs accessible via config() in code.`,
1516
1238
  inputSchema: {
1517
1239
  type: 'object',
1518
1240
  properties: {
@@ -1526,38 +1248,7 @@ Common setting profiles:
1526
1248
  },
1527
1249
  {
1528
1250
  name: 'save_setting',
1529
- description: `Create or update a setting in the tenant's settings table.
1530
-
1531
- These settings are accessible via config() in sandbox code execution.
1532
- Use this to configure application behavior, API keys, feature flags, etc.
1533
-
1534
- IMPORTANT: This creates or updates the setting profile with the provided key-value data.
1535
- The data is merged with any existing values for that profile.
1536
-
1537
- EXAMPLE - Create app settings:
1538
- {
1539
- "name": "app",
1540
- "data": {
1541
- "name": "My Feedback App",
1542
- "timezone": "America/New_York",
1543
- "locale": "en"
1544
- }
1545
- }
1546
-
1547
- EXAMPLE - Create custom settings for voting:
1548
- {
1549
- "name": "vote",
1550
- "data": {
1551
- "salt": "my-secret-salt-for-ip-hashing",
1552
- "allow_anonymous": true,
1553
- "max_votes_per_day": 10
1554
- }
1555
- }
1556
-
1557
- In your controller code, access these with:
1558
- - config('app.name') returns "My Feedback App"
1559
- - config('vote.salt') returns "my-secret-salt-for-ip-hashing"
1560
- - config('vote.allow_anonymous') returns true`,
1251
+ description: `Create or update a setting profile. Data is merged with existing values. Access via config('name.key') in code.`,
1561
1252
  inputSchema: {
1562
1253
  type: 'object',
1563
1254
  properties: {
@@ -1597,35 +1288,7 @@ This removes the "vote" setting profile entirely.`,
1597
1288
  },
1598
1289
  {
1599
1290
  name: 'get_pattern',
1600
- description: `Get a UI pattern checklist for building common components correctly.
1601
-
1602
- WHEN TO USE: Call this BEFORE building any of these UI patterns:
1603
- - accordion: Collapsible content panels
1604
- - modal: Overlay dialogs
1605
- - tabs: Tabbed content navigation
1606
- - dropdown: Toggleable menus
1607
- - toast: Notification messages
1608
-
1609
- The checklist contains best practices and common pitfalls to avoid.
1610
- Following the checklist prevents bugs like hidden content still being visible,
1611
- missing keyboard navigation, or incorrect ARIA attributes.
1612
-
1613
- EXAMPLE:
1614
- { "name": "accordion" }
1615
-
1616
- Returns:
1617
- {
1618
- "name": "accordion",
1619
- "description": "Collapsible content panels",
1620
- "checklist": [
1621
- "Use v-show for visibility toggle (not CSS height tricks)",
1622
- "Store open state as boolean in each panel object",
1623
- ...
1624
- ],
1625
- "example": "const panels = ref([...]);"
1626
- }
1627
-
1628
- If no pattern exists for the given name, returns null.`,
1291
+ description: `Get a UI pattern checklist (accordion, modal, tabs, dropdown, toast). Returns best practices and common pitfalls.`,
1629
1292
  inputSchema: {
1630
1293
  type: 'object',
1631
1294
  properties: {
@@ -1688,123 +1351,59 @@ Use this to discover what patterns are available before building UI components.`
1688
1351
  properties: {},
1689
1352
  },
1690
1353
  },
1354
+ {
1355
+ name: 'get_assembled_code',
1356
+ description: `Get the assembled source code for a file. Returns the actual Vue SFC or PHP class as it would be rendered.
1357
+
1358
+ Use this after save_file to verify the component was built correctly:
1359
+ - Check that all methods are included
1360
+ - Verify @click handlers are wired to methods
1361
+ - Confirm imports and reactive state are present
1362
+ - Spot any missing pieces before deployment`,
1363
+ inputSchema: {
1364
+ type: 'object',
1365
+ properties: {
1366
+ uuid: {
1367
+ type: 'string',
1368
+ description: 'UUID of the file to get assembled code for',
1369
+ },
1370
+ },
1371
+ required: ['uuid'],
1372
+ },
1373
+ },
1691
1374
  ];
1692
1375
  // Server instructions for tool discovery (used by MCP Tool Search)
1693
- const SERVER_INSTRUCTIONS = `Stellify is a coding platform where you code alongside AI on a codebase maintained and curated by AI. Build Laravel, stellify-framework, and Vue.js applications.
1694
-
1695
- Use Stellify tools when:
1696
- - Building PHP controllers, models, middleware, or classes
1697
- - Creating Vue.js components with reactive state and UI
1698
- - Managing UI elements (HTML stored as structured JSON)
1699
- - Working with a Stellify project (user will mention "Stellify" or provide project UUID)
1700
-
1701
- Key concepts:
1702
- - Code is stored as structured JSON, enabling surgical AI edits at the statement level
1703
- - Files contain methods and statements (code outside methods)
1704
- - Vue components link to UI elements via the 'template' field
1705
- - Event handlers (click, submit) wire UI elements to methods by UUID
1376
+ const SERVER_INSTRUCTIONS = `Stellify is a coding platform where code is stored as structured JSON in a database, enabling surgical AI edits. Build Laravel (PHP) applications with StellifyJS (a front-end Laravel extension framework that has adaptors for reactive frameworks such as Vue, React and library wrappers for chart.js etc.).
1706
1377
 
1707
- ## General Workflow (all file types)
1378
+ ## Architecture
1708
1379
 
1709
- 1. create_file empty shell, returns file UUID
1710
- 2. create_method → signature only, returns method UUID
1711
- 3. add_method_body → implementation code
1712
- 4. create_statement + add_statement_code → for imports, variables, refs
1713
- 5. save_file → finalize with template/data/statements arrays
1380
+ - Files are stored as json. The json has a data key that references its methods (using uuids), and each method has a data key that references statements, and each statement has a data key that references clauses.
1714
1381
 
1715
- ## Vue Component Workflow
1382
+ ## Example Workflow
1383
+ 1. Research: Call the get_project tool to understand the current project structure, existing files, and directories. This helps avoid duplicates and informs where to create new files.
1384
+ 2. Plan: If the user is in plan mode, create a plan and prompt the user to accept before starting.
1385
+ 3. Execute: Map out the solution in full before calling any tools. Use the tools to verify assumptions and gather information about the project as needed.
1386
+ 4. Create: create_file, create_method (with body), create_statement_with_code
1387
+ 5. Wire: html_to_elements (pass file UUID to auto-wire @click handlers)
1388
+ 6. Finalize: save_file with template/data/statements arrays
1389
+ 7. Verify: Call \`get_assembled_code\` to see the actual rendered output and fix any issues
1390
+ 8. Test: Use run_code to execute methods and verify behavior. For UI components, use broadcast_element_command to demonstrate functionality in real-time.
1716
1391
 
1717
- 1. get_project find 'js' directory UUID (or create it)
1718
- 2. create_file → type='js', extension='vue' for the component
1719
- - **Auto-creates app.js** and **template route** (check response for appJs and templateRoute fields)
1720
- 3. Create statements for imports using **create_statement_with_code** (ONE call each):
1721
- - create_statement_with_code(file, "import { ref, onMounted } from 'vue';")
1722
- - create_statement_with_code(file, "import { Http } from 'stellify-framework';")
1723
- 4. Create statements for reactive data: create_statement_with_code(file, "const notes = ref([]);")
1724
- 5. **create_method with body** (async auto-detected from \`await\`). Example:
1725
- \`\`\`
1726
- create_method({
1727
- file: fileUuid,
1728
- name: "fetchNotes",
1729
- body: "const response = await Http.get('/api/notes');\\nnotes.value = response.data || [];"
1730
- })
1731
- \`\`\`
1732
- 6. Create statement for onMounted: create_statement_with_code(file, "onMounted(fetchData);")
1733
- 7. **Create UI interaction methods** for any button that changes state:
1734
- \`\`\`
1735
- create_method({ file: fileUuid, name: "openModal", body: "showModal.value = true;" })
1736
- create_method({ file: fileUuid, name: "closeModal", body: "showModal.value = false;" })
1737
- \`\`\`
1738
- 8. html_to_elements with @click handlers auto-wired:
1739
- \`\`\`
1740
- html_to_elements({
1741
- elements: '<button @click="openModal">Open</button>',
1742
- page: templateRoute.uuid,
1743
- file: fileUuid // Auto-wires @click="openModal" to the method UUID
1744
- })
1745
- \`\`\`
1746
- 9. save_file with: extension='vue', template=[elementUuid], data=[methodUuids], statements=[importUuids, refUuids, onMountedUuid]
1747
- 11. Create web route for the display page (e.g., "/notes")
1748
- 12. Add \`<div id="app"></div>\` to the display page: html_to_elements(page=routeUuid, elements='<div id="app"></div>')
1392
+ ## Component Response Handling (IMPORTANT)
1749
1393
 
1750
- ## Fetching Paginated Data
1394
+ When creating Vue/ React etc. components, ALWAYS check the \`appJs\` field in the response:
1751
1395
 
1752
- Use \`Http.items()\` for paginated endpoints - it auto-extracts the array from Laravel responses:
1396
+ 1. **appJs.action_required === "create_or_select_mount_file"**: No mount file exists. You MUST immediately ask the user: "Would you like me to create an app.js mount file for this component?" Do NOT proceed without user confirmation.
1753
1397
 
1754
- \`\`\`javascript
1755
- // Recommended - auto-extracts .data from paginated response
1756
- notes.value = await Http.items('/api/notes');
1398
+ 2. **appJs.action_required === "register_component"**: Mount file exists but component isn't registered. Call save_file on the mount file (appJs.uuid) to add the component UUID to its includes array.
1757
1399
 
1758
- // Alternative - manual extraction
1759
- const response = await Http.get('/api/notes');
1760
- notes.value = response.data || [];
1761
- \`\`\`
1762
-
1763
- ## Editing Existing Code
1764
-
1765
- - **Edit at the right level:** To change code, edit the statement or clause - never delete an entire method just to change a line.
1766
-
1767
- ## Common Pitfalls
1768
-
1769
- - **@click auto-wiring:** Pass the file UUID to html_to_elements to auto-wire @click handlers. Methods must be created BEFORE calling html_to_elements.
1770
- - **Stellify imports:** Use "stellify-framework" package (NOT @stellify/core)
1771
- CORRECT: import { Http, Collection, Form } from 'stellify-framework';
1772
- WRONG: import { Http } from '@stellify/core';
1773
- - v-model requires ref(), NOT Form class: const formData = ref({title: ''})
1774
- - Collection is iterable and works directly with v-for (no .toArray() needed)
1775
- - add_method_body APPENDS, doesn't replace - create new method to replace
1776
- - 'data' array = method UUIDs, 'statements' array = import/variable UUIDs
1777
- - For buttons in forms, set inputType: "button" to prevent auto-submit
1778
- - **Async methods:** Auto-detected when body contains \`await\`. Response includes \`is_async: true\` if detected.
1779
- - **onMounted:** Use direct method reference: "onMounted(fetchNotes);"
1780
- The assembler automatically outputs lifecycle hooks after method definitions.
1781
-
1782
- ## Nullable Refs: Use explicit v-if, NOT v-else
1783
-
1784
- When using nullable refs (e.g., \`const editingItem = ref(null)\`) with v-model, use explicit v-if guards:
1785
- - WRONG: \`<template v-else><input v-model="editingItem.title"/></template>\`
1786
- - CORRECT: \`<template v-if="editingItem && editingItem.id === item.id"><input v-model="editingItem.title"/></template>\`
1787
-
1788
- Vue evaluates v-model bindings before v-else is applied, causing "Cannot read properties of null" errors.
1789
-
1790
- ## Stack and Business Logic
1791
-
1792
- **Default stack:** Laravel (PHP), stellify-framework (JS), and Vue.js. Available capabilities (optional packages/libraries) are returned by \`get_project\`. Use \`get_stellify_framework_api\` for the stellify-framework API reference.
1793
-
1794
- **All business logic** (controllers, models, middleware, etc.) goes in the tenant DB via MCP tools. If a required capability is not available, use \`request_capability\` to log it.
1795
-
1796
- **Prefer Laravel methods:** When Laravel provides a helper (Str, Arr, Hash, Number, Collection), use it instead of native PHP functions.
1797
-
1798
- ## JavaScript Entry File (app.js) - Auto-Generated
1799
-
1800
- When you create a Vue component, **app.js is automatically created/updated** with component registration. The create_file response will confirm this with an \`appJs\` field.
1801
-
1802
- **Page mount point:** Each page using Vue needs \`<div id="app"></div>\`:
1803
- - html_to_elements(page=routeUuid, elements='<div id="app"></div>')`;
1400
+ 3. **No action_required**: Component is already registered in a mount file. Proceed normally.
1401
+ `;
1402
+ // Legacy detailed instructions preserved as comments for reference if needed
1804
1403
  // Create MCP server
1805
1404
  const server = new Server({
1806
1405
  name: 'stellify-mcp',
1807
- version: '0.1.29',
1406
+ version: '0.1.31',
1808
1407
  }, {
1809
1408
  capabilities: {
1810
1409
  tools: {},
@@ -2671,20 +2270,54 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
2671
2270
  ],
2672
2271
  };
2673
2272
  }
2273
+ case 'get_assembled_code': {
2274
+ const result = await stellify.getAssembledCode(args.uuid);
2275
+ // Return just the code content for easy reading
2276
+ const code = result.files?.[0]?.content || result.data?.code || 'No code available';
2277
+ const fileName = result.files?.[0]?.path || result.entryPoint || 'unknown';
2278
+ return {
2279
+ content: [
2280
+ {
2281
+ type: 'text',
2282
+ text: `// ${fileName}\n\n${code}`,
2283
+ },
2284
+ ],
2285
+ };
2286
+ }
2674
2287
  default:
2675
2288
  throw new Error(`Unknown tool: ${name}`);
2676
2289
  }
2677
2290
  }
2678
2291
  catch (error) {
2292
+ // Extract backend response data for better error messages
2293
+ const backendData = error.response?.data;
2294
+ const statusCode = error.response?.status;
2295
+ // Build a helpful error response
2296
+ const errorResponse = {
2297
+ success: false,
2298
+ error: backendData?.message || error.message || 'Request failed',
2299
+ };
2300
+ // Include hint if the backend provided one
2301
+ if (backendData?.hint) {
2302
+ errorResponse.hint = backendData.hint;
2303
+ }
2304
+ // Include validation errors if present
2305
+ if (backendData?.errors) {
2306
+ errorResponse.validation_errors = backendData.errors;
2307
+ }
2308
+ // Include status code for context
2309
+ if (statusCode) {
2310
+ errorResponse.status = statusCode;
2311
+ }
2312
+ // Include the original message if different from backend message
2313
+ if (backendData?.message && error.message && !error.message.includes(backendData.message)) {
2314
+ errorResponse.details = { message: backendData.message };
2315
+ }
2679
2316
  return {
2680
2317
  content: [
2681
2318
  {
2682
2319
  type: 'text',
2683
- text: JSON.stringify({
2684
- success: false,
2685
- error: error.message,
2686
- details: error.response?.data || error.toString(),
2687
- }, null, 2),
2320
+ text: JSON.stringify(errorResponse, null, 2),
2688
2321
  },
2689
2322
  ],
2690
2323
  isError: true,
@@ -195,4 +195,5 @@ export declare class StellifyClient {
195
195
  example?: string;
196
196
  }): Promise<any>;
197
197
  listPatterns(): Promise<any>;
198
+ getAssembledCode(uuid: string): Promise<any>;
198
199
  }
@@ -238,4 +238,9 @@ export class StellifyClient {
238
238
  const response = await this.client.get('/pattern');
239
239
  return response.data;
240
240
  }
241
+ // Code Assembly - get rendered source code for a file
242
+ async getAssembledCode(uuid) {
243
+ const response = await this.client.get(`/file/${uuid}/source`);
244
+ return response.data;
245
+ }
241
246
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stellisoft/stellify-mcp",
3
- "version": "0.1.29",
3
+ "version": "0.1.31",
4
4
  "mcpName": "io.github.MattStellisoft/stellify-mcp",
5
5
  "description": "MCP server for Stellify - AI-native code generation platform",
6
6
  "main": "dist/index.js",
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/Stellify-Software-Ltd/stellify-mcp",
7
7
  "source": "github"
8
8
  },
9
- "version": "0.1.29",
9
+ "version": "0.1.31",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "@stellisoft/stellify-mcp",
14
- "version": "0.1.29",
14
+ "version": "0.1.31",
15
15
  "transport": {
16
16
  "type": "stdio"
17
17
  },