Masks determine the blocks that will be affected. They act as a block filter.
|stone,glass||List of blocks to affect only (whitelist)|
|!stone,glass||Blocks to not affect (blacklist)|
|#existing|| Existing (non air blocks) only. This differs from |
|>stone,glass||Only place above certain blocks|
|<stone,glass||Only place below certain blocks|
|#region||Restrict to your current selection.|
|##minecraft:carpets||Restricts the selection to a block tag|
Note that masks can be combined to form a mask that will only match if all the masks in it match. Combined masks are created by separating the above masks with a space when using the /mask or /gmask commands.