You can do that with the density tag:
You will get code completion in Visual Studio if you set 'xsi:noNamespaceSchemaLocation' to the location of MagickScript.xsd. This file is included in the zip file of the release.
<mslxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="C:\YourFolder\MagickScript.xsd"><readfileName="input.jpg"><densityvalue="300"/><writefileName="output.jpg"/></read></msl>