Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

create_firewall_rule

Add a firewall rule to secure CloudStack MCP Server by specifying IP address, protocol, ports, and CIDR list to control incoming and outgoing traffic.

Instructions

Create a firewall rule

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cidrlistNoCIDR list (comma-separated)
endportNoEnd port
ipaddressidYesPublic IP address ID
protocolYesProtocol (tcp, udp, icmp)
startportNoStart port

Implementation Reference

  • The main handler function that executes the create_firewall_rule tool. It calls the CloudStack client to create the rule and returns a formatted MCP response.
    async handleCreateFirewallRule(args: any) {
      const result = await this.cloudStackClient.createFirewallRule(args);
      
      return {
        content: [
          {
            type: 'text',
            text: `Created firewall rule. Job ID: ${result.createfirewallruleresponse?.jobid}\nRule ID: ${result.createfirewallruleresponse?.id}`
          }
        ]
      };
    }
  • Tool definition including name, description, and input schema for validation.
    {
      name: 'create_firewall_rule',
      description: 'Create a firewall rule',
      inputSchema: {
        type: 'object',
        properties: {
          ipaddressid: {
            type: 'string',
            description: 'Public IP address ID',
          },
          protocol: {
            type: 'string',
            description: 'Protocol (tcp, udp, icmp)',
          },
          startport: {
            type: 'number',
            description: 'Start port',
          },
          endport: {
            type: 'number',
            description: 'End port',
          },
          cidrlist: {
            type: 'string',
            description: 'CIDR list (comma-separated)',
          },
        },
        required: ['ipaddressid', 'protocol'],
        additionalProperties: false,
      },
    },
  • src/server.ts:160-161 (registration)
    Dispatch registration in the MCP server that routes calls to the network handler.
    case 'create_firewall_rule':
      return await this.networkHandlers.handleCreateFirewallRule(args);
  • Helper method in CloudStack client that wraps the API request for creating a firewall rule.
    async createFirewallRule(params: CloudStackParams): Promise<CloudStackResponse> {
      return this.request('createFirewallRule', params);
    }
Behavior1/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but fails to do so. It does not mention whether this operation is idempotent, requires specific permissions, has side effects (e.g., affecting network traffic), or returns any output. This is inadequate for a mutation tool with zero annotation coverage.

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 extremely concise with a single sentence ('Create a firewall rule'), which is front-loaded and wastes no words. However, this conciseness comes at the cost of under-specification, but per scoring rules, it earns a 5 for brevity and structure.

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

Completeness1/5

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

For a mutation tool with 5 parameters, no annotations, and no output schema, the description is severely incomplete. It lacks essential context such as behavioral traits, usage guidelines, and output expectations, making it inadequate for effective tool invocation by an AI agent.

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 parameters documented in the schema (e.g., 'cidrlist' as 'CIDR list (comma-separated)'). The description adds no parameter information beyond what the schema provides, so it meets the baseline score of 3 for high schema coverage without compensating value.

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 'Create a firewall rule' is a tautology that restates the tool name without adding meaningful context. It specifies the verb ('Create') and resource ('firewall rule'), but lacks differentiation from sibling tools like 'create_security_group_rule' or details about what a firewall rule entails 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 Guidelines1/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 like 'create_security_group_rule' or other network-related tools. The description offers no context about prerequisites, typical scenarios, or exclusions, leaving the agent with no usage direction.

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