Skip to main content
Glama
tao12345666333

Civo MCP Server

create_kubernetes_cluster

Provision a Kubernetes cluster on Civo with defined name, region, network, node count, size, and version.

Instructions

Create a new Kubernetes cluster on Civo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesCluster name
regionYesRegion identifier
network_idYesNetwork ID
nodesYesNumber of nodes
node_sizeYesNode size
kubernetes_versionYesKubernetes version

Implementation Reference

  • Schema definition for the create_kubernetes_cluster tool, defining input properties (name, region, network_id, nodes, node_size, kubernetes_version) and required fields.
    export const CREATE_KUBERNETES_CLUSTER_TOOL: Tool = {
      name: 'create_kubernetes_cluster',
      description: 'Create a new Kubernetes cluster on Civo',
      inputSchema: {
        type: 'object',
        properties: {
          name: {
            type: 'string',
            description: 'Cluster name',
          },
          region: {
            type: 'string',
            description: 'Region identifier',
          },
          network_id: {
            type: 'string',
            description: 'Network ID',
          },
          nodes: {
            type: 'number',
            description: 'Number of nodes',
          },
          node_size: {
            type: 'string',
            description: 'Node size',
          },
          kubernetes_version: {
            type: 'string',
            description: 'Kubernetes version',
          },
        },
        required: [
          'name',
          'region',
          'network_id',
          'nodes',
          'node_size',
          'kubernetes_version',
        ],
      },
    };
  • Handler for the create_kubernetes_cluster tool - validates arguments, calls the createCluster API function, and returns a formatted response.
    case 'create_kubernetes_cluster': {
      if (
        typeof args !== 'object' ||
        args === null ||
        typeof args.name !== 'string' ||
        typeof args.region !== 'string' ||
        typeof args.network_id !== 'string' ||
        typeof args.nodes !== 'number' ||
        typeof args.node_size !== 'string' ||
        typeof args.kubernetes_version !== 'string'
      ) {
        throw new Error('Invalid arguments for create_kubernetes_cluster');
      }
    
      const cluster = await createCluster(
        args as {
          name: string;
          region: string;
          network_id: string;
          nodes: number;
          node_size: string;
          kubernetes_version: string;
        }
      );
      return {
        content: [
          {
            type: 'text',
            text: `Created Kubernetes cluster ${cluster.name} (ID: ${cluster.id})`,
          },
        ],
        isError: false,
      };
    }
  • src/index.ts:87-93 (registration)
    Registration of the tool in the server's capabilities object, mapping the tool name to the tool definition.
            [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:114-118 (registration)
    Listing the tool in the ListTools handler so it appears in the available tools list.
        CREATE_KUBERNETES_CLUSTER_TOOL,
        DELETE_KUBERNETES_CLUSTER_TOOL,
        LIST_KUBERNETES_VERSIONS_TOOL,
      ],
    }));
  • The actual API helper function createCluster that makes a POST request to the Civo API to create a Kubernetes cluster.
    export async function createCluster(params: {
      name: string;
      region: string;
      network_id: string;
      nodes: number;
      node_size: string;
      kubernetes_version: string;
    }): Promise<CivoKubernetesCluster> {
      checkRateLimit();
    
      const url = `${CIVO_API_URL}/kubernetes/clusters`;
      const response = await fetch(url, {
        method: 'POST',
        headers: {
          Authorization: `Bearer ${CIVO_API_KEY}`,
          'Content-Type': 'application/x-www-form-urlencoded',
        },
        body: new URLSearchParams({
          name: params.name,
          region: params.region,
          network_id: params.network_id,
          nodes: params.nodes.toString(),
          node_size: params.node_size,
          kubernetes_version: params.kubernetes_version,
        }),
      });
    
      if (!response.ok) {
        throw new Error(
          `Civo API error: ${response.status} ${response.statusText}`
        );
      }
    
      return response.json();
    }
Behavior2/5

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

No annotations are present, so the description bears full responsibility for disclosing behavioral traits. It only states 'Create' (a write operation) but omits side effects like potential costs, asynchronous provisioning, idempotency, or authorization requirements. This is insufficient for an agent to assess impact.

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, concise sentence with no wasted words. It is well front-loaded, immediately stating the action and resource. However, it could be slightly more structured by listing key aspects like required parameters or default behavior.

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 tool has six required parameters and no output schema, the description lacks critical context about the cluster creation process, such as expected return values, provisioning time, or error conditions. The agent cannot infer necessary steps like waiting for cluster readiness.

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?

Since the input schema provides descriptions for all six parameters, the description adds no additional semantic value beyond the schema. The baseline score of 3 is appropriate because the description does not further explain parameter formatting, constraints, or interdependencies.

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 verb 'Create' and the resource 'Kubernetes cluster on Civo', making the primary action unambiguous. However, it does not distinguish this from sibling tools like 'create_instance' beyond the resource type, and could benefit from specifying that it creates a new managed Kubernetes cluster.

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 usage guidelines are provided. The description does not indicate when to use this tool over alternatives (e.g., create_instance for non-managed clusters), nor does it mention prerequisites or context such as requiring an existing network or region.

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