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);
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'List system alerts' but does not describe any behavioral traits, such as whether this is a read-only operation, if it requires specific permissions, how results are returned (e.g., pagination, format), or any rate limits. This leaves significant gaps in understanding how the tool behaves in practice.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description 'List system alerts' is extremely concise, consisting of just three words that directly state the tool's function. It is front-loaded with no unnecessary details, making it easy to parse quickly. This efficiency is appropriate for a simple tool, though it may sacrifice completeness for brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (a list operation with potential filtering), no annotations, and no output schema, the description is incomplete. It does not explain what 'system alerts' includes, how results are structured, or any behavioral aspects like safety or performance. For a tool in a server with many sibling operations, more context is needed to ensure proper use without relying on external knowledge.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 1 parameter with 100% description coverage ('Alert type'), so the schema already documents the parameter. The description does not add any meaning beyond this, such as examples of alert types or how filtering works. With high schema coverage, the baseline score is 3, as the description does not compensate but also does not detract from the schema's information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'List system alerts' clearly states the verb ('List') and resource ('system alerts'), making the basic purpose understandable. However, it lacks specificity about what 'system alerts' entails (e.g., types, severity, source) and does not distinguish this tool from sibling list_* tools like list_events or list_async_jobs, which might also involve alert-like data. This results in a vague but not tautological purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention any context, prerequisites, or exclusions, such as how it differs from other list_* tools (e.g., list_events for historical events vs. alerts for current issues). Without such information, users must infer usage from the tool name alone, which is insufficient for effective decision-making.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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