code_type_usages returns all locations where a given type appears — as a parameter type, return type, variable annotation, or in another type definition. Use it before changing a type to understand the full impact.
code_type_usages(name="UserDTO")
code_type_usages(name="UserDTO", usage_kind="parameter")
code_type_usages(name="ApiResponse", usage_kind="return")
code_type_usages(name="BaseEntity", usage_kind="definition")
Parameter Type Default Description namestring required Type or interface name usage_kind"all" | "parameter" | "return" | "definition""all"Filter by how the type is used
Kind Finds allEvery reference parameterUsed as a function parameter type returnUsed as a function return type definitionUsed inside another type definition or extends clause
Before adding or removing a field from a type — find all affected functions
Understand how broadly a DTO or response type is used
Trace which functions would need updating if a type changes shape
# What would break if UserDTO.email became optional?
code_type_usages(name="UserDTO", usage_kind="parameter")
→ 12 functions receive this type — check each for .email access