gograph_mocks
Find test-file structs that implement a named interface, including mocks, stubs, and test doubles, to avoid creating duplicate test mocks. Returns file locations or empty results when none exist.
Instructions
Find structs in *_test.go files that implement a named interface — test doubles, mocks, and stubs. Equivalent to gograph_implementers with test_only=true; kept for compatibility. 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. WHEN TO USE: When writing tests and wanting to find existing mock implementations before creating a new one. NOT TO USE: For production interface implementers (use gograph_implementers without test_only); prefer gograph_implementers(test_only=true) for new code. RETURNS: Test-file struct names implementing the interface with file locations; empty when no test mocks exist for the interface.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Absolute path of the checkout you are working in (your cwd or git worktree). Must be this server's repository or one of its git worktrees; the answer then comes from that checkout's own graph. A path elsewhere is refused. Alias: cwd. Omit only when the configured checkout is the one you mean. | |
| limit | No | Maximum rows per page; the byte budget may return fewer. | |
| cursor | No | Opaque next_cursor for the same graph snapshot and result selection. | |
| intention | No | Technical rationale, required for analytical calls selecting an active session. | |
| interface | Yes | The name of the interface (e.g., 'AuthService') | |
| session_id | No | Caller selector returned by session_create. Omission means an independent caller; never inherits server environment or another caller's session. |