Nanobodies have gained significant attention as promising tools for cancer diagnostics and treatment due to their unique ability to precisely target specific cancer cells. However, a major challenge lies in the site-specific incorporation of multifunctional molecules into nanobodies, as it is essential to link these molecules in a manner that preserves the nanobody's function and stability while retaining the desired therapeutic or diagnostic properties. This study outlines the development of dual-functional nanobody optical probes for enhanced cancer diagnostics and therapeutic interventions. We designed a dual-functional clickable linker that enables site-specific functionalization of the nanobody, facilitating the simultaneous conjugation of two dyes: indocyanine green for imaging and chlorin e6 for photodynamic therapy. In vitro cellular assays confirmed the successful labeling of the dual-functional dyes, with the nanobody probe exhibiting high cellular binding specificity. In vivo imaging of mice bearing Hep3B tumors revealed clear visualization with a high signal-to-noise ratio. Furthermore, PEGylated probes significantly improved tumor retention, enhancing both imaging contrast and photodynamic therapy efficacy as compared to free chlorin e6. These dual-functional nanobody probes show great promise for the precise diagnosis and treatment of malignant tumors.