Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

list_alerts

Retrieve system alerts from the CloudStack MCP Server to monitor and manage cloud infrastructure issues. Specify alert types for targeted insights into resource states and operations.

Instructions

List system alerts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoAlert type

Implementation Reference

  • The main handler function that executes the list_alerts tool logic. It calls the CloudStack client to fetch alerts, processes them, and formats the response as MCP content.
    async handleListAlerts(args: any) { const result = await this.cloudStackClient.listAlerts(args); const alerts = result.listalertsresponse?.alert || []; const alertList = alerts.map((alert: any) => ({ id: alert.id, type: alert.type, description: alert.description, sent: alert.sent, name: alert.name })); return { content: [ { type: 'text', text: `Found ${alertList.length} alerts:\n\n${alertList .map((alert: any) => `• ${alert.name} (${alert.id})\n Type: ${alert.type}\n Description: ${alert.description}\n Sent: ${alert.sent}\n` ) .join('\n')}` } ] }; }
  • The input schema and metadata definition for the list_alerts tool.
    name: 'list_alerts', description: 'List system alerts', inputSchema: { type: 'object', properties: { type: { type: 'string', description: 'Alert type', }, }, additionalProperties: false, }, },
  • src/server.ts:168-169 (registration)
    Registration of the list_alerts tool in the MCP server switch statement, dispatching to the monitoring handler.
    case 'list_alerts': return await this.monitoringHandlers.handleListAlerts(args);
  • Helper method in CloudStackClient that makes the actual API request to listAlerts endpoint.
    async listAlerts(params: CloudStackParams = {}): Promise<CloudStackResponse> { return this.request('listAlerts', params); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/phantosmax/cloudstack-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server