Wrote a new RPC handler in backend for tag query