could be something like:
apply_tag(content, tag, parent_tag)
and if parent_tag is NULL
and there are multiple instances of the tag specified with tag
then it throws an error
I think with both the tag and the parent_tag (if needed) the API could be used to obtain the tag id which could then be used for the actual application of the tag to the specific content