A command + parameters can be maximum exactly 950 characters. These 950 characters are reserved for the name of the command, any switches that may be used with the command, and the string you pass to it. Note that between the string and the switches/command is a space which must also be factored in.
//echo <string> means <string> can be maximum 950-4-1 = 945 characters long.
//echo -a <string> means <string> can be maximum 950-7-1 = 942 characters long.
The /var command is a little tricky, because it's actually calling
set -l so you must take this into account when counting bytes of a /var statement. Thus:
//set -l <%varname> <string> means <string> can be maximum 950-9-1 = 940 characters long. In other words, you can not pass a string longer than 940 when using /var, even if you omit the = sign with the var statement.
//tokenize 32 <string> means <string> can be maximum 950-11-1 = 938 characters long.
The longest possible string you can pass to a command is
948 characters long//m <string> means <string> can be maximum 950-1-1 = 948 characters long.
Note that these are only my own findings, they should not be treated as absolute truth. Another note is that we're talking here about "classic" commands, not constructs like //if or //while etc. Plus, as stated, if mIRC internally calls another command like /var calls /set -l, then it is the length of this internal command that must be taken into account instead.