type_hierarchy
Reveal inheritance and polymorphism by displaying a type's supertypes and subtypes. Accepts a symbol name or file position, snapping off-target positions to the enclosing symbol.
Instructions
Show the type hierarchy for a type: its supertypes (interfaces it implements, embedded types) and subtypes (types that implement or embed it). PREFER a name (uri + symbol_name) — plumb resolves the exact identifier position for you, avoiding off-by-one errors; a raw file position (uri + line + character) is the fallback and, when it lands off an identifier, is snapped to the enclosing symbol. Useful for understanding inheritance and polymorphism.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "type_hierarchy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uri | No | Absolute path, file:// URI, or workspace-relative path containing the type | |
| line | No | Zero-based line number of the type. Required when symbol_name is not provided. | |
| character | No | Zero-based character offset within the line. Required when symbol_name is not provided. | |
| direction | No | Which direction to traverse: parent types (supertypes), child types (subtypes), or both. Defaults to both. | |
| symbol_name | No | Symbol name to look up instead of a position — PREFERRED over line/character. Accepts plain name or ReceiverType.MethodName form. plumb resolves it against the file's symbols, avoiding the off-by-one and 'no identifier found' errors of a hand-computed position. When provided, line and character are not needed. |