Skip to main content
Glama

start_instance

Start a cloud instance on Civo by providing the instance ID and region identifier to activate virtual servers.

Instructions

Start a cloud instance on Civo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesInstance ID
regionYesRegion identifier

Implementation Reference

  • Core implementation of the start_instance tool: sends PUT request to Civo API to start the specified instance.
    export async function startInstance(params: { id: string; region: string; }): Promise<any> { checkRateLimit(); const url = `${CIVO_API_URL}/instances/${params.id}/start`; 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(); }
  • Defines the input schema and metadata for the start_instance tool.
    export const START_INSTANCE_TOOL: Tool = { name: 'start_instance', description: 'Start 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:74-76 (registration)
    Registers the start_instance tool in the MCP server's capabilities.tools dictionary.
    [SHUTDOWN_INSTANCE_TOOL.name]: SHUTDOWN_INSTANCE_TOOL, [START_INSTANCE_TOOL.name]: START_INSTANCE_TOOL, [RESIZE_INSTANCE_TOOL.name]: RESIZE_INSTANCE_TOOL,
  • MCP protocol handler for start_instance: validates input, calls the API function, and formats response.
    case 'start_instance': { if ( typeof args !== 'object' || args === null || typeof args.id !== 'string' || typeof args.region !== 'string' ) { throw new Error('Invalid arguments for start_instance'); } const result = await startInstance( args as { id: string; region: string } ); return { content: [ { type: 'text', text: `Instance ${args.id} started: ${result.result}`, }, ], isError: false, }; }

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