Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

list_events

Retrieve system events by level, type, and date range to monitor and analyze activity on the CloudStack MCP Server for efficient cloud resource management.

Instructions

List system events

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
enddateNoEnd date (YYYY-MM-DD)
levelNoEvent level (INFO, WARN, ERROR)
startdateNoStart date (YYYY-MM-DD)
typeNoEvent type

Implementation Reference

  • The handler function that executes the list_events tool logic, fetching events via CloudStack client, processing the response, and formatting it into a structured MCP text response.
    async handleListEvents(args: any) {
      const result = await this.cloudStackClient.listEvents(args);
      const events = result.listeventsresponse?.event || [];
      
      const eventList = events.map((event: any) => ({
        id: event.id,
        type: event.type,
        description: event.description,
        level: event.level,
        created: event.created,
        username: event.username,
        domain: event.domain
      }));
    
      return {
        content: [
          {
            type: 'text',
            text: `Found ${eventList.length} events:\n\n${eventList
              .map((event: any) => 
                `• ${event.type} (${event.id})\n  Description: ${event.description}\n  Level: ${event.level}\n  User: ${event.username}\n  Domain: ${event.domain}\n  Created: ${event.created}\n`
              )
              .join('\n')}`
          }
        ]
      };
    }
  • The tool schema definition for 'list_events', including name, description, and inputSchema for validation in MCP.
    {
      name: 'list_events',
      description: 'List system events',
      inputSchema: {
        type: 'object',
        properties: {
          level: {
            type: 'string',
            description: 'Event level (INFO, WARN, ERROR)',
          },
          type: {
            type: 'string',
            description: 'Event type',
          },
          startdate: {
            type: 'string',
            description: 'Start date (YYYY-MM-DD)',
          },
          enddate: {
            type: 'string',
            description: 'End date (YYYY-MM-DD)',
          },
        },
        additionalProperties: false,
      },
    },
  • src/server.ts:166-167 (registration)
    The registration/dispatch case in the MCP server's CallToolRequest handler that routes 'list_events' calls to the monitoring handler.
    case 'list_events':
      return await this.monitoringHandlers.handleListEvents(args);
  • Supporting CloudStack client method that makes the underlying 'listEvents' API request.
    async listEvents(params: CloudStackParams = {}): Promise<CloudStackResponse> {
      return this.request('listEvents', params);
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. 'List system events' implies a read-only operation, but doesn't disclose important behavioral traits: whether this requires specific permissions, what format the listing returns (pagination, sorting, default ordering), rate limits, or whether it's a real-time vs historical query. The description provides minimal behavioral context beyond the basic operation.

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 is maximally concise at just three words ('List system events'), with zero wasted language. It's front-loaded with the core action and resource. While potentially under-specified, it achieves perfect conciseness for what it does communicate.

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 no annotations and no output schema, the description provides insufficient context for a tool with 4 filtering parameters. For a listing operation that likely returns structured data, the description should at minimum indicate the scope of 'system events' and basic return characteristics. The combination of minimal description with no structured metadata leaves significant gaps in understanding how to effectively use this tool.

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?

Schema description coverage is 100%, with all 4 parameters well-documented in the schema itself (date formats, event level values, event type). The description adds no parameter semantics beyond what's already in the schema - it doesn't explain relationships between parameters (like date range filtering), default behaviors, or parameter constraints. With complete schema coverage, the baseline of 3 is appropriate.

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 events' clearly states the verb ('List') and resource ('system events'), which provides basic purpose. However, it doesn't differentiate this tool from other list_* siblings (like list_alerts, list_async_jobs, list_security_groups), leaving ambiguity about what specifically distinguishes 'system events' from other listable entities in this system.

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. With multiple list_* tools available (including list_alerts and list_async_jobs which might overlap with 'events'), there's no indication of when this specific listing is appropriate versus other listing tools. No prerequisites, exclusions, or alternatives are mentioned.

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