The Internet of Things will enable objects to be identified, sensed, and controlled remotely across the existing Internet infrastructure. Even though interacting with sensor nodes requires a priori knowledge about the application profile implemented on the desired nodes, it is infeasible for user applications to have any information in advance or to obtain such information from resource-constrained sensor nodes. In this paper, we propose a scalable and efficient metadata framework that allows user applications to learn all about sensor nodes at runtime without storing heavy descriptive data within the nodes themselves. In this framework, every sensor node has globally unique identifiers, and their metadata describing functions and capabilities are stored in distributed metadata servers. To enable metadata retrieval from the globally unique identifier of sensor nodes, we exploit a hierarchical resolution server architecture defined in global standards. We prove the feasibility as well as scalability and efficiency of the proposed framework by evaluating the metadata retrieval overhead from a ZigBee based testbed.