AEGIS checks if you can carry a Knife (unstackable) and for a high value like 2000 Weight (that's why if you create a Novice and talk to some quests NPCs you're not supposed to talk, you'll constantly receive messages about needing to use the storage).
Even though it's a workaround and a bad practice, it's the official behavior...
Anyway, getiteminfo and getinventorylist can do what you want (http://pastebin.com/WsdDVNnc, not tested).
Usage: callfunc("F_CheckGetItem", 501, 30, 502, 50, 1002, 20);
Returns -2 if total new inventory entries + current inventory entries exceeds MAX_INVENTORY, -1 if new stackable amount + current stackable amount exceeds MAX_AMOUNT, 0 if the sum of all the new weigth + current weight exeeds MaxWeight and 1 if there's no problem