@stellisoft/stellify-mcp 0.1.19 → 0.1.21
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 +341 -7
- package/dist/stellify-client.d.ts +4 -0
- package/dist/stellify-client.js +16 -0
- package/package.json +1 -1
- package/server.json +2 -2
package/dist/index.js
CHANGED
|
@@ -197,6 +197,42 @@ const stellify = new StellifyClient({
|
|
|
197
197
|
// Embed: create,store,compare,nearest,search,toJSON
|
|
198
198
|
// Diff: chars,words,lines,apply,createPatch,similarity
|
|
199
199
|
//
|
|
200
|
+
// -----------------------------------------------------------------------------
|
|
201
|
+
// COMMON PITFALLS - AVOID THESE MISTAKES
|
|
202
|
+
// -----------------------------------------------------------------------------
|
|
203
|
+
// 1. v-model requires ref(), NOT Form class
|
|
204
|
+
// WRONG: const form = Form.create({title: ''}) with v-model="form.title"
|
|
205
|
+
// RIGHT: const formData = ref({title: ''}) with v-model="formData.title"
|
|
206
|
+
//
|
|
207
|
+
// 2. List.from() returns List instance, not array - use .toArray() for v-for
|
|
208
|
+
// WRONG: notes.value = List.from(response.data)
|
|
209
|
+
// RIGHT: notes.value = List.from(response.data).toArray()
|
|
210
|
+
//
|
|
211
|
+
// 3. add_method_body APPENDS, doesn't replace - create new method to replace
|
|
212
|
+
//
|
|
213
|
+
// 4. Use 'inputType' not 'type' for HTML type attribute on elements
|
|
214
|
+
//
|
|
215
|
+
// 5. Statements go in 'statements' array, methods go in 'data' array in save_file
|
|
216
|
+
//
|
|
217
|
+
// 6. Always wire click handlers to METHOD UUIDs, not file UUIDs
|
|
218
|
+
//
|
|
219
|
+
// 7. For buttons in forms, set inputType: "button" to prevent auto-submit
|
|
220
|
+
//
|
|
221
|
+
// -----------------------------------------------------------------------------
|
|
222
|
+
// ERROR HANDLING
|
|
223
|
+
// -----------------------------------------------------------------------------
|
|
224
|
+
// If a tool call fails, check:
|
|
225
|
+
// - UUID validity: Is the file/method/element UUID correct and exists?
|
|
226
|
+
// - Required fields: Did you provide all required parameters?
|
|
227
|
+
// - Order of operations: Did you create the parent before the child?
|
|
228
|
+
// - Array contents: Are you passing statement UUIDs to 'statements' (not 'data')?
|
|
229
|
+
//
|
|
230
|
+
// Common error scenarios:
|
|
231
|
+
// - "File not found" → The file UUID is invalid or was deleted
|
|
232
|
+
// - "Method not found" → The method UUID doesn't exist in that file
|
|
233
|
+
// - "Invalid element type" → Use valid types like s-wrapper, s-input, s-form
|
|
234
|
+
// - Empty response → Operation succeeded but returned no data (normal for deletes)
|
|
235
|
+
//
|
|
200
236
|
// =============================================================================
|
|
201
237
|
// Define MCP tools
|
|
202
238
|
// Stellify Framework API - full method reference for AI code generation
|
|
@@ -253,6 +289,14 @@ Use this tool when you need to:
|
|
|
253
289
|
- Verify method names before generating code
|
|
254
290
|
- Understand the full API surface
|
|
255
291
|
|
|
292
|
+
IMPORTANT - List class and Vue reactivity:
|
|
293
|
+
The List class methods return List instances, NOT plain arrays.
|
|
294
|
+
Vue's v-for directive cannot iterate over List instances directly.
|
|
295
|
+
|
|
296
|
+
When assigning to a Vue ref that will be used with v-for, call .toArray():
|
|
297
|
+
- CORRECT: notes.value = List.from(response.data).toArray();
|
|
298
|
+
- INCORRECT (v-for won't work): notes.value = List.from(response.data);
|
|
299
|
+
|
|
256
300
|
Example response:
|
|
257
301
|
{
|
|
258
302
|
"Form": ["create", "set", "get", "validate", "store", "update", "delete", ...],
|
|
@@ -434,7 +478,14 @@ Example response includes:
|
|
|
434
478
|
},
|
|
435
479
|
{
|
|
436
480
|
name: 'add_method_body',
|
|
437
|
-
description:
|
|
481
|
+
description: `Parse and add PHP code to a method body. Provide the method implementation code (without the function declaration). Stellify will parse it into structured statements.
|
|
482
|
+
|
|
483
|
+
IMPORTANT: This APPENDS to existing method statements. To REPLACE a method's code:
|
|
484
|
+
1. Create a NEW method with create_method
|
|
485
|
+
2. Add body with add_method_body
|
|
486
|
+
3. Update the file's 'data' array to include new method UUID (remove old one)
|
|
487
|
+
4. Update any element click handlers to reference the new method UUID
|
|
488
|
+
5. Optionally delete the old method with delete_method`,
|
|
438
489
|
inputSchema: {
|
|
439
490
|
type: 'object',
|
|
440
491
|
properties: {
|
|
@@ -456,15 +507,24 @@ Example response includes:
|
|
|
456
507
|
},
|
|
457
508
|
{
|
|
458
509
|
name: 'save_method',
|
|
459
|
-
description: `Update an existing method's properties (name, visibility, returnType, nullable, parameters).
|
|
510
|
+
description: `Update an existing method's properties (name, visibility, returnType, nullable, parameters, data).
|
|
460
511
|
|
|
461
512
|
Use this to modify a method after creation. For updating the method body, use add_method_body instead.
|
|
462
513
|
|
|
463
|
-
|
|
514
|
+
Parameters:
|
|
515
|
+
- data: Array of statement UUIDs that form the method body. Use this to reorder statements or remove unwanted statements from the method.
|
|
516
|
+
|
|
517
|
+
Example - Update return type:
|
|
464
518
|
{
|
|
465
519
|
"uuid": "method-uuid",
|
|
466
520
|
"returnType": "object",
|
|
467
521
|
"nullable": true
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
Example - Remove duplicate/unwanted statements:
|
|
525
|
+
{
|
|
526
|
+
"uuid": "method-uuid",
|
|
527
|
+
"data": ["statement-uuid-1", "statement-uuid-2"] // Only keep these statements
|
|
468
528
|
}`,
|
|
469
529
|
inputSchema: {
|
|
470
530
|
type: 'object',
|
|
@@ -499,6 +559,11 @@ Example:
|
|
|
499
559
|
description: 'Array of parameter clause UUIDs',
|
|
500
560
|
items: { type: 'string' },
|
|
501
561
|
},
|
|
562
|
+
data: {
|
|
563
|
+
type: 'array',
|
|
564
|
+
description: 'Array of statement UUIDs that form the method body. Use to reorder or remove statements.',
|
|
565
|
+
items: { type: 'string' },
|
|
566
|
+
},
|
|
502
567
|
},
|
|
503
568
|
required: ['uuid'],
|
|
504
569
|
},
|
|
@@ -520,6 +585,34 @@ Example:
|
|
|
520
585
|
},
|
|
521
586
|
},
|
|
522
587
|
},
|
|
588
|
+
{
|
|
589
|
+
name: 'delete_method',
|
|
590
|
+
description: 'Delete a method from a file by UUID. This permanently removes the method and all its code.',
|
|
591
|
+
inputSchema: {
|
|
592
|
+
type: 'object',
|
|
593
|
+
properties: {
|
|
594
|
+
uuid: {
|
|
595
|
+
type: 'string',
|
|
596
|
+
description: 'UUID of the method to delete',
|
|
597
|
+
},
|
|
598
|
+
},
|
|
599
|
+
required: ['uuid'],
|
|
600
|
+
},
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
name: 'get_method',
|
|
604
|
+
description: 'Get a method by UUID. Returns the method data including its parameters and body.',
|
|
605
|
+
inputSchema: {
|
|
606
|
+
type: 'object',
|
|
607
|
+
properties: {
|
|
608
|
+
uuid: {
|
|
609
|
+
type: 'string',
|
|
610
|
+
description: 'UUID of the method to retrieve',
|
|
611
|
+
},
|
|
612
|
+
},
|
|
613
|
+
required: ['uuid'],
|
|
614
|
+
},
|
|
615
|
+
},
|
|
523
616
|
{
|
|
524
617
|
name: 'search_files',
|
|
525
618
|
description: 'Search for files in the project by name or type',
|
|
@@ -562,7 +655,16 @@ EXAMPLE - Create an API route wired to a controller:
|
|
|
562
655
|
WORKFLOW for API endpoints:
|
|
563
656
|
1. Create controller with create_file (type: "controller") or create_resources
|
|
564
657
|
2. Create methods with create_method + add_method_body
|
|
565
|
-
3. Create route with create_route, passing controller and controller_method UUIDs
|
|
658
|
+
3. Create route with create_route, passing controller and controller_method UUIDs
|
|
659
|
+
|
|
660
|
+
ROUTE PARAMETERS:
|
|
661
|
+
Route parameters like {id} in "/api/notes/{id}" are automatically injected into controller method parameters when the parameter name matches.
|
|
662
|
+
|
|
663
|
+
Example: Route "/api/notes/{id}" (DELETE) with controller method destroy($id)
|
|
664
|
+
The $id parameter receives the value from the URL automatically.
|
|
665
|
+
|
|
666
|
+
When creating methods with create_method, include the parameter:
|
|
667
|
+
{ "name": "destroy", "parameters": [{ "name": "id", "datatype": "int" }] }`,
|
|
566
668
|
inputSchema: {
|
|
567
669
|
type: 'object',
|
|
568
670
|
properties: {
|
|
@@ -694,6 +796,22 @@ Available fields:
|
|
|
694
796
|
required: ['uuid'],
|
|
695
797
|
},
|
|
696
798
|
},
|
|
799
|
+
{
|
|
800
|
+
name: 'delete_route',
|
|
801
|
+
description: `Delete a route/page from the project by UUID. This permanently removes the route.
|
|
802
|
+
|
|
803
|
+
WARNING: This is destructive and cannot be undone. Any elements attached to this route will become orphaned.`,
|
|
804
|
+
inputSchema: {
|
|
805
|
+
type: 'object',
|
|
806
|
+
properties: {
|
|
807
|
+
uuid: {
|
|
808
|
+
type: 'string',
|
|
809
|
+
description: 'UUID of the route to delete',
|
|
810
|
+
},
|
|
811
|
+
},
|
|
812
|
+
required: ['uuid'],
|
|
813
|
+
},
|
|
814
|
+
},
|
|
697
815
|
{
|
|
698
816
|
name: 'search_routes',
|
|
699
817
|
description: `Search for routes/pages in the project by name. Use this to find existing routes before creating new ones.
|
|
@@ -727,7 +845,17 @@ Valid element types:
|
|
|
727
845
|
- HTML5: s-wrapper, s-input, s-form, s-svg, s-shape, s-media, s-iframe
|
|
728
846
|
- Components: s-loop, s-transition, s-freestyle, s-motion
|
|
729
847
|
- Blade: s-directive
|
|
730
|
-
- Shadcn/ui: s-chart, s-table, s-combobox, s-accordion, s-calendar, s-contiguous
|
|
848
|
+
- Shadcn/ui: s-chart, s-table, s-combobox, s-accordion, s-calendar, s-contiguous
|
|
849
|
+
|
|
850
|
+
s-loop ELEMENT TYPE:
|
|
851
|
+
Use s-loop for elements that should render with v-for directive.
|
|
852
|
+
Required attributes (set via update_element after creation):
|
|
853
|
+
- loop: The v-for expression (e.g., "note in notes", "item in items")
|
|
854
|
+
- key: The :key binding (e.g., "note.id", "item.id")
|
|
855
|
+
|
|
856
|
+
Example: After creating s-loop, update it with:
|
|
857
|
+
{ "tag": "div", "loop": "note in notes", "key": "note.id", "classes": ["card", "p-4"] }
|
|
858
|
+
Generates: <div class="card p-4" v-for="note in notes" :key="note.id">`,
|
|
731
859
|
inputSchema: {
|
|
732
860
|
type: 'object',
|
|
733
861
|
properties: {
|
|
@@ -767,6 +895,19 @@ Special Stellify fields:
|
|
|
767
895
|
- classes: CSS classes array ["class1", "class2"]
|
|
768
896
|
- text: Element text content
|
|
769
897
|
|
|
898
|
+
V-MODEL BINDING (for s-input elements):
|
|
899
|
+
- variable: Set this to bind v-model to a reactive variable
|
|
900
|
+
- Example: { "variable": "formData.title" } renders as <input v-model="formData.title" />
|
|
901
|
+
- IMPORTANT: The variable must reference a Vue ref() object, NOT a Form class instance
|
|
902
|
+
- CORRECT: const formData = ref({ title: '', content: '' }) → v-model="formData.title"
|
|
903
|
+
- WRONG: const form = Form.create({ title: '' }) → Form class is not reactive for v-model
|
|
904
|
+
|
|
905
|
+
INPUT TYPE ATTRIBUTE:
|
|
906
|
+
- Use 'inputType' (not 'type') to set the HTML type attribute on buttons/inputs
|
|
907
|
+
- Example: { "inputType": "button" } renders as type="button"
|
|
908
|
+
- Example: { "inputType": "textarea" } renders as <textarea> instead of <input>
|
|
909
|
+
- For buttons inside <form> elements, always set inputType: "button" to prevent form submission on click
|
|
910
|
+
|
|
770
911
|
EVENT HANDLERS (set value to method UUID):
|
|
771
912
|
- click: @click - buttons, links, any clickable element
|
|
772
913
|
- submit: @submit - form submission
|
|
@@ -779,6 +920,11 @@ EVENT HANDLERS (set value to method UUID):
|
|
|
779
920
|
- mouseenter: @mouseenter - mouse enters element
|
|
780
921
|
- mouseleave: @mouseleave - mouse leaves element
|
|
781
922
|
|
|
923
|
+
EVENT HANDLER ARGUMENTS:
|
|
924
|
+
When wiring click handlers that need arguments (e.g., from v-for loops), use clickArgs:
|
|
925
|
+
- { "click": "delete-method-uuid", "clickArgs": "item.id" } → @click="deleteItem(item.id)"
|
|
926
|
+
- { "click": "edit-method-uuid", "clickArgs": "item" } → @click="editItem(item)"
|
|
927
|
+
|
|
782
928
|
Example wiring a button click to a method:
|
|
783
929
|
{
|
|
784
930
|
"uuid": "button-element-uuid",
|
|
@@ -898,6 +1044,12 @@ Text like {{ count }} is automatically detected and:
|
|
|
898
1044
|
For Vue components: Omit 'page' - elements are created standalone for the component template.
|
|
899
1045
|
For page content: Provide 'page' (route UUID) to attach elements directly.
|
|
900
1046
|
|
|
1047
|
+
ICONS - Best practices:
|
|
1048
|
+
- Prefer SVG icons or icon fonts (Heroicons, Font Awesome) over emoji
|
|
1049
|
+
- Use HTML entities where available (e.g., × for ×)
|
|
1050
|
+
- Avoid raw emoji characters as they may have encoding issues
|
|
1051
|
+
- Example: <button><svg>...</svg></button> instead of <button>🗑️</button>
|
|
1052
|
+
|
|
901
1053
|
IMPORTANT: Use the returned root element UUID in save_file's template array.`,
|
|
902
1054
|
inputSchema: {
|
|
903
1055
|
type: 'object',
|
|
@@ -951,7 +1103,7 @@ Use cases:
|
|
|
951
1103
|
- PHP: Class properties, use statements, constants
|
|
952
1104
|
- JS/Vue: Variable declarations, imports, reactive refs
|
|
953
1105
|
|
|
954
|
-
For Vue components, include the returned statement UUID in save_file's 'data'
|
|
1106
|
+
For Vue components, include the returned statement UUID in save_file's 'statements' array (NOT 'data' - that's for methods).`,
|
|
955
1107
|
inputSchema: {
|
|
956
1108
|
type: 'object',
|
|
957
1109
|
properties: {
|
|
@@ -994,6 +1146,38 @@ Examples:
|
|
|
994
1146
|
required: ['file', 'statement', 'code'],
|
|
995
1147
|
},
|
|
996
1148
|
},
|
|
1149
|
+
{
|
|
1150
|
+
name: 'delete_statement',
|
|
1151
|
+
description: 'Delete a statement from a file by UUID. This permanently removes the statement (import, variable, ref, etc.).',
|
|
1152
|
+
inputSchema: {
|
|
1153
|
+
type: 'object',
|
|
1154
|
+
properties: {
|
|
1155
|
+
uuid: {
|
|
1156
|
+
type: 'string',
|
|
1157
|
+
description: 'UUID of the statement to delete',
|
|
1158
|
+
},
|
|
1159
|
+
},
|
|
1160
|
+
required: ['uuid'],
|
|
1161
|
+
},
|
|
1162
|
+
},
|
|
1163
|
+
{
|
|
1164
|
+
name: 'save_statement',
|
|
1165
|
+
description: 'Update an existing statement. Use this to modify statement properties after creation.',
|
|
1166
|
+
inputSchema: {
|
|
1167
|
+
type: 'object',
|
|
1168
|
+
properties: {
|
|
1169
|
+
uuid: {
|
|
1170
|
+
type: 'string',
|
|
1171
|
+
description: 'UUID of the statement to update',
|
|
1172
|
+
},
|
|
1173
|
+
data: {
|
|
1174
|
+
type: 'object',
|
|
1175
|
+
description: 'Statement data to update',
|
|
1176
|
+
},
|
|
1177
|
+
},
|
|
1178
|
+
required: ['uuid'],
|
|
1179
|
+
},
|
|
1180
|
+
},
|
|
997
1181
|
{
|
|
998
1182
|
name: 'save_file',
|
|
999
1183
|
description: `Save/update a file with its full configuration. This FINALIZES the file after create_file.
|
|
@@ -1063,6 +1247,11 @@ For <script setup> content, the order in statements array determines output orde
|
|
|
1063
1247
|
items: { type: 'string' },
|
|
1064
1248
|
description: 'Array of file UUIDs to import',
|
|
1065
1249
|
},
|
|
1250
|
+
models: {
|
|
1251
|
+
type: 'array',
|
|
1252
|
+
items: { type: 'string' },
|
|
1253
|
+
description: 'Array of model file UUIDs that this controller uses (required for model class loading)',
|
|
1254
|
+
},
|
|
1066
1255
|
},
|
|
1067
1256
|
required: ['uuid', 'name', 'type'],
|
|
1068
1257
|
},
|
|
@@ -1081,6 +1270,22 @@ For <script setup> content, the order in statements array determines output orde
|
|
|
1081
1270
|
required: ['uuid'],
|
|
1082
1271
|
},
|
|
1083
1272
|
},
|
|
1273
|
+
{
|
|
1274
|
+
name: 'delete_file',
|
|
1275
|
+
description: `Delete a file from the project by UUID. This permanently removes the file and all its methods/statements.
|
|
1276
|
+
|
|
1277
|
+
WARNING: This is destructive and cannot be undone. Make sure the file is not referenced elsewhere before deleting.`,
|
|
1278
|
+
inputSchema: {
|
|
1279
|
+
type: 'object',
|
|
1280
|
+
properties: {
|
|
1281
|
+
uuid: {
|
|
1282
|
+
type: 'string',
|
|
1283
|
+
description: 'UUID of the file to delete',
|
|
1284
|
+
},
|
|
1285
|
+
},
|
|
1286
|
+
required: ['uuid'],
|
|
1287
|
+
},
|
|
1288
|
+
},
|
|
1084
1289
|
{
|
|
1085
1290
|
name: 'get_directory',
|
|
1086
1291
|
description: `Get a directory by UUID to see its contents.
|
|
@@ -1119,6 +1324,24 @@ IMPORTANT: Check existing directories first using get_project and get_directory
|
|
|
1119
1324
|
required: ['name'],
|
|
1120
1325
|
},
|
|
1121
1326
|
},
|
|
1327
|
+
{
|
|
1328
|
+
name: 'save_directory',
|
|
1329
|
+
description: 'Update an existing directory. Use this to rename or modify directory properties.',
|
|
1330
|
+
inputSchema: {
|
|
1331
|
+
type: 'object',
|
|
1332
|
+
properties: {
|
|
1333
|
+
uuid: {
|
|
1334
|
+
type: 'string',
|
|
1335
|
+
description: 'UUID of the directory to update',
|
|
1336
|
+
},
|
|
1337
|
+
name: {
|
|
1338
|
+
type: 'string',
|
|
1339
|
+
description: 'New directory name',
|
|
1340
|
+
},
|
|
1341
|
+
},
|
|
1342
|
+
required: ['uuid'],
|
|
1343
|
+
},
|
|
1344
|
+
},
|
|
1122
1345
|
{
|
|
1123
1346
|
name: 'broadcast_element_command',
|
|
1124
1347
|
description: `Broadcast a real-time command to update UI elements via WebSocket.
|
|
@@ -1605,7 +1828,7 @@ Example module names: "user-auth", "blog-posts", "product-catalog", "order-manag
|
|
|
1605
1828
|
// Create MCP server
|
|
1606
1829
|
const server = new Server({
|
|
1607
1830
|
name: 'stellify-mcp',
|
|
1608
|
-
version: '0.1.
|
|
1831
|
+
version: '0.1.21',
|
|
1609
1832
|
}, {
|
|
1610
1833
|
capabilities: {
|
|
1611
1834
|
tools: {},
|
|
@@ -1742,6 +1965,37 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1742
1965
|
],
|
|
1743
1966
|
};
|
|
1744
1967
|
}
|
|
1968
|
+
case 'delete_method': {
|
|
1969
|
+
const { uuid } = args;
|
|
1970
|
+
const result = await stellify.deleteMethod(uuid);
|
|
1971
|
+
return {
|
|
1972
|
+
content: [
|
|
1973
|
+
{
|
|
1974
|
+
type: 'text',
|
|
1975
|
+
text: JSON.stringify({
|
|
1976
|
+
success: true,
|
|
1977
|
+
message: `Deleted method ${uuid}`,
|
|
1978
|
+
data: result,
|
|
1979
|
+
}, null, 2),
|
|
1980
|
+
},
|
|
1981
|
+
],
|
|
1982
|
+
};
|
|
1983
|
+
}
|
|
1984
|
+
case 'get_method': {
|
|
1985
|
+
const { uuid } = args;
|
|
1986
|
+
const result = await stellify.getMethod(uuid);
|
|
1987
|
+
return {
|
|
1988
|
+
content: [
|
|
1989
|
+
{
|
|
1990
|
+
type: 'text',
|
|
1991
|
+
text: JSON.stringify({
|
|
1992
|
+
success: true,
|
|
1993
|
+
method: result,
|
|
1994
|
+
}, null, 2),
|
|
1995
|
+
},
|
|
1996
|
+
],
|
|
1997
|
+
};
|
|
1998
|
+
}
|
|
1745
1999
|
case 'search_files': {
|
|
1746
2000
|
const result = await stellify.searchFiles(args);
|
|
1747
2001
|
return {
|
|
@@ -1805,6 +2059,22 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1805
2059
|
],
|
|
1806
2060
|
};
|
|
1807
2061
|
}
|
|
2062
|
+
case 'delete_route': {
|
|
2063
|
+
const { uuid } = args;
|
|
2064
|
+
const result = await stellify.deleteRoute(uuid);
|
|
2065
|
+
return {
|
|
2066
|
+
content: [
|
|
2067
|
+
{
|
|
2068
|
+
type: 'text',
|
|
2069
|
+
text: JSON.stringify({
|
|
2070
|
+
success: true,
|
|
2071
|
+
message: `Deleted route ${uuid}`,
|
|
2072
|
+
data: result,
|
|
2073
|
+
}, null, 2),
|
|
2074
|
+
},
|
|
2075
|
+
],
|
|
2076
|
+
};
|
|
2077
|
+
}
|
|
1808
2078
|
case 'search_routes': {
|
|
1809
2079
|
const result = await stellify.searchRoutes(args);
|
|
1810
2080
|
const routes = result.data || result;
|
|
@@ -1982,6 +2252,38 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1982
2252
|
],
|
|
1983
2253
|
};
|
|
1984
2254
|
}
|
|
2255
|
+
case 'delete_statement': {
|
|
2256
|
+
const { uuid } = args;
|
|
2257
|
+
const result = await stellify.deleteStatement(uuid);
|
|
2258
|
+
return {
|
|
2259
|
+
content: [
|
|
2260
|
+
{
|
|
2261
|
+
type: 'text',
|
|
2262
|
+
text: JSON.stringify({
|
|
2263
|
+
success: true,
|
|
2264
|
+
message: `Deleted statement ${uuid}`,
|
|
2265
|
+
data: result,
|
|
2266
|
+
}, null, 2),
|
|
2267
|
+
},
|
|
2268
|
+
],
|
|
2269
|
+
};
|
|
2270
|
+
}
|
|
2271
|
+
case 'save_statement': {
|
|
2272
|
+
const { uuid, ...data } = args;
|
|
2273
|
+
const result = await stellify.saveStatement(uuid, data);
|
|
2274
|
+
return {
|
|
2275
|
+
content: [
|
|
2276
|
+
{
|
|
2277
|
+
type: 'text',
|
|
2278
|
+
text: JSON.stringify({
|
|
2279
|
+
success: true,
|
|
2280
|
+
message: `Saved statement ${uuid}`,
|
|
2281
|
+
statement: result,
|
|
2282
|
+
}, null, 2),
|
|
2283
|
+
},
|
|
2284
|
+
],
|
|
2285
|
+
};
|
|
2286
|
+
}
|
|
1985
2287
|
case 'save_file': {
|
|
1986
2288
|
const { uuid, ...data } = args;
|
|
1987
2289
|
const result = await stellify.saveFile(uuid, { uuid, ...data });
|
|
@@ -2013,6 +2315,22 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
2013
2315
|
],
|
|
2014
2316
|
};
|
|
2015
2317
|
}
|
|
2318
|
+
case 'delete_file': {
|
|
2319
|
+
const { uuid } = args;
|
|
2320
|
+
const result = await stellify.deleteFile(uuid);
|
|
2321
|
+
return {
|
|
2322
|
+
content: [
|
|
2323
|
+
{
|
|
2324
|
+
type: 'text',
|
|
2325
|
+
text: JSON.stringify({
|
|
2326
|
+
success: true,
|
|
2327
|
+
message: `Deleted file ${uuid}`,
|
|
2328
|
+
data: result,
|
|
2329
|
+
}, null, 2),
|
|
2330
|
+
},
|
|
2331
|
+
],
|
|
2332
|
+
};
|
|
2333
|
+
}
|
|
2016
2334
|
case 'get_directory': {
|
|
2017
2335
|
const result = await stellify.getDirectory(args.uuid);
|
|
2018
2336
|
const dirData = result.data || result;
|
|
@@ -2047,6 +2365,22 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
2047
2365
|
],
|
|
2048
2366
|
};
|
|
2049
2367
|
}
|
|
2368
|
+
case 'save_directory': {
|
|
2369
|
+
const { uuid, ...data } = args;
|
|
2370
|
+
const result = await stellify.saveDirectory(uuid, data);
|
|
2371
|
+
return {
|
|
2372
|
+
content: [
|
|
2373
|
+
{
|
|
2374
|
+
type: 'text',
|
|
2375
|
+
text: JSON.stringify({
|
|
2376
|
+
success: true,
|
|
2377
|
+
message: `Saved directory ${uuid}`,
|
|
2378
|
+
directory: result,
|
|
2379
|
+
}, null, 2),
|
|
2380
|
+
},
|
|
2381
|
+
],
|
|
2382
|
+
};
|
|
2383
|
+
}
|
|
2050
2384
|
case 'broadcast_element_command': {
|
|
2051
2385
|
const result = await stellify.broadcastElementCommand(args);
|
|
2052
2386
|
return {
|
|
@@ -76,17 +76,21 @@ export declare class StellifyClient {
|
|
|
76
76
|
searchFiles(params: SearchFilesParams): Promise<any>;
|
|
77
77
|
getFile(file: string): Promise<any>;
|
|
78
78
|
saveFile(file: string, data: any): Promise<any>;
|
|
79
|
+
deleteFile(file: string): Promise<any>;
|
|
79
80
|
getMethod(method: string): Promise<any>;
|
|
80
81
|
saveMethod(method: string, data: any): Promise<any>;
|
|
82
|
+
deleteMethod(method: string): Promise<any>;
|
|
81
83
|
createStatement(params: {
|
|
82
84
|
file?: string;
|
|
83
85
|
method?: string;
|
|
84
86
|
}): Promise<any>;
|
|
85
87
|
getStatement(statement: string): Promise<any>;
|
|
88
|
+
deleteStatement(statement: string): Promise<any>;
|
|
86
89
|
saveStatement(statement: string, data: any): Promise<any>;
|
|
87
90
|
createRoute(params: CreateRouteParams): Promise<any>;
|
|
88
91
|
getRoute(route: string): Promise<any>;
|
|
89
92
|
saveRoute(route: string, data: any): Promise<any>;
|
|
93
|
+
deleteRoute(route: string): Promise<any>;
|
|
90
94
|
searchRoutes(params: {
|
|
91
95
|
search?: string;
|
|
92
96
|
type?: string;
|
package/dist/stellify-client.js
CHANGED
|
@@ -43,6 +43,10 @@ export class StellifyClient {
|
|
|
43
43
|
const response = await this.client.put(`/file/${file}`, data);
|
|
44
44
|
return response.data;
|
|
45
45
|
}
|
|
46
|
+
async deleteFile(file) {
|
|
47
|
+
const response = await this.client.delete(`/file/${file}`);
|
|
48
|
+
return response.data;
|
|
49
|
+
}
|
|
46
50
|
async getMethod(method) {
|
|
47
51
|
const response = await this.client.get(`/method/${method}`);
|
|
48
52
|
return response.data;
|
|
@@ -51,6 +55,10 @@ export class StellifyClient {
|
|
|
51
55
|
const response = await this.client.put(`/method/${method}`, data);
|
|
52
56
|
return response.data;
|
|
53
57
|
}
|
|
58
|
+
async deleteMethod(method) {
|
|
59
|
+
const response = await this.client.delete(`/method/${method}`);
|
|
60
|
+
return response.data;
|
|
61
|
+
}
|
|
54
62
|
async createStatement(params) {
|
|
55
63
|
const response = await this.client.post('/statement', params);
|
|
56
64
|
return response.data;
|
|
@@ -59,6 +67,10 @@ export class StellifyClient {
|
|
|
59
67
|
const response = await this.client.get(`/statement/${statement}`);
|
|
60
68
|
return response.data;
|
|
61
69
|
}
|
|
70
|
+
async deleteStatement(statement) {
|
|
71
|
+
const response = await this.client.delete(`/statement/${statement}`);
|
|
72
|
+
return response.data;
|
|
73
|
+
}
|
|
62
74
|
async saveStatement(statement, data) {
|
|
63
75
|
const response = await this.client.put(`/statement/${statement}`, data);
|
|
64
76
|
return response.data;
|
|
@@ -75,6 +87,10 @@ export class StellifyClient {
|
|
|
75
87
|
const response = await this.client.put(`/route/${route}`, { uuid: route, ...data });
|
|
76
88
|
return response.data;
|
|
77
89
|
}
|
|
90
|
+
async deleteRoute(route) {
|
|
91
|
+
const response = await this.client.delete(`/route/${route}`);
|
|
92
|
+
return response.data;
|
|
93
|
+
}
|
|
78
94
|
async searchRoutes(params) {
|
|
79
95
|
const response = await this.client.get('/route/search', { params });
|
|
80
96
|
return response.data;
|
package/package.json
CHANGED
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.
|
|
9
|
+
"version": "0.1.21",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "@stellisoft/stellify-mcp",
|
|
14
|
-
"version": "0.1.
|
|
14
|
+
"version": "0.1.21",
|
|
15
15
|
"transport": {
|
|
16
16
|
"type": "stdio"
|
|
17
17
|
},
|