Here are some important links that I think any developer should have in there back pocket, if they are going to use, publish, or create GP tools.
This is about Feature and Record sets.
This is about the input and output types that are supported when publishing services.