gograph_concurrency
Locate goroutine spawns, channel sends, and Mutex/WaitGroup/Once calls to audit race safety and understand async flow in Go code.
Instructions
Find indexed concurrency sites in the codebase: goroutine spawns (go statements), channel sends, and calls on sync.Mutex/RWMutex, sync.WaitGroup, and sync.Once. 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. Optional term filter (e.g., "mutex", "goroutine", "channel"). WHEN TO USE: When auditing race safety, understanding async flow, or locating synchronization points before a concurrency refactor. NOT TO USE: For standard sequential call flow analysis (use gograph_callers/gograph_callees). RETURNS: File locations, line numbers, and primitive kind for each indexed concurrency site; empty when no sites are found. Channel receives and select statements are not indexed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| term | No | Optional filter term (e.g., 'goroutine', 'mutex', 'channel') | |
| 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. |