Fixed syntax issue, now works as an ArcGIS tool.