Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

list_load_balancer_rules

Retrieve load balancer rules for specified public IP or zone on CloudStack MCP Server to manage network traffic distribution effectively.

Instructions

List load balancer rules

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
publicipidNoPublic IP ID to filter rules
zoneidNoZone ID to filter rules

Implementation Reference

  • The handler function that implements the core logic of the 'list_load_balancer_rules' tool. It calls the CloudStack client to list rules, processes the response, and formats it as MCP content.
    async handleListLoadBalancerRules(args: any) {
      const result = await this.cloudStackClient.listLoadBalancerRules(args);
      const rules = result.listloadbalancerrulesresponse?.loadbalancerrule || [];
      
      const ruleList = rules.map((rule: any) => ({
        id: rule.id,
        name: rule.name,
        algorithm: rule.algorithm,
        state: rule.state,
        publicip: rule.publicip,
        publicport: rule.publicport,
        privateport: rule.privateport,
        description: rule.description
      }));
    
      return {
        content: [
          {
            type: 'text',
            text: `Found ${ruleList.length} load balancer rules:\n\n${ruleList
              .map((rule: any) => 
                `• ${rule.name} (${rule.id})\n  Public IP: ${rule.publicip}:${rule.publicport}\n  Private Port: ${rule.privateport}\n  Algorithm: ${rule.algorithm}\n  State: ${rule.state}\n`
              )
              .join('\n')}`
          }
        ]
      };
    }
  • The tool schema definition for 'list_load_balancer_rules', including input schema for parameters like publicipid and zoneid.
    {
      name: 'list_load_balancer_rules',
      description: 'List load balancer rules',
      inputSchema: {
        type: 'object',
        properties: {
          publicipid: {
            type: 'string',
            description: 'Public IP ID to filter rules',
          },
          zoneid: {
            type: 'string',
            description: 'Zone ID to filter rules',
          },
        },
        additionalProperties: false,
      },
    },
  • src/server.ts:162-163 (registration)
    Registration of the tool in the MCP server's request handler switch statement, dispatching to the network handler.
    case 'list_load_balancer_rules':
      return await this.networkHandlers.handleListLoadBalancerRules(args);
  • Helper method in the CloudStack client that makes the actual 'listLoadBalancerRules' API request.
    async listLoadBalancerRules(params: CloudStackParams = {}): Promise<CloudStackResponse> {
      return this.request('listLoadBalancerRules', params);
    }
Behavior1/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 only states the action 'List' without detailing traits like whether it's read-only, paginated, rate-limited, or what the output format might be. For a tool with no annotation coverage, this is a significant gap in transparency.

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

Conciseness4/5

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

The description is a single, efficient sentence that is front-loaded with the core action. It avoids unnecessary words, making it appropriately concise. However, it lacks structure that could enhance clarity, such as separating purpose from usage notes.

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 of listing operations in a cloud environment, no annotations, and no output schema, the description is incomplete. It fails to address behavioral aspects like pagination, error handling, or output format, leaving gaps that could hinder an agent's ability to use the tool effectively.

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 clear descriptions for both parameters (publicipid and zoneid as filters). The description adds no additional parameter semantics beyond what the schema provides, but since the schema adequately covers the parameters, the baseline score of 3 is appropriate.

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

Purpose2/5

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

The description 'List load balancer rules' restates the tool name with minimal elaboration, making it a tautology. It specifies the verb 'List' and resource 'load balancer rules' but lacks differentiation from sibling tools like 'list_networks' or 'list_security_groups', failing to clarify what makes this listing operation unique or its scope beyond the name.

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?

No guidance is provided on when to use this tool versus alternatives. The description does not mention prerequisites, context, or exclusions, such as whether it requires specific permissions or how it relates to other list tools. This leaves the agent without direction on appropriate usage scenarios.

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