Find Implementations
find_implementationsFind all types implementing an interface in a C# solution, including external and generic closings, before changing an interface member. Returns implementers with declaration, namespace and test-project flags.
Instructions
List the types that implement an interface, in the solution or external (IDisposable). The interface counterpart to get_type_hierarchy (classes) and find_overrides.
Use it before changing an interface member.
Returns items [{name, isAbstract (absent on interfaces and unknown kinds), kind, isTestProject, namespace, declaration, via, closes, through, generated (a generator's type)}], count, totalFound, truncated - at most 100, items without via first, then by name. 'declaration' = a generic's arity form ('PolicyWrap'); via:'back-edge' = known only from the interface's implementer list, 'inherited' = through a solution base class or interface, 'derived-interface' = an interface extending it (implements nothing), 'unbound' = rests on a base-list entry that did not bind (a namesake's or none). 'closes' = the row's type arguments for the interface, bases included ('ContentSavedNotification'; an open generic: its own type parameter); 'through' = the base or interface it comes via. Absent when empty or unreadable.
A closed query ('IHandler') keeps the types closing it with those arguments; typeArgumentFilter counts the others closing it otherwise (otherClosings) or only over their own type parameters (openClosings). typeArgumentBase narrows to an argument's type family (see the parameter); typeArgumentBaseFilter gives familyTypes and leftOut. An unreadable closing stays, as closing:'unresolved'.
Test implementers: excluded by default, counted by testImplementationsFiltered (absent = none).
An empty answer carries a 'hint' when the name is not an interface or no indexed type carries it (then 'nearest': a close type name), and a 'generatedCodeNote' when a generator that did not run may have added it. A leading 'note' marks the list partial when a project's core references did not resolve (restore + refresh_session).
Read-only. Two interfaces sharing a simple name answer as one list.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sessionId": "<sessionId>",
"interfaceName": "<interfaceName>"
},
"name": "find_implementations"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | The session_id returned by analyze_solution. Also takes an absolute .sln/.slnx/.slnf path, analyzed on first use. | |
| includeTests | No | Include test-project implementers (default false - production focus). | |
| interfaceName | Yes | The interface's simple name, case-sensitive, e.g. 'ICodeAnalyzer', or a qualified form ('Ns.IFoo', 'Outer.IInner') where no namesake lies outside it. An arity suffix ('IConsumer`1' / 'IConsumer<T>', or 'IConsumer`0' for the non-generic namesake) filters to that arity; a bare name keeps the merged view of every arity. A concrete type argument ('IConsumer<OrderPlaced>') keeps only the types that close it with that argument. | |
| typeArgumentBase | No | Optional: keep only the types that close the generic interface with a type argument that is this type or derives from or implements it - a simple name, case-sensitive, with an arity suffix for a generic ('DeletedNotification<T>', 'ICancelableNotification'). Only solution types form the family; when none matches, typeArgumentBaseFilter carries a note. |