Skip to main content
Glama
tao12345666333

Civo MCP Server

delete_instance

Remove a cloud instance from the Civo platform by specifying its ID and region to manage infrastructure resources and control costs.

Instructions

Delete a cloud instance on Civo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesInstance ID
regionYesRegion identifier

Implementation Reference

  • The core handler function that executes the DELETE request to the Civo API to delete the instance.
    export async function deleteInstance(params: { id: string; region: string; }): Promise<any> { checkRateLimit(); const url = new URL(`${CIVO_API_URL}/instances/${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(); }
  • The MCP server dispatcher case for 'delete_instance' that validates input and invokes the deleteInstance handler.
    case 'delete_instance': { if ( typeof args !== 'object' || args === null || typeof args.id !== 'string' || typeof args.region !== 'string' ) { throw new Error('Invalid arguments for delete_instance'); } const result = await deleteInstance( args as { id: string; region: string } ); return { content: [ { type: 'text', text: `Instance ${args.id} deleted: ${result.result}`, }, ], isError: false, }; }
  • The Tool definition providing the input schema, name, and description for the delete_instance tool.
    export const DELETE_INSTANCE_TOOL: Tool = { name: 'delete_instance', description: 'Delete a cloud instance on Civo', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Instance ID', }, region: { type: 'string', description: 'Region identifier', }, }, required: ['id', 'region'], }, };
  • src/index.ts:77-77 (registration)
    Registration of the delete_instance tool schema in the MCP server's capabilities.tools dictionary.
    [DELETE_INSTANCE_TOOL.name]: DELETE_INSTANCE_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