query protocol sketchgs