You add service menu entries to .local/share/kservices5/ServiceMenus
The desktop files look like this:
[Desktop Entry]
Type=Service
X-KDE-ServiceTypes=KonqPopupMenu/Plugin
MimeType=all/allfiles;
Actions=messageFun;
Encoding=UTF-8
[Desktop Action messageFun]
Name=Pointless message
Exec=kdialog --msgbox "This is pointless"
It will show up in the actions part of the context menu in dolphin.