Skip to main content
Glama
tao12345666333

Civo MCP Server

delete_instance

Deletes a cloud instance by ID and region to manage and clean up resources.

Instructions

Delete a cloud instance on Civo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesInstance ID
regionYesRegion identifier

Implementation Reference

  • The actual handler/API function that executes the delete instance logic. It sends a DELETE request to the Civo API to delete an instance by ID and region.
    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();
    }
  • src/index.ts:449-471 (registration)
    The tool handler case in the main server that routes 'delete_instance' calls to the deleteInstance API function. Validates arguments, calls deleteInstance, and returns a success message.
    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/schema for delete_instance, specifying name, description, and input schema requiring 'id' (string) and 'region' (string).
    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:70-92 (registration)
    Registration of DELETE_INSTANCE_TOOL in the server's tool list using its name as the key.
        tools: {
          [CREATE_INSTANCE_TOOL.name]: CREATE_INSTANCE_TOOL,
          [LIST_INSTANCES_TOOL.name]: LIST_INSTANCES_TOOL,
          [REBOOT_INSTANCE_TOOL.name]: REBOOT_INSTANCE_TOOL,
          [SHUTDOWN_INSTANCE_TOOL.name]: SHUTDOWN_INSTANCE_TOOL,
          [START_INSTANCE_TOOL.name]: START_INSTANCE_TOOL,
          [RESIZE_INSTANCE_TOOL.name]: RESIZE_INSTANCE_TOOL,
          [DELETE_INSTANCE_TOOL.name]: DELETE_INSTANCE_TOOL,
          [LIST_DISK_IMAGES_TOOL.name]: LIST_DISK_IMAGES_TOOL,
          [GET_DISK_IMAGE_TOOL.name]: GET_DISK_IMAGE_TOOL,
          [LIST_SIZES_TOOL.name]: LIST_SIZES_TOOL,
          [LIST_REGIONS_TOOL.name]: LIST_REGIONS_TOOL,
          [LIST_NETWORKS_TOOL.name]: LIST_NETWORKS_TOOL,
          [CREATE_NETWORK_TOOL.name]: CREATE_NETWORK_TOOL,
          [RENAME_NETWORK_TOOL.name]: RENAME_NETWORK_TOOL,
          [DELETE_NETWORK_TOOL.name]: DELETE_NETWORK_TOOL,
          [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,
        },
      },
    }
  • src/index.ts:96-118 (registration)
    Registration of DELETE_INSTANCE_TOOL in the ListToolsRequestSchema handler, making it visible to clients listing available tools.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        CREATE_INSTANCE_TOOL,
        LIST_INSTANCES_TOOL,
        REBOOT_INSTANCE_TOOL,
        SHUTDOWN_INSTANCE_TOOL,
        START_INSTANCE_TOOL,
        RESIZE_INSTANCE_TOOL,
        DELETE_INSTANCE_TOOL,
        LIST_DISK_IMAGES_TOOL,
        GET_DISK_IMAGE_TOOL,
        LIST_SIZES_TOOL,
        LIST_REGIONS_TOOL,
        LIST_NETWORKS_TOOL,
        CREATE_NETWORK_TOOL,
        RENAME_NETWORK_TOOL,
        DELETE_NETWORK_TOOL,
        LIST_KUBERNETES_CLUSTERS_TOOL,
        CREATE_KUBERNETES_CLUSTER_TOOL,
        DELETE_KUBERNETES_CLUSTER_TOOL,
        LIST_KUBERNETES_VERSIONS_TOOL,
      ],
    }));
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must disclose behavioral traits like irreversibility or side effects. It only states 'delete', giving no warning about permanent data loss or whether the instance must be stopped first.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence. While very short, it is front-loaded and contains no wasted words, though it could be slightly expanded without losing conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simple parameters and lack of output schema, the description still omits crucial context like permanence, required instance state, or any side effects. It is not complete enough for safe invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds no extra meaning beyond what the schema already provides (id and region).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Delete', the resource 'cloud instance', and the platform 'Civo'. It distinguishes this tool from siblings like 'reboot_instance' or 'shutdown_instance' since deletion is a permanent action.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool vs alternatives (e.g., shutdown for temporary stop). There is no mention of prerequisites or caution about permanent data loss.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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