Skip to main content
Glama
tao12345666333

Civo MCP Server

delete_network

Remove a network from the Civo cloud platform by specifying the network ID and optional region identifier to manage cloud infrastructure resources.

Instructions

Delete a network on Civo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesNetwork ID
regionNoRegion identifier

Implementation Reference

  • Core handler function that performs the HTTP DELETE request to the Civo API to delete the specified network.
    export async function deleteNetwork(params: { id: string; region: string; }): Promise<any> { const url = new URL(`${CIVO_API_URL}/networks/${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(`Failed to delete network: ${response.statusText}`); } return await response.json(); }
  • Tool schema defining name, description, and input schema (requires network ID, optional region).
    export const DELETE_NETWORK_TOOL: Tool = { name: 'delete_network', description: 'Delete a network on Civo', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Network ID', }, region: { type: 'string', description: 'Region identifier', }, }, required: ['id'], }, };
  • MCP tool request handler: validates input arguments and invokes the deleteNetwork API function, formats response.
    case 'delete_network': { if ( typeof args !== 'object' || args === null || typeof args.id !== 'string' ) { throw new Error('Invalid arguments for delete_network'); } const result = await deleteNetwork( args as { id: string; region: string } ); return { content: [ { type: 'text', text: `Deleted network ${args.id}: ${result.result}`, }, ], isError: false, }; }
  • src/index.ts:85-85 (registration)
    Registers the delete_network tool in the MCP server's capabilities.
    [DELETE_NETWORK_TOOL.name]: DELETE_NETWORK_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