Skip to main content
Glama
tao12345666333

Civo MCP Server

rename_network

Change the name of an existing network in your Civo cloud infrastructure by providing the network ID and new label.

Instructions

Rename a network on Civo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesNetwork ID
labelYesNew network label
regionNoRegion identifier

Implementation Reference

  • MCP server request handler for the 'rename_network' tool: validates input arguments, calls the renameNetwork API helper, and constructs the tool response.
    case 'rename_network': { if ( typeof args !== 'object' || args === null || typeof args.id !== 'string' || typeof args.label !== 'string' ) { throw new Error('Invalid arguments for rename_network'); } const network = await renameNetwork( args as { id: string; label: string; region?: string } ); return { content: [ { type: 'text', text: `Renamed network ${network.id} to ${network.label}`, }, ], isError: false, }; }
  • Supporting function that executes the HTTP PUT request to the Civo API to rename the specified network.
    export async function renameNetwork(params: { id: string; label: string; region?: string; }): Promise<any> { const url = `${CIVO_API_URL}/networks/${params.id}`; const response = await fetch(url, { method: 'PUT', headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${CIVO_API_KEY}`, }, body: JSON.stringify({ label: params.label, region: params.region }), }); if (!response.ok) { throw new Error(`Failed to rename network: ${response.statusText}`); } return await response.json(); }
  • Tool definition including name, description, and input schema (parameters: id (required), label (required), region (optional)).
    export const RENAME_NETWORK_TOOL: Tool = { name: 'rename_network', description: 'Rename a network on Civo', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Network ID', }, label: { type: 'string', description: 'New network label', }, region: { type: 'string', description: 'Region identifier', }, }, required: ['id', 'label'], }, };
  • src/index.ts:84-84 (registration)
    Registers the 'rename_network' tool schema in the MCP server's capabilities.tools map.
    [RENAME_NETWORK_TOOL.name]: RENAME_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