score:4
No you don't need to take it and recheck it in. Only if you are continuing on a low cost flight, you would need to collect your bag, check out, got the checkin desk of the low cost carrier and check in again. It is not advisable to take this route, because if you have a delay on your incoming flight, because of which you miss your connection, you would need to buy a new ticket. Since you are continuing to Stuttgart on klm, I expect that you will be flying on one ticket. You will see that on checkin jakarta the labels will already have Stutgard on them printed.
It might be beneficial to know your EU rights.
Since you are transferring in Amsterdam and not leaving the airport you don't need a visa for the Netherlands. In most cases this is irrelevant, since most visa are Schengen, which entitles you to enter any schengen country, but I believe that it still is possible to be persona non-grata in one country and be allowed to enter the other in which a country specific visa is issued.
Upvote:5
If you are holding a type (D) visa issued by another Schengen state (in your case Germany), then you do not need a via to transit via Amsterdam airport. Actually you can use your type (D) visa to visit any other Schengen state for not more than 90 days. This is the case for all type D visas since a 2010 regulation modifying the Schengen Convention (article 18).
Regarding the luggage, if both flights in one ticket and operated by the same airlines (in your case KLM), then you will not need to re-check it in again, just make sure when you check it in in Jakarta, check the luggage slip it will show where will you pick it up (in your case it should show Stuttgart).