Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

create_security_group_rule

Add an ingress rule to a security group on the CloudStack MCP Server by specifying protocol, port range, CIDR list, or user security group list.

Instructions

Create a security group ingress rule

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cidrlistNoCIDR list (comma-separated)
endportNoEnd port
protocolYesProtocol (TCP, UDP, ICMP)
securitygroupidYesSecurity group ID
startportNoStart port
usersecuritygrouplistNoUser security group list

Implementation Reference

  • The main handler function that implements the tool logic by authorizing a security group ingress rule via the CloudStack client and returning a formatted response.
    async handleCreateSecurityGroupRule(args: any) {
      const result = await this.cloudStackClient.authorizeSecurityGroupIngress(args);
      
      return {
        content: [
          {
            type: 'text',
            text: `Created security group rule. Job ID: ${result.authorizesecuritygroupingressresponse?.jobid}\nRule ID: ${result.authorizesecuritygroupingressresponse?.id}`
          }
        ]
      };
    }
  • The tool definition object including name, description, and input schema (parameters with types and requirements) for validating tool inputs.
    {
      name: 'create_security_group_rule',
      description: 'Create a security group ingress rule',
      inputSchema: {
        type: 'object',
        properties: {
          securitygroupid: {
            type: 'string',
            description: 'Security group 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)',
          },
          usersecuritygrouplist: {
            type: 'string',
            description: 'User security group list',
          },
        },
        required: ['securitygroupid', 'protocol'],
        additionalProperties: false,
      },
    },
  • src/server.ts:206-207 (registration)
    The dispatch case in the main tool request handler that routes 'create_security_group_rule' calls to the appropriate security handler method.
    case 'create_security_group_rule':
      return await this.securityHandlers.handleCreateSecurityGroupRule(args);
Behavior2/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. While 'Create' implies a mutation operation, the description doesn't address critical behavioral aspects: whether this requires specific permissions, what happens on success/failure, if the rule takes effect immediately, or potential side effects. For a security-related mutation tool, this represents significant gaps 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.

Conciseness5/5

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

The description is a single, efficient sentence that states the core purpose without unnecessary words. It's appropriately sized for a tool with good schema documentation and gets straight to the point with zero wasted text.

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?

For a security-related mutation tool with no annotations and no output schema, the description is inadequate. It doesn't explain what constitutes a successful creation, what format the response takes, or any error conditions. Given the complexity of security group rules and the lack of structured behavioral information, the description should provide more context about the operation's behavior and outcomes.

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 100% description coverage, providing clear documentation for all 6 parameters. The description adds no additional parameter information beyond what's already in the schema. According to scoring rules, when schema_description_coverage is high (>80%), the baseline is 3 even with no param info in the description.

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

Purpose4/5

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

The description clearly states the action ('Create') and the resource ('security group ingress rule'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its sibling 'create_firewall_rule', which appears to serve a similar network security function, leaving some ambiguity about when to choose one over the other.

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 like 'create_firewall_rule' or other network-related tools. There's no mention of prerequisites, dependencies, or typical use cases, leaving the agent to infer usage context solely from the tool name and parameters.

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