Skip to main content
Glama

coolify_service_lifecycle

Manage service states in Coolify infrastructure by starting, stopping, or restarting services using their UUID.

Instructions

Service lifecycle management - start, stop, and restart services

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform: start (start service), stop (stop service), restart (restart service)
uuidYesService UUID (required for all actions)

Implementation Reference

  • The handler function that implements the core logic for the coolify_service_lifecycle tool. It takes action (start/stop/restart) and service UUID, then calls the appropriate Coolify API endpoint and returns the response.
    async serviceLifecycle(action: string, uuid: string) {
      if (!uuid) throw new Error('Service UUID is required for all lifecycle actions');
      
      switch (action) {
        case 'start':
          const startResponse = await this.apiClient.post(`/services/${uuid}/start`);
          return { content: [{ type: 'text', text: JSON.stringify(startResponse.data, null, 2) }] };
        case 'stop':
          const stopResponse = await this.apiClient.post(`/services/${uuid}/stop`);
          return { content: [{ type: 'text', text: JSON.stringify(stopResponse.data, null, 2) }] };
        case 'restart':
          const restartResponse = await this.apiClient.post(`/services/${uuid}/restart`);
          return { content: [{ type: 'text', text: JSON.stringify(restartResponse.data, null, 2) }] };
        default:
          throw new Error(`Unknown service lifecycle action: ${action}`);
      }
    }
  • The tool definition including name, description, and input schema validation for coolify_service_lifecycle.
    {
      name: 'coolify_service_lifecycle',
      description: 'Service lifecycle management - start, stop, and restart services',
      inputSchema: {
        type: 'object',
        properties: {
          action: { 
            type: 'string', 
            enum: ['start', 'stop', 'restart'],
            description: 'Action to perform: start (start service), stop (stop service), restart (restart service)'
          },
          uuid: { 
            type: 'string', 
            description: 'Service UUID (required for all actions)' 
          },
        },
        required: ['action', 'uuid'],
      },
    },
  • src/index.ts:130-131 (registration)
    The switch case in the main tool dispatcher that registers and routes calls to the serviceLifecycle handler for this tool.
    case 'coolify_service_lifecycle':
      return await this.handlers.serviceLifecycle(args.action, args.uuid);

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/HowieDuhzit/CoolifyMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server