tell application "TaskPaper"
tell front document
repeat with each in entries
-- perform task
end repeat
end tell
end tell
For example to remove the @today tag from all entries that have the @done tag you could use this script:
tell application "TaskPaper"
tell front document
repeat with each in entries
tell each
if (exists tag named "today") and (exists tag named "done") then
delete tag named "today"
end if
end tell
end repeat
end tell
end tell