By default every node should have the menu tab (MENU LOCAL TASK) of View and Edit.
If your module wants to add its own tab but only restricted to content type of "foo", then use the following code snippet.
XYZ
below is your page callback for the new custom tab. Basically it calls another function to validate user's permission but we manipulate it to check the node type (via access callback
).