stop_application
Stop a running application in Coolify by providing its UUID. Use the confirm parameter when required for safety.
Instructions
Stop an application. When COOLIFY_REQUIRE_CONFIRM=true, requires confirm: true parameter.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes | Application UUID | |
| confirm | No | Confirm the dangerous operation (required when COOLIFY_REQUIRE_CONFIRM=true) |
Implementation Reference
- src/tools/handlers.ts:217-219 (handler)The core handler logic for the 'stop_application' tool. It validates the required 'uuid' parameter and issues a GET request to the Coolify API endpoint `/applications/{uuid}/stop` to stop the application.case 'stop_application': requireParam(args, 'uuid'); return client.get(`/applications/${args.uuid}/stop`);
- src/tools/definitions.ts:423-433 (schema)The input schema and description for the 'stop_application' tool, defining the required 'uuid' parameter and optional 'confirm' for dangerous operations.name: 'stop_application', description: 'Stop an application. When COOLIFY_REQUIRE_CONFIRM=true, requires confirm: true parameter.', inputSchema: { type: 'object', properties: { uuid: { type: 'string', description: 'Application UUID' }, confirm: { type: 'boolean', description: 'Confirm the dangerous operation (required when COOLIFY_REQUIRE_CONFIRM=true)' } }, required: ['uuid'] } },
- src/index.ts:36-39 (registration)MCP server registration for listing all tools, including 'stop_application', by returning schemas from getToolDefinitions().this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: getToolDefinitions() }));
- src/index.ts:41-67 (registration)MCP server request handler for calling any tool by name, dispatching to handleTool which routes 'stop_application' to its specific case.this.server.setRequestHandler(CallToolRequestSchema, async (request) => { if (!this.client) { throw new McpError(ErrorCode.InternalError, 'Client not initialized'); } const { name, arguments: args } = request.params; // Block write operations in read-only mode if (isReadOnlyMode() && !READ_ONLY_TOOLS.includes(name)) { throw new McpError( ErrorCode.InvalidRequest, `Operation '${name}' is not allowed in read-only mode. Set COOLIFY_READONLY=false to enable write operations.` ); } try { const result = await handleTool(this.client, name, args || {}); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error) { if (error instanceof McpError) throw error; const message = error instanceof Error ? error.message : 'Unknown error'; throw new McpError(ErrorCode.InternalError, `Tool execution failed: ${message}`); } });
- src/tools/definitions.ts:45-64 (helper)'stop_application' is classified as a dangerous operation, triggering confirmation checks via isDangerousOperation().export const DANGEROUS_OPERATIONS = [ 'stop_application', 'restart_application', 'stop_service', 'restart_service', 'stop_database', 'restart_database', 'deploy_application', 'deploy', 'execute_command', 'delete_server', 'delete_project', 'delete_environment', 'delete_application', 'delete_service', 'delete_database', 'delete_private_key', 'delete_github_app', 'cancel_deployment' ];