Skip to main content
Glama

Find Implementations

find_implementations
Read-onlyIdempotent

Find 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

NameRequiredDescriptionDefault
sessionIdYesThe session_id returned by analyze_solution. Also takes an absolute .sln/.slnx/.slnf path, analyzed on first use.
includeTestsNoInclude test-project implementers (default false - production focus).
interfaceNameYesThe 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.
typeArgumentBaseNoOptional: 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.46521
    • changedInput schema / properties / interfaceName / description
      Previous value: -"The interface's simple name, e.g. 'ICodeAnalyzer'. 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."New value: +"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."
  2. Changed1 schema field changedv0.5.46516
    • addedInput schema / properties / typeArgumentBase
      Added value: +{
      +  "default": null,
      +  "description": "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.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  3. Changed1 schema field changedv0.5.46514
    • changedInput schema / properties / interfaceName / description
      Previous value: -"The interface's simple name, e.g. 'ICodeAnalyzer'. 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."New value: +"The interface's simple name, e.g. 'ICodeAnalyzer'. 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."
  4. Changed1 schema field changedv0.5.46513
    • changedInput schema / properties / sessionId / description
      Previous value: -"The session_id returned by analyze_solution."New value: +"The session_id returned by analyze_solution. Also takes an absolute .sln/.slnx/.slnf path, analyzed on first use."
  5. First observed

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover the safety profile (readOnly/idempotent/non-destructive), and the description goes well past them: 100-item cap and sort order, test implementers excluded by default and counted separately, empty-answer 'hint'/'nearest' behavior, a partial-result 'note' tied to restore + refresh_session, and namesake-merging behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and sibling routing are front-loaded before the return-field detail. The body is dense with parenthetical field glosses (via/closes/through/unbound), but most of those sentences carry needed meaning given there is no output schema; some could be trimmed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter tool with no output schema, the description documents the return payload (name, isAbstract absence rules, kind, via values, closes/through, generated, count/totalFound/truncated), edge cases (unreadable closing, truncation, hints), and recovery actions. Nothing an agent needs to interpret results or call correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents sessionId, includeTests, interfaceName closed-query syntax, and typeArgumentBase family narrowing. The description's parameter-side remarks ('closed query keeps the types closing it', 'typeArgumentBase narrows to an argument's type family (see the parameter)') largely echo the schema rather than adding new meaning, so baseline 3 is right.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('List the types that implement an interface') and explicitly positions itself against siblings: 'interface counterpart to get_type_hierarchy (classes) and find_overrides'. An agent can tell which of the three to call without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a concrete trigger ('Use it before changing an interface member') and routes non-interface cases to get_type_hierarchy/find_overrides by labeling this the interface counterpart. It stops short of an explicit when-not statement, but the sibling differentiation supplies the selection logic.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.