update-application
Modify application settings, including health checks, monitoring, and behavior, by specifying the UUID and desired configurations in the MCP server.
Instructions
Update the settings of a specific application, such as health check configurations. This allows you to modify the application's behavior and monitoring settings.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| settings | Yes | ||
| uuid | Yes | Resource UUID |
Implementation Reference
- src/index.ts:202-211 (handler)The handler function for the 'update-application' tool. It extracts uuid and settings from arguments and performs a PATCH request to the Coolify API endpoint `/applications/${uuid}` with the provided settings.case "update-application": { const { uuid, settings } = request.params.arguments as { uuid: string; settings: any }; const result = await coolifyApiCall(`/applications/${uuid}`, 'PATCH', settings); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; }
- src/index.ts:134-140 (registration)Registration of the 'update-application' tool in the ListTools response, including its name, description, and input schema definition.name: "update-application", description: "Update the settings of a specific application, such as health check configurations. This allows you to modify the application's behavior and monitoring settings.", inputSchema: zodToJsonSchema(z.object({ uuid: z.string().describe("Resource UUID"), settings: ApplicationUpdateSchema })), },
- src/index.ts:60-77 (schema)Zod schema defining the updatable settings for an application, used within the input schema of the 'update-application' tool.const ApplicationUpdateSchema = z.object({ health_check_enabled: z.boolean().optional(), health_check_path: z.string().optional(), health_check_port: z.string().nullable().optional(), health_check_host: z.string().nullable().optional(), health_check_method: z.string().optional(), health_check_return_code: z.number().optional(), health_check_scheme: z.string().optional(), health_check_response_text: z.string().nullable().optional(), health_check_interval: z.number().optional(), health_check_timeout: z.number().optional(), health_check_retries: z.number().optional(), health_check_start_period: z.number().optional(), // Add other updateable fields name: z.string().optional(), description: z.string().optional(), domains: z.string().optional(), });
- src/index.ts:24-47 (helper)Helper function that makes authenticated API calls to the Coolify server, used by the 'update-application' handler and other tools.async function coolifyApiCall(endpoint: string, method: string = 'GET', body?: any): Promise<any> { const baseUrl = process.env.COOLIFY_BASE_URL?.replace(/\/$/, '') || 'https://coolify.stuartmason.co.uk'; const url = `${baseUrl}/api/v1${endpoint}`; const response = await fetch(url, { method, headers: { 'Authorization': `Bearer ${process.env.COOLIFY_ACCESS_TOKEN}`, 'Content-Type': 'application/json', }, body: body ? JSON.stringify(body) : undefined, }); if (!response.ok) { const errorBody = await response.json().catch(() => ({})); throw new Error(JSON.stringify({ error: `Coolify API error: ${response.status} ${response.statusText}`, status: response.status, details: errorBody })); } return await response.json(); }