Skip to main content
Glama

deployments

Manage Coolify deployments by listing, retrieving, deploying, or filtering deployments for specific applications to control application lifecycle and infrastructure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationYesOperation to perform
idNoDeployment UUID
applicationUuidNoApplication UUID (for list_by_app operation)
queryNoJSON query parameters for deploy operation

Implementation Reference

  • Main handler function that executes the deployments tool logic based on the operation parameter.
    export async function deploymentsHandler(args: DeploymentsToolArgs) { const { operation, id, applicationUuid, query } = args; switch (operation) { case 'list': return await safeApiCall(() => listDeployments()); case 'get': if (!id) throw new Error('ID required for get operation'); return await safeApiCall(() => getDeploymentByUuid({ path: { uuid: id } })); case 'deploy': return await safeApiCall(() => deployByTagOrUuid({ query: query ? JSON.parse(query) : {} })); case 'list_by_app': if (!applicationUuid) throw new Error('applicationUuid required for list_by_app operation'); return await safeApiCall(() => listDeploymentsByAppUuid({ path: { uuid: applicationUuid } } as any)); default: throw new Error(`Unknown operation: ${operation}`); } }
  • Registration of the 'deployments' MCP tool on the McpServer instance, including inline schema and wrapper handler.
    // Register deployments tool with proper Zod schema format server.tool( 'deployments', { operation: z.enum([ 'list', 'get', 'deploy', 'list_by_app' ]).describe("Operation to perform"), id: z.string().optional().describe("Deployment UUID"), applicationUuid: z.string().optional().describe("Application UUID (for list_by_app operation)"), query: z.string().optional().describe("JSON query parameters for deploy operation") }, async ({ operation, id, applicationUuid, query }) => { try { console.error('Deployments tool received args:', JSON.stringify({ operation, id, applicationUuid, query }, null, 2)); const result = await deploymentsHandler({ operation, id, applicationUuid, query }); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : String(error)}` }], isError: true }; } } );
  • Zod-based input schema definition for the deployments tool.
    { operation: z.enum([ 'list', 'get', 'deploy', 'list_by_app' ]).describe("Operation to perform"), id: z.string().optional().describe("Deployment UUID"), applicationUuid: z.string().optional().describe("Application UUID (for list_by_app operation)"), query: z.string().optional().describe("JSON query parameters for deploy operation") },

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

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