implementations
Find concrete classes that structurally satisfy a Protocol port through real type checking, even when adapters never subclass it explicitly.
Instructions
Find concrete classes that structurally satisfy a Protocol port.
Many hexagonal codebases define ports as Protocols that adapters never
subclass explicitly, so ty's own implementation/typeHierarchy return
nothing for them. This scans classes under SOURCE_ROOT (the whole
workspace by default; see CODENAV_MCP_SOURCE_ROOT) whose method names
cover the protocol's, then verifies each candidate with ty's real type
checker via an in-memory probe file (never written to disk) — so a
result means "assignable", not just "same method names". port_name
must itself resolve to a Protocol class; other classes' subclasses are
better found with references/symbol_info. name and query are
accepted as aliases for port_name. file_path narrows the port lookup
to one file when the name exists in several. Members inherited from
same-workspace base classes, and fields/properties declared by the port,
count when matching names. Directories listed in
CODENAV_MCP_EXTRA_SOURCE_ROOTS (e.g. tests) are scanned too; their
matches (test doubles) are listed under a separate heading.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| query | No | ||
| file_path | No | ||
| port_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |