Skip to main content
Glama
GoCoder7
by GoCoder7

coolify_application_management

Manage Coolify applications: deploy, monitor status, start/stop/restart services, create new applications, and list existing ones through unified commands.

Instructions

Comprehensive application management: deploy, get info, list, check status, start/stop/restart, or create applications

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform on applications
applicationIdNoApplication ID (required for most actions except list/create)
forceNoForce deployment even if another is in progress
branchNoGit branch to deploy
serverIdNoFilter applications by server ID
statusNoFilter by application status
nameNoApplication name (for create action)
descriptionNoApplication description (for create action)
git_repositoryNoGit repository URL (for create action)
git_branchNoGit branch (for create action)
build_packNoBuild pack to use (for create action)

Implementation Reference

  • The primary handler function that implements all logic for the coolify_application_management tool, using a switch statement on the 'action' parameter to call appropriate Coolify API methods.
    export async function handleApplicationManagement( coolifyClient: CoolifyApiClient, args: any ): Promise<any> { try { const { action, applicationId, ...params } = args; let result; let message; switch (action) { case 'deploy': if (!applicationId) throw new Error('applicationId is required for deploy action'); result = await coolifyClient.deployApplication(applicationId, { force: params.force, branch: params.branch }); message = `Deployment triggered for application ${applicationId}`; break; case 'get': if (!applicationId) throw new Error('applicationId is required for get action'); result = await coolifyClient.getApplication(applicationId); message = `Retrieved application ${applicationId}`; break; case 'list': result = await coolifyClient.getApplications(); // Filter locally if parameters provided if (params.serverId || params.status) { result = result.filter((app: any) => { if (params.serverId && app.serverId !== params.serverId) return false; if (params.status && app.status !== params.status) return false; return true; }); } message = `Found ${result.length} applications`; break; case 'status': if (!applicationId) throw new Error('applicationId is required for status action'); result = await coolifyClient.getApplicationStatus(applicationId); message = `Retrieved status for application ${applicationId}`; break; case 'start': if (!applicationId) throw new Error('applicationId is required for start action'); result = await coolifyClient.startApplication(applicationId); message = `Started application ${applicationId}`; break; case 'stop': if (!applicationId) throw new Error('applicationId is required for stop action'); result = await coolifyClient.stopApplication(applicationId); message = `Stopped application ${applicationId}`; break; case 'restart': if (!applicationId) throw new Error('applicationId is required for restart action'); result = await coolifyClient.restartApplication(applicationId); message = `Restarted application ${applicationId}`; break; case 'create': if (!params.name || !params.git_repository || !params.serverId) { throw new Error('name, git_repository, and serverId are required for create action'); } result = await coolifyClient.createApplication({ name: params.name, description: params.description, git_repository: params.git_repository, git_branch: params.git_branch, build_pack: params.build_pack, }); message = `Created application ${params.name}`; break; default: throw new Error(`Unknown application action: ${action}`); } return { content: [ { type: 'text', text: JSON.stringify({ success: true, data: result, message: message }, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text', text: JSON.stringify({ success: false, error: error instanceof Error ? error.message : 'Unknown error occurred' }, null, 2) } ], isError: true }; } }
  • The Tool object definition including the name, description, and detailed inputSchema for parameter validation and documentation.
    export const applicationManagementTool: Tool = { name: 'coolify_application_management', description: 'Comprehensive application management: deploy, get info, list, check status, start/stop/restart, or create applications', inputSchema: { type: 'object', properties: { action: { type: 'string', enum: ['deploy', 'get', 'list', 'status', 'start', 'stop', 'restart', 'create'], description: 'Action to perform on applications', }, applicationId: { type: 'string', description: 'Application ID (required for most actions except list/create)', }, // Deploy parameters force: { type: 'boolean', description: 'Force deployment even if another is in progress', default: false, }, branch: { type: 'string', description: 'Git branch to deploy', }, // List parameters serverId: { type: 'string', description: 'Filter applications by server ID', }, status: { type: 'string', enum: ['running', 'stopped', 'building', 'error'], description: 'Filter by application status', }, // Create parameters name: { type: 'string', description: 'Application name (for create action)', }, description: { type: 'string', description: 'Application description (for create action)', }, git_repository: { type: 'string', description: 'Git repository URL (for create action)', }, git_branch: { type: 'string', description: 'Git branch (for create action)', }, build_pack: { type: 'string', description: 'Build pack to use (for create action)', }, }, required: ['action'], }, };
  • src/index.ts:125-134 (registration)
    Registration of the tool in the MCP server's list tools request handler, making the schema available to clients.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: [ applicationManagementTool, environmentConfigurationTool, systemManagementTool, documentationTool, ], }; });
  • src/index.ts:150-152 (registration)
    Dispatch registration in the MCP tool call request handler switch statement, routing calls to the specific handler function.
    case 'coolify_application_management': return await handleApplicationManagement(this.coolifyClient, args);

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/GoCoder7/coolify-mcp-server'

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