Output features from a geoprocessing service can be read and used across Desktop (ArcMap) and Web clients (JavaScript API) equally. Of course the web clients require a bit of coding if you're building from scratch. You could always use the Web App Builder to construct a web app that consumes the GP Service that has outputted features (GPFeatureRecordSet if you want to be technical), and the app will display the output.
If you're set on GeoJson (and I emphasis GeoJSON as the output from the GP Service or arcpy commands is Esri JSON) you'll need to do some modifications within your script tool. This forum post talks about some methods of converting features into GeoJSON. Specially it points to this code which I'd use as a starting point. With that you'd be getting back a "string" of geojson. Your output parameter in the tool then needs to be a string. After this its up to whatever client you're using (a web app?) to handle and display or present the geojson to the user. I still question exactly why you want to output geojson, in my opinion it doesnt seem to have a lot of use as straight output. I guess you're probably doing something else with it after this conversion. If thats the case, I'd consider whatever app you're building to consume the GP Service just as important as the GP Service itself. The two are going to have to work together to perform the whole workflow.
You also note a problem with empty output. I'd need to see the input you're giving it. I'm guessing you're passing in some feature set which your tool parsing doesnt like? Best way to debug this would be to do some AddMessages() in your script and turn the GP Service level to INFO.
Also note, when consuming a service from the REST end point (services directory), you can specify f=json
and get back the JSON string of features from a gpfeaturerecordset (this is essentially what the javascript api does). Coming at 10.5 (targeted to be released Q4 2016 or Q1 2017) the Features to JSON tool will output true GeoJSON and the f=geojson
support is added to GP Service output
One more note, I forgot there is a way to get arcpy to spit out some GeoJSON (its noted in the previously mentioned forum post). Just make sure to do some spot checks with it to ensure its giving you the expected results.
geos = arcpy.CopyFeatures_management(r'C:\data\test.shp', arcpy.Geometry())
print(geos)
>>>[<Polygon object at 0x14a65250[0x14a65100]>, <Polygon object at 0x14a65290[0x14a650c0]>, <Polygon object at 0x14a652d0[0x14a65020]>]
for g in geos:
print(g.__geo_interface__)
>>>{'type': 'Polygon', 'coordinates': [[(-120.3638928065078, 55.853314527843224), (-98.0225669957702, 54.736248236766755), (-97.46403385068163, 24.57545839209115), (-120.3638928065078, 25.133991537179725), (-120.3638928065078, 55.853314527843224)]]}