How to Retrieve value from a User-Defined Table Type (UDTT)
You need to create the type inside the database where you will declare it - data types can not be reached across databases or servers. This is no different from creating a local variable using an alias type - it has to exist in the context of the current database (or your code has to execute in the context of the database where the type exists, e.g.

EXEC dbname.sys.sp_executesql N'DECLARE @t dbo.type; 
  INSERT @t(cols) SELECT whatever...;
  -- do other stuff but it has to be in this dynamic SQL block';