gograph_tests
Find tests that statically exercise a Go symbol, including transitive paths, or select the tests to run for uncommitted changes or a Git ref with ready go test commands.
Instructions
Find test functions in *_test.go files that statically exercise a named symbol, or list all attributed test edges when no symbol is given. Direct mode accepts Receiver.Method (including pointer receivers) or a full stable symbol ID. By default this preserves the direct-edge result contract. Set transitive=true with a required symbol to return gograph.tests.v1 reverse attribution: a summary of every reaching test by depth and resolution, then one page (default 50, nearest first, with total, truncated and next_cursor) of tests with exact/possible resolution, depth, and a representative stable-ID path; max_depth keeps only nearby tests; exact_only omits uncertain paths and package disambiguates the selected product symbol. WHEN TO USE: To choose which tests to run after an edit (uncommitted=true); before editing a function — use transitive=true for router/callback-mediated coverage and direct mode for concrete test call sites. NOT TO USE: For test helper infrastructure (use gograph_fixtures); for running tests or proving runtime coverage. Set uncommitted=true, since=, or select=true with a symbol to get gograph.test_selection.v1: the tests to run for a change, grouped per package, each with an anchored go test -run pattern and ready go test commands (with the graph's build tags). RETURNS: Direct result rows by default, or a versioned reverse-transitive report or test selection when requested.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "gograph_tests"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Absolute path of your checkout or worktree (alias cwd). | |
| limit | No | With transitive=true: tests per page, nearest first (default 50; 0 returns all) | |
| since | No | Git ref (e.g. 'main', 'HEAD~1'): select the tests to run for all changes since this ref (gograph.test_selection.v1) | |
| cursor | No | With transitive=true: next_cursor from the previous page | |
| select | No | With symbol: return gograph.test_selection.v1, the tests to run grouped per package with an anchored go test -run pattern and ready commands | |
| symbol | No | The symbol name to find tests for (optional) | |
| package | No | With transitive=true or select=true, optional exact Go package name used to disambiguate the selected symbol | |
| intention | No | Rationale; required with an active session. | |
| max_depth | No | With transitive, select, uncommitted or since: keep tests whose shortest call path is at most this long; 0 or omitted is unlimited | |
| exact_only | No | With transitive=true, omit paths containing possible edges | |
| session_id | No | Session from session_create; omit for none. | |
| transitive | No | Return reverse-transitive test attribution; requires symbol | |
| uncommitted | No | Select the tests to run for all uncommitted changes (gograph.test_selection.v1) |