In most cases, designers have to manually specify both assembly tolerance types and values when they design a mechanical product. Different designers will possibly specify different assembly tolerance types and values for the same nominal geometry. Furthermore, assembly tolerance specification design of a complex product is a highly collaborative process, in which semantic interoperability issues significantly arise. These situations will cause the uncertainty in assembly tolerance specification design and finally affect the quality of the product. In order to reduce the uncertainty and to support the semantic interoperability in assembly tolerance specification design, an ontology-based approach for automatically generating assembly tolerance types is proposed. First of all, an extended assembly tolerance representation model is constructed by introducing a spatial relation layer. The constructed model is hierarchically organized and consists of part layer, assembly feature surface layer, and spatial relation layer. All these layers are defined with Web Ontology Language (OWL) assertions. Next, a meta-ontology for assembly tolerance representations is constructed. With this meta-ontology, the domain-specific assembly tolerance representation knowledge can be derived by reusing or inheriting the classes or properties. Based on this, assembly tolerance representation knowledge is formalized using OWL. As a result, assembly tolerance representation knowledge has well-defined semantics due to the logic-based semantics of OWL, making it possible to automatically detect inconsistencies of assembly tolerance representation knowledge bases. The mapping relations between spatial relations and assembly tolerance types are represented in Semantic Web Rule Language (SWRL). Furthermore, actual generation processes of assembly tolerance types are carried out using Java Expert System Shell (JESS) by mapping OWL-based structure knowledge and SWRL-based constraint knowledge into JESS facts and JESS rules, respectively. Based on this, an approach for automatically generating assembly tolerance types is proposed. Finally, the effectiveness of the proposed approach is demonstrated by a practical example.