Skip to main content
Glama
tao12345666333

Civo MCP Server

delete_kubernetes_cluster

Remove a Kubernetes cluster from the Civo cloud platform by specifying the cluster ID and region identifier to decommission resources and stop billing.

Instructions

Delete a Kubernetes cluster on Civo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesCluster ID
regionYesRegion identifier

Implementation Reference

  • Handler logic for the delete_kubernetes_cluster tool: validates input arguments and calls the deleteCluster API function.
    case 'delete_kubernetes_cluster': { if ( typeof args !== 'object' || args === null || typeof args.id !== 'string' || typeof args.region !== 'string' ) { throw new Error('Invalid arguments for delete_kubernetes_cluster'); } const result = await deleteCluster( args as { id: string; region: string } ); return { content: [ { type: 'text', text: `Deleted Kubernetes cluster ${args.id}: ${result.result}`, }, ], isError: false, }; }
  • Core helper function that performs the actual DELETE request to the Civo API to delete the Kubernetes cluster.
    export async function deleteCluster(params: { id: string; region: string; }): Promise<any> { checkRateLimit(); const url = new URL(`${CIVO_API_URL}/kubernetes/clusters/${params.id}`); url.searchParams.set('region', params.region); const response = await fetch(url.toString(), { method: 'DELETE', headers: { Authorization: `Bearer ${CIVO_API_KEY}`, }, }); if (!response.ok) { throw new Error( `Civo API error: ${response.status} ${response.statusText}` ); } return response.json(); }
  • Tool schema definition including name, description, and input validation schema.
    export const DELETE_KUBERNETES_CLUSTER_TOOL: Tool = { name: 'delete_kubernetes_cluster', description: 'Delete a Kubernetes cluster on Civo', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Cluster ID', }, region: { type: 'string', description: 'Region identifier', }, }, required: ['id', 'region'], }, };
  • src/index.ts:86-89 (registration)
    Registration of the Kubernetes tools, including delete_kubernetes_cluster, in the server capabilities.
    [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,

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