When using AppleScript, you need to get the text from DEVONthink Pro, then use the textsoapAgent to clean it, and finally put it back within the app.
It does not trigger the menu as a user might. The menu action actually uses keyboard to copy text from the current app, clean the text, then paste it back in.
This sample script better explains how cleaning works within AppleScript. Here we start with "This is some starting text" and then newText will be "THIS IS SOME STARTING TEXT"
tell application "textsoapAgent"
set origText to "This is some starting text"
set newText to cleanText origText with "Uppercase"
end tell
optionally, if you can script DEVONthink Pro to copy to the clipboard, you can use this:
tell application "textsoapAgent"
cleanClipboard with "Uppercase"
end tell
In this case, it is assumed the script will put the text on the clipboard before hand and put it back wherever it needs to go afterwards.
Finally, if the goal of the Script is to just invoke the cleaner, you might consider a shortcut hot key.

Hope that helps.