I have now created this function as follows (in documentation now) :
is_pocketable "OBJECT_ID"
"Returns true if when hypothetically taking an object it would not exceed weight or item carry limits (to be taken). If the referenced item is held by the player, then this function will return true, and a subsequent call to ": pocket" will simply do nothing."