Skip to main content
Glama
tao12345666333

Civo MCP Server

shutdown_instance

Shut down a Civo cloud instance by providing its instance ID and region.

Instructions

Shutdown a cloud instance on Civo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesInstance ID
regionYesRegion identifier

Implementation Reference

  • The core handler function that executes the shutdown_instance tool logic. It makes a PUT request to the Civo API endpoint /instances/{id}/stop to shut down the instance.
    export async function shutdownInstance(params: {
      id: string;
      region: string;
    }): Promise<any> {
      checkRateLimit();
    
      const url = `${CIVO_API_URL}/instances/${params.id}/stop`;
      const response = await fetch(url, {
        method: 'PUT',
        headers: {
          Authorization: `Bearer ${CIVO_API_KEY}`,
        },
        body: new URLSearchParams({
          region: params.region,
        }),
      });
    
      if (!response.ok) {
        throw new Error(
          `Civo API error: ${response.status} ${response.statusText}`
        );
      }
    
      return response.json();
    }
  • The tool definition/schema for shutdown_instance, defining its name, description, and input schema (id and region as required strings).
    export const SHUTDOWN_INSTANCE_TOOL: Tool = {
      name: 'shutdown_instance',
      description: 'Shutdown 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:255-277 (registration)
    The call handler registration for shutdown_instance in the MCP server. It validates arguments (id and region as strings) and calls the shutdownInstance API function, returning a text result.
    case 'shutdown_instance': {
      if (
        typeof args !== 'object' ||
        args === null ||
        typeof args.id !== 'string' ||
        typeof args.region !== 'string'
      ) {
        throw new Error('Invalid arguments for shutdown_instance');
      }
    
      const result = await shutdownInstance(
        args as { id: string; region: string }
      );
      return {
        content: [
          {
            type: 'text',
            text: `Instance ${args.id} shutdown: ${result.result}`,
          },
        ],
        isError: false,
      };
    }
  • src/index.ts:74-74 (registration)
    Tool registration within the server's capabilities - maps SHUTDOWN_INSTANCE_TOOL.name to its schema definition.
    [SHUTDOWN_INSTANCE_TOOL.name]: SHUTDOWN_INSTANCE_TOOL,
  • src/index.ts:101-101 (registration)
    Tool listed in the ListToolsResponse handler so the client knows shutdown_instance is available.
    SHUTDOWN_INSTANCE_TOOL,
Behavior2/5

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

No annotations exist, and the description does not disclose behavioral traits such as whether the shutdown is graceful, requires confirmation, or has side effects (e.g., data loss). The term 'shutdown' is ambiguous without further context.

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 that front-loads the main purpose. However, it could benefit from a brief elaboration on context without becoming verbose.

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?

For a tool with 2 parameters, no annotations, and no output schema, the description is too minimal. It does not explain return values, side effects, or prerequisites, leaving the agent underinformed.

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 description coverage is 100%, so the input schema already describes both parameters (id and region) sufficiently. The description does not add any additional meaning beyond what is in the schema.

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 'Shutdown a cloud instance on Civo' clearly states the action (shutdown) and resource (cloud instance), and distinguishes from sibling tools like start_instance, reboot_instance, and delete_instance.

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 on when to use this tool versus alternatives (e.g., delete_instance). No prerequisites (e.g., instance must be running) or exclusions are mentioned.

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