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
37 lines (36 loc) • 1.3 kB
JavaScript
import { getResources } from "../lib/api-utils.js";
export const getResourcesTool = {
name: "get_resources",
description: "Discover and explore available VME infrastructure resources with intelligent filtering. ⚡ TIP: Use discover_capabilities for comprehensive environment discovery first.",
inputSchema: {
type: "object",
properties: {
type: {
type: "string",
description: "Resource type filter: 'compute', 'network', 'storage', 'vm', or leave empty for all"
},
intent: {
type: "string",
description: "Intent-based filtering: 'create', 'provision', 'list', 'discover', or natural language description"
},
role: {
type: "string",
description: "User role for permission-aware filtering (future enhancement)"
}
},
required: []
}
};
export async function handleGetResources(args) {
const { type, intent, role } = args;
const resources = await getResources(type, intent, role);
return {
content: [
{
type: "text",
text: JSON.stringify(resources, null, 2)
}
],
isError: !!resources.error
};
}