Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

create_network

Initiate network creation in CloudStack by defining essential parameters such as name, display text, network offering ID, zone ID, gateway, and netmask for efficient cloud resource management.

Instructions

Create a new network

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
displaytextYesNetwork display text
gatewayNoNetwork gateway
nameYesNetwork name
netmaskNoNetwork netmask
networkofferingidYesNetwork offering ID
zoneidYesZone ID

Implementation Reference

  • The main handler function that executes the create_network tool logic by calling the CloudStack client and formatting the response.
    async handleCreateNetwork(args: any) { const result = await this.cloudStackClient.createNetwork(args); return { content: [ { type: 'text', text: `Created network. Job ID: ${result.createnetworkresponse?.jobid}\nNetwork ID: ${result.createnetworkresponse?.id}` } ] }; }
  • Defines the tool name, description, and input schema for validation.
    name: 'create_network', description: 'Create a new network', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Network name', }, displaytext: { type: 'string', description: 'Network display text', }, networkofferingid: { type: 'string', description: 'Network offering ID', }, zoneid: { type: 'string', description: 'Zone ID', }, gateway: { type: 'string', description: 'Network gateway', }, netmask: { type: 'string', description: 'Network netmask', }, }, required: ['name', 'displaytext', 'networkofferingid', 'zoneid'], additionalProperties: false, }, },
  • src/server.ts:152-153 (registration)
    Tool registration in the main server switch statement, dispatching calls to the handler.
    case 'create_network': return await this.networkHandlers.handleCreateNetwork(args);
  • Supporting CloudStack API client method that performs the actual 'createNetwork' API request.
    async createNetwork(params: CloudStackParams): Promise<CloudStackResponse> { return this.request('createNetwork', params); }

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