tools: Use C API for inspection (RHBZ#642930).