Skip to main content
Glama

delete_network

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

Instructions

Delete a network on Civo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesNetwork ID
regionNoRegion identifier

Implementation Reference

  • MCP server handler for 'delete_network' tool: validates input arguments and calls the deleteNetwork API function to execute the deletion.
    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, }; }
  • Tool schema definition for 'delete_network', specifying input parameters (id required, region optional).
    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'], }, };
  • src/index.ts:85-85 (registration)
    Registration of the 'delete_network' tool in the MCP server capabilities.tools map.
    [DELETE_NETWORK_TOOL.name]: DELETE_NETWORK_TOOL,
  • API helper function that performs the actual HTTP DELETE request to Civo's networks endpoint.
    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(); }

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