As answered in this question the xdt:Locator
attribute needs to use the Condition
syntax. So the required selector is:
<agent type="Sitecore.Tasks.DatabaseAgent"
xdt:Transform="Remove"
xdt:Locator="Condition(param/@desc='database' and param/text()='master')" />