Parentheses will work if you have a material with them in the name (I just tested).
Attached a model and definition that has M
assigned in three different ways: text panel, right-click Set One Material, and a Value List. Open the 3dm file, then the gh file.
rhino_gh_materialsfromdoc.3dm (3.6 MB)
rhino_gh_materialsfromdoc.gh