Revo(and evo) allows you to define content types that you can map to mime types such as application/json etc.
What I’ve done in the past is to create my required content type, create a resource based on this content type, don’t assign it a template and just put your processing snippet in its content field. This is about as minimal as you can get using MODx I believe, its not quite as fast as a dedicated php script as you have the slight overhead of of going through MODx to get the page output but its worked OK for me.
So your AJAX call just calls the page e.g.
http://yoursite/index.php?id=50¶meter1¶meter2.....and you get back JSON data or whatever. Because you are using MODx you can use an alias here if set up to do so.
The snippet doesn’t need a flag, it should just do its job, from any resource you put it in.
There may be other ways to do this but this has worked for me.