@stellisoft/stellify-mcp 0.1.7 → 0.1.10
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 +11 -29
- package/dist/stellify-client.d.ts +1 -1
- package/dist/stellify-client.js +6 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -361,7 +361,7 @@ Example:
|
|
|
361
361
|
inputSchema: {
|
|
362
362
|
type: 'object',
|
|
363
363
|
properties: {
|
|
364
|
-
|
|
364
|
+
query: {
|
|
365
365
|
type: 'string',
|
|
366
366
|
description: 'File name pattern to search for',
|
|
367
367
|
},
|
|
@@ -1060,41 +1060,26 @@ For PERSISTENT changes (saved to database), use update_element or html_to_elemen
|
|
|
1060
1060
|
},
|
|
1061
1061
|
{
|
|
1062
1062
|
name: 'run_code',
|
|
1063
|
-
description: `Execute
|
|
1063
|
+
description: `Execute a method in the Stellify project environment and return the output.
|
|
1064
1064
|
|
|
1065
|
-
This tool allows you to run
|
|
1065
|
+
This tool allows you to run methods you've created and see the results. Use this for:
|
|
1066
1066
|
- Testing methods you've created
|
|
1067
1067
|
- Verifying code behavior
|
|
1068
|
-
- Running artisan commands
|
|
1069
1068
|
- Debugging issues
|
|
1070
1069
|
- Getting real feedback on code execution
|
|
1071
1070
|
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
1. Run a specific method by UUID:
|
|
1075
|
-
{ file: "file-uuid", method: "method-uuid", args: ["arg1", "arg2"] }
|
|
1076
|
-
|
|
1077
|
-
2. Run arbitrary PHP code:
|
|
1078
|
-
{ code: "return 1 + 1;" }
|
|
1079
|
-
|
|
1080
|
-
3. Run with benchmarking enabled:
|
|
1081
|
-
{ file: "file-uuid", method: "method-uuid", benchmark: true }
|
|
1071
|
+
REQUIRED: Both file and method UUIDs must be provided.
|
|
1082
1072
|
|
|
1083
1073
|
EXAMPLES:
|
|
1084
1074
|
|
|
1085
|
-
Run a
|
|
1075
|
+
Run a method:
|
|
1086
1076
|
{
|
|
1087
|
-
"file": "
|
|
1088
|
-
"method": "
|
|
1077
|
+
"file": "file-uuid",
|
|
1078
|
+
"method": "method-uuid",
|
|
1089
1079
|
"args": []
|
|
1090
1080
|
}
|
|
1091
1081
|
|
|
1092
|
-
|
|
1093
|
-
{
|
|
1094
|
-
"code": "return collect([1, 2, 3])->sum();"
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
Test with benchmark timing:
|
|
1082
|
+
Run with benchmarking enabled:
|
|
1098
1083
|
{
|
|
1099
1084
|
"file": "file-uuid",
|
|
1100
1085
|
"method": "method-uuid",
|
|
@@ -1114,15 +1099,11 @@ SECURITY: Code runs in a sandboxed environment with limited permissions.`,
|
|
|
1114
1099
|
properties: {
|
|
1115
1100
|
file: {
|
|
1116
1101
|
type: 'string',
|
|
1117
|
-
description: 'UUID of the file containing the method to run',
|
|
1102
|
+
description: 'UUID of the file containing the method to run (required)',
|
|
1118
1103
|
},
|
|
1119
1104
|
method: {
|
|
1120
1105
|
type: 'string',
|
|
1121
|
-
description: 'UUID of the method to execute',
|
|
1122
|
-
},
|
|
1123
|
-
code: {
|
|
1124
|
-
type: 'string',
|
|
1125
|
-
description: 'Raw PHP/JS code to execute (alternative to file/method)',
|
|
1106
|
+
description: 'UUID of the method to execute (required)',
|
|
1126
1107
|
},
|
|
1127
1108
|
args: {
|
|
1128
1109
|
type: 'array',
|
|
@@ -1138,6 +1119,7 @@ SECURITY: Code runs in a sandboxed environment with limited permissions.`,
|
|
|
1138
1119
|
description: 'Enable benchmarking to measure execution time and memory usage',
|
|
1139
1120
|
},
|
|
1140
1121
|
},
|
|
1122
|
+
required: ['file', 'method'],
|
|
1141
1123
|
},
|
|
1142
1124
|
},
|
|
1143
1125
|
];
|
|
@@ -92,7 +92,7 @@ export declare class StellifyClient {
|
|
|
92
92
|
updateElement(element: string, data: any): Promise<any>;
|
|
93
93
|
getElement(element: string): Promise<any>;
|
|
94
94
|
getElementTree(element: string): Promise<any>;
|
|
95
|
-
deleteElement(
|
|
95
|
+
deleteElement(uuid: string): Promise<any>;
|
|
96
96
|
searchElements(params: {
|
|
97
97
|
search?: string;
|
|
98
98
|
type?: string;
|
package/dist/stellify-client.js
CHANGED
|
@@ -91,10 +91,8 @@ export class StellifyClient {
|
|
|
91
91
|
const response = await this.client.get(`/element/${element}/tree`);
|
|
92
92
|
return response.data;
|
|
93
93
|
}
|
|
94
|
-
async deleteElement(
|
|
95
|
-
const
|
|
96
|
-
const currentParam = current || 'null';
|
|
97
|
-
const response = await this.client.delete(`/element/${routeParam}/${currentParam}/${element}`);
|
|
94
|
+
async deleteElement(uuid) {
|
|
95
|
+
const response = await this.client.delete(`/element/${uuid}`);
|
|
98
96
|
return response.data;
|
|
99
97
|
}
|
|
100
98
|
async searchElements(params) {
|
|
@@ -174,9 +172,12 @@ export class StellifyClient {
|
|
|
174
172
|
const response = await this.client.post('/elements/command', params);
|
|
175
173
|
return response.data;
|
|
176
174
|
}
|
|
177
|
-
// Code execution
|
|
175
|
+
// Code execution - runs a specific method by file and method UUID
|
|
178
176
|
async runCode(params) {
|
|
179
177
|
const { file, method, ...body } = params;
|
|
178
|
+
if (!file || !method) {
|
|
179
|
+
throw new Error('Both file and method UUIDs are required to run code');
|
|
180
|
+
}
|
|
180
181
|
const response = await this.client.put(`/code/${file}/${method}`, body);
|
|
181
182
|
return response.data;
|
|
182
183
|
}
|
package/package.json
CHANGED