UNPKG

vme-mcp-server

Version:

An intelligent Model Context Protocol (MCP) server that transforms HPE VM Essentials (VME) infrastructure management into natural language conversations. Provision VMs, manage resources, and control your infrastructure through simple English commands with

58 lines (57 loc) 2.13 kB
import { generateSessionId, logInteraction } from "../lib/session.js"; export const provideFeedbackTool = { name: "provide_feedback", description: "Provide feedback on intent parsing accuracy to improve future predictions", inputSchema: { type: "object", properties: { original_input: { type: "string", description: "Original natural language input" }, parsed_result: { type: "object", description: "The parsed result that was incorrect" }, correct_interpretation: { type: "object", description: "What the correct interpretation should have been" }, feedback_notes: { type: "string", description: "Additional notes about what went wrong" } }, required: ["original_input", "feedback_notes"] } }; export async function handleProvideFeedback(args) { const { original_input, parsed_result, correct_interpretation, feedback_notes } = args; const sessionId = generateSessionId(); // Log feedback for future model improvements logInteraction({ session_id: sessionId, tool_name: 'provide_feedback', user_input: { original_input, feedback_notes }, parsed_output: { parsed_result, correct_interpretation }, user_feedback: feedback_notes, success_metrics: { operation_success: false, // This indicates the original parsing was wrong user_satisfaction: 0 // User had to provide feedback = dissatisfied } }); return { content: [ { type: "text", text: JSON.stringify({ message: "Thank you for the feedback! This will help improve future intent recognition.", feedback_recorded: true, original_input: original_input, feedback_notes: feedback_notes }, null, 2) } ], isError: false }; }