How to get MSSQL Type definition from system tables?
You need to query sys.table_types:

SELECT
    SchemaName = SCHEMA_NAME(TYPE.schema_id),
    TypeName = TYPE.name,
    ColumnID = COL.column_id,
    [Column] = COL.name,
    DataType = ST.name,
    IsNullable = COL.Is_Nullable,
    Length = COL.max_length,
    Precision = COL.[precision],
    Scale = COL.scale,
    Collation = ST.collation
FROM 
    sys.table_types TYPE
    INNER JOIN sys.columns COL ON TYPE.type_table_object_id = COL.object_id
    INNER JOIN sys.systypes AS ST ON ST.xtype = COL.system_type_id
WHERE
    TYPE.is_user_defined = 1
ORDER BY 
    SchemaName,
    TypeName,
    ColumnID


Make sure you are connected to the proper database.

If you want a CREATE TYPE statement like the one from SSMS, you will have to build it from the results of the previous query. That or trace the SSMS's query to see how it builds it when you ask it from the GUI, but there's a chance it's very convoluted (although bulletproof).