Skip to main content
Glama
tao12345666333

Civo MCP Server

create_network

Create a new network on Civo by specifying a label and optional region.

Instructions

Create a new network on Civo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelYesNetwork label
regionNoRegion identifier

Implementation Reference

  • Handler case for 'create_network' tool: validates args (label required), calls createNetwork API function, returns result with network label and ID.
    case 'create_network': {
      if (
        typeof args !== 'object' ||
        args === null ||
        typeof args.label !== 'string'
      ) {
        throw new Error('Invalid arguments for create_network');
      }
    
      const network = await createNetwork(
        args as { label: string; region?: string }
      );
      return {
        content: [
          {
            type: 'text',
            text: `Created network ${network.label} (ID: ${network.id})`,
          },
        ],
        isError: false,
      };
    }
  • API helper function that POSTs to Civo API /v2/networks to create a new network, using CIVO_API_KEY and CIVO_API_URL from civo.ts.
    export async function createNetwork(params: {
      label: string;
      region?: string;
    }): Promise<any> {
      const url = `${CIVO_API_URL}/networks`;
      const response = await fetch(url, {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
          Authorization: `Bearer ${CIVO_API_KEY}`,
        },
        body: JSON.stringify(params),
      });
    
      if (!response.ok) {
        throw new Error(`Failed to create network: ${response.statusText}`);
      }
    
      return await response.json();
    }
  • Tool schema definition for 'create_network': expects object with required 'label' (string) and optional 'region' (string).
    export const CREATE_NETWORK_TOOL: Tool = {
      name: 'create_network',
      description: 'Create a new network on Civo',
      inputSchema: {
        type: 'object',
        properties: {
          label: {
            type: 'string',
            description: 'Network label',
          },
          region: {
            type: 'string',
            description: 'Region identifier',
          },
        },
        required: ['label'],
      },
    };
  • src/index.ts:62-93 (registration)
    Tool registration: CREATE_NETWORK_TOOL is registered in the server capabilities under the key CREATE_NETWORK_TOOL.name ('create_network').
    // Server implementation
    const server = new Server(
      {
        name: 'example-servers/civo',
        version: '0.1.0',
      },
      {
        capabilities: {
          tools: {
            [CREATE_INSTANCE_TOOL.name]: CREATE_INSTANCE_TOOL,
            [LIST_INSTANCES_TOOL.name]: LIST_INSTANCES_TOOL,
            [REBOOT_INSTANCE_TOOL.name]: REBOOT_INSTANCE_TOOL,
            [SHUTDOWN_INSTANCE_TOOL.name]: SHUTDOWN_INSTANCE_TOOL,
            [START_INSTANCE_TOOL.name]: START_INSTANCE_TOOL,
            [RESIZE_INSTANCE_TOOL.name]: RESIZE_INSTANCE_TOOL,
            [DELETE_INSTANCE_TOOL.name]: DELETE_INSTANCE_TOOL,
            [LIST_DISK_IMAGES_TOOL.name]: LIST_DISK_IMAGES_TOOL,
            [GET_DISK_IMAGE_TOOL.name]: GET_DISK_IMAGE_TOOL,
            [LIST_SIZES_TOOL.name]: LIST_SIZES_TOOL,
            [LIST_REGIONS_TOOL.name]: LIST_REGIONS_TOOL,
            [LIST_NETWORKS_TOOL.name]: LIST_NETWORKS_TOOL,
            [CREATE_NETWORK_TOOL.name]: CREATE_NETWORK_TOOL,
            [RENAME_NETWORK_TOOL.name]: RENAME_NETWORK_TOOL,
            [DELETE_NETWORK_TOOL.name]: DELETE_NETWORK_TOOL,
            [LIST_KUBERNETES_CLUSTERS_TOOL.name]: LIST_KUBERNETES_CLUSTERS_TOOL,
            [CREATE_KUBERNETES_CLUSTER_TOOL.name]: CREATE_KUBERNETES_CLUSTER_TOOL,
            [DELETE_KUBERNETES_CLUSTER_TOOL.name]: DELETE_KUBERNETES_CLUSTER_TOOL,
            [LIST_KUBERNETES_VERSIONS_TOOL.name]: LIST_KUBERNETES_VERSIONS_TOOL,
          },
        },
      }
    );
  • src/index.ts:96-118 (registration)
    Tool registration in ListToolsRequestSchema handler: CREATE_NETWORK_TOOL is included in the list of available tools returned to the client.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        CREATE_INSTANCE_TOOL,
        LIST_INSTANCES_TOOL,
        REBOOT_INSTANCE_TOOL,
        SHUTDOWN_INSTANCE_TOOL,
        START_INSTANCE_TOOL,
        RESIZE_INSTANCE_TOOL,
        DELETE_INSTANCE_TOOL,
        LIST_DISK_IMAGES_TOOL,
        GET_DISK_IMAGE_TOOL,
        LIST_SIZES_TOOL,
        LIST_REGIONS_TOOL,
        LIST_NETWORKS_TOOL,
        CREATE_NETWORK_TOOL,
        RENAME_NETWORK_TOOL,
        DELETE_NETWORK_TOOL,
        LIST_KUBERNETES_CLUSTERS_TOOL,
        CREATE_KUBERNETES_CLUSTER_TOOL,
        DELETE_KUBERNETES_CLUSTER_TOOL,
        LIST_KUBERNETES_VERSIONS_TOOL,
      ],
    }));
Behavior2/5

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

No annotations provided; description does not disclose behavioral traits such as idempotency, async behavior, or side effects beyond the basic action.

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?

Single sentence is concise and front-loaded, but lacks additional detail that could be included without harming conciseness.

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?

Despite simple tool with 2 params, lack of usage guidance, output schema, and annotations leaves gaps for an agent to understand full context.

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%, so baseline is 3. Description adds no additional meaning to parameters beyond what schema already provides.

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

Purpose5/5

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

Description clearly states 'Create a new network on Civo', providing verb and resource, and differentiates from sibling tools like delete_network, list_networks, etc.

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 on when to use this tool vs alternatives. Missing prerequisites or comparison with other creation tools like create_instance.

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

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/tao12345666333/civo-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server