diff --git a/meson.build b/meson.build
index 304c4c9..31a11d4 100644
--- a/meson.build
+++ b/meson.build
@@ -149,7 +149,8 @@
                                    ],
                                  link_with : libvpdecc,
                                  install: true,
-                                 include_directories : vpd_tool_INCLUDE
+                                 include_directories : vpd_tool_INCLUDE,
+                                 cpp_args : '-DIPZ_PARSER'
                                  )
 if get_option('vpd-manager').enabled()
     subdir('vpd-manager')
diff --git a/vpd_tool.cpp b/vpd_tool.cpp
index 92ab4e0..74c12ac 100644
--- a/vpd_tool.cpp
+++ b/vpd_tool.cpp
@@ -104,7 +104,7 @@
             vpdToolObj.dumpInventory(jsObject);
         }
 
-        else if (*readFlag)
+        else if (*readFlag && !*Hardware)
         {
             VpdTool vpdToolObj(move(objectPath), move(recordName),
                                move(keyword));
@@ -141,7 +141,12 @@
                                move(keyword), move(val));
             rc = vpdToolObj.updateHardware();
         }
-
+        else if (*readFlag && *Hardware)
+        {
+            VpdTool vpdToolObj(move(objectPath), move(recordName),
+                               move(keyword));
+            vpdToolObj.readKwFromHw();
+        }
         else
         {
             throw runtime_error("One of the valid options is required. Refer "
diff --git a/vpd_tool_impl.cpp b/vpd_tool_impl.cpp
index 9232121..2d777e9 100644
--- a/vpd_tool_impl.cpp
+++ b/vpd_tool_impl.cpp
@@ -1,5 +1,6 @@
 #include "vpd_tool_impl.hpp"
 
+#include "impl.hpp"
 #include "vpd_exceptions.hpp"
 
 #include <cstdlib>
@@ -16,6 +17,7 @@
 namespace fs = std::filesystem;
 using json = nlohmann::json;
 using namespace openpower::vpd::exceptions;
+using namespace openpower::vpd::parser;
 
 Binary VpdTool::toBinary(const std::string& value)
 {
@@ -515,4 +517,56 @@
         throw(VpdJsonException("Json Parsing failed", INVENTORY_JSON_SYM_LINK));
     }
     return rc;
-}
\ No newline at end of file
+}
+
+void VpdTool::readKwFromHw()
+{
+    uint32_t startOffset = 0;
+
+    ifstream inventoryJson(INVENTORY_JSON_SYM_LINK);
+    auto jsonFile = nlohmann::json::parse(inventoryJson);
+
+    for (const auto& item : jsonFile["frus"][fruPath])
+    {
+        if (item.find("offset") != item.end())
+        {
+            startOffset = item["offset"];
+        }
+    }
+
+    Binary completeVPDFile;
+    completeVPDFile.resize(65504);
+    fstream vpdFileStream;
+    vpdFileStream.open(fruPath,
+                       std::ios::in | std::ios::out | std::ios::binary);
+
+    vpdFileStream.seekg(startOffset, ios_base::cur);
+    vpdFileStream.read(reinterpret_cast<char*>(&completeVPDFile[0]), 65504);
+    completeVPDFile.resize(vpdFileStream.gcount());
+    vpdFileStream.clear(std::ios_base::eofbit);
+
+    if (completeVPDFile.empty())
+    {
+        throw std::runtime_error("Invalid File");
+    }
+    Impl obj(completeVPDFile);
+    std::string keywordVal = obj.readKwFromHw(recordName, keyword);
+
+    if (!keywordVal.empty())
+    {
+        json output = json::object({});
+        json kwVal = json::object({});
+        kwVal.emplace(keyword, keywordVal);
+
+        output.emplace(fruPath, kwVal);
+
+        debugger(output);
+    }
+    else
+    {
+        std::cerr << "The given keyword " << keyword << " or record "
+                  << recordName
+                  << " or both are not present in the given FRU path "
+                  << fruPath << std::endl;
+    }
+}
diff --git a/vpd_tool_impl.hpp b/vpd_tool_impl.hpp
index 5ae9284..8b1207d 100644
--- a/vpd_tool_impl.hpp
+++ b/vpd_tool_impl.hpp
@@ -183,6 +183,14 @@
     int updateHardware();
 
     /**
+     * @brief Read Keyword from Hardware
+     * This api is to read a keyword directly from the hardware. The hardware
+     * path, record name and keyword name are received at the time of
+     * initialising the constructor.
+     */
+    void readKwFromHw();
+
+    /**
      * @brief Constructor
      * Constructor is called during the
      * object instantiation for dumpInventory option and
