mcp-prompt-optimizer 3.1.3 → 3.2.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/index.js +27 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Production-grade with Bayesian optimization, AG-UI real-time features, enhanced network resilience,
|
|
6
6
|
* development mode, and complete backend alignment
|
|
7
7
|
*
|
|
8
|
-
* Version: 3.
|
|
8
|
+
* Version: 3.2.0 - add delete_template tool (15 tools total)
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
const { Server } = require('@modelcontextprotocol/sdk/server/index.js');
|
|
@@ -36,6 +36,9 @@ const ENDPOINTS = {
|
|
|
36
36
|
|
|
37
37
|
/** Update (PATCH) */
|
|
38
38
|
UPDATE: (id) => `${MCP_PREFIX}/templates/${id}`,
|
|
39
|
+
|
|
40
|
+
/** Delete (DELETE) */
|
|
41
|
+
DELETE: (id) => `${MCP_PREFIX}/templates/${id}`,
|
|
39
42
|
},
|
|
40
43
|
|
|
41
44
|
/** Search templates (GET) — MCP endpoint, API-key auth */
|
|
@@ -188,6 +191,17 @@ class MCPPromptOptimizer {
|
|
|
188
191
|
required: ["template_id"]
|
|
189
192
|
}
|
|
190
193
|
},
|
|
194
|
+
{
|
|
195
|
+
name: "delete_template",
|
|
196
|
+
description: "🗑️ Delete a saved optimization template by ID.",
|
|
197
|
+
inputSchema: {
|
|
198
|
+
type: "object",
|
|
199
|
+
properties: {
|
|
200
|
+
template_id: { type: "string", description: "The ID of the template to delete" }
|
|
201
|
+
},
|
|
202
|
+
required: ["template_id"]
|
|
203
|
+
}
|
|
204
|
+
},
|
|
191
205
|
{
|
|
192
206
|
name: "search_templates",
|
|
193
207
|
description: "🔍 Search your saved template library with AI-aware filtering, context-based search, and sophisticated template matching",
|
|
@@ -364,6 +378,7 @@ class MCPPromptOptimizer {
|
|
|
364
378
|
case "create_template": return await this.handleCreateTemplate(args);
|
|
365
379
|
case "get_template": return await this.handleGetTemplate(args);
|
|
366
380
|
case "update_template": return await this.handleUpdateTemplate(args);
|
|
381
|
+
case "delete_template": return await this.handleDeleteTemplate(args);
|
|
367
382
|
case "get_optimization_insights": return await this.handleGetOptimizationInsights(args);
|
|
368
383
|
case "get_real_time_status": return await this.handleGetRealTimeStatus();
|
|
369
384
|
case "generate_agent_sop": return await this.handleGenerateAgentSop(args);
|
|
@@ -970,6 +985,17 @@ class MCPPromptOptimizer {
|
|
|
970
985
|
}
|
|
971
986
|
}
|
|
972
987
|
|
|
988
|
+
async handleDeleteTemplate(args) {
|
|
989
|
+
if (!args.template_id) throw new Error('Template ID is required');
|
|
990
|
+
try {
|
|
991
|
+
const result = await this.callBackendAPI(ENDPOINTS.TEMPLATE.DELETE(args.template_id), null, 'DELETE');
|
|
992
|
+
const title = result.message || `Template ${args.template_id}`;
|
|
993
|
+
return { content: [{ type: "text", text: `# 🗑️ Template Deleted\n\n${title}` }] };
|
|
994
|
+
} catch (error) {
|
|
995
|
+
throw new Error(`Failed to delete template: ${error.message}`);
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
|
|
973
999
|
async handleGenerateAgentSop(args) {
|
|
974
1000
|
if (!args.goal) throw new Error('goal is required');
|
|
975
1001
|
const payload = { goal: args.goal };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-prompt-optimizer",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Professional cloud-based MCP server for AI-powered prompt optimization with intelligent context detection, Bayesian optimization, AG-UI real-time optimization, template auto-save, optimization insights, personal model configuration via WebUI, team collaboration, enterprise-grade features, production resilience, and startup validation. Universal compatibility with Claude Desktop, Cursor, Windsurf, and 17+ MCP clients.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|