When we moved into our new house the builder mentioned there was a gas line coming out of the house. I'd like to use this to connect a grill. However, looking at the gas pipe I don't see any kind of valve to shut off the gas (attached image). Would I be able to just pop off the cap and connect the grill, or am I missing any other parts?
You would first turn off the gas at the meter. Then, if this pipe extending from the wall is indeed a gas line, you would take off the cap, clean the threads well, install suitable thread sealer made specifically for gas lines and install an appropriate gas shutoff valve. Install the grill gas connection down flow from this new valve using adapter fittings if necessary.
Then in case you ever need to disconnect the grill for winter, cleaning, replacement, moving or whatever else you can shut off this added valve without having to turn off all the gas in the house.
If you ever do disconnect the grill from the valve it would be necessary to cap off the open valve end for safety sake --- just in case someone comes along and accidentally turns on the valve.