gograph_implementers
Find all concrete structs that implement a named Go interface via duck-typing. Optionally restrict to test files for mock discovery.
Instructions
Find all concrete structs that implement a named Go interface via duck-typing (structs whose method set is a superset of the interface's methods). The MCP server checks freshness before this call and refreshes in the current requested analysis mode; precise and precise_fallback graphs retry CHA/SSA after source changes. Read-only; no side effects. Set test_only=true to restrict to structs in *_test.go files (mocks/stubs). WHEN TO USE: When tracing polymorphism, locating dependency injection points, or finding all mock implementations of an interface. NOT TO USE: For interfaces a struct satisfies — inverse direction (use gograph_interfaces instead); for struct fields (use gograph_fields). RETURNS: List of implementing struct names with package paths and file locations; empty when no struct implements the interface.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| interface | Yes | The name of the interface (e.g., 'AuthService') | |
| test_only | No | If true, return only structs defined in test or mock files (replaces gograph_mocks) |