get_type_hierarchy
Inheritance chain
How to use it
get_type_hierarchy is exposed by the Sharplens MCP MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the get_type_hierarchy tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
Install Sharplens MCP
npx -y sharplens-mcpOther tools in Sharplens MCP (39)
Compute the usings that fix CS0246/CS0103 (generation-only)
What breaks if changed?
Branching/reachability
Variable assignments and usage
Can A assign to B?
Public-API breaking-change report vs a git ref
Find types/members by attribute
Impact analysis - who calls this?
Project and namespace cycle detection
Unreachable basic blocks per method (real CFG, not heuristics)
Interface/abstract implementations
Reachability + the connecting call path(s) between two methods; follows dispatch, with barriers and a checkpoint
All references; each classified read/write/invocation/cast/typeof/nameof/attribute; optional kind filter
Structural similarity search (token-shingle fingerprints)
Dead code detection
List attributes on a symbol
Full inheritance chain
Multi-hop callers/callees graph with depth bound + cycle detection
Cyclomatic, nesting, LOC, cognitive
Enclosing symbol at position
Find all subclasses
Compiler errors/warnings + configured analyzer findings (StyleCop, Roslynator, NetAnalyzers); matches CI
Full XML docs for a symbol with <inheritdoc> expanded
Which exceptions can escape a method, and where they're caught
Extensions applying to a type — classic and C# 14 blocks
Inspect NuGet/BCL/external assembly types — members + XML docs
All overloads of a method
Detailed signature by name
What does this method call?
Navigate to the base member / interface members a member implements
Semantic info at position
All members by type name
Multiple types in one call
Jump to symbol definition
Compute dead-code removals + newly unused usings (generation-only)
Map a pasted stack trace to file/line/symbol, mangling undone
Glob pattern search (Handler, Get)
Multi-filter search (async, public, etc.)
Compile check without writing