gograph_constructors
Locate every factory and constructor function that returns a named Go struct. Use it to find canonical creation paths or to update all initialization sites before changing a struct.
Instructions
Find all factory and constructor functions that instantiate and return a named Go struct (functions whose return type includes the struct name). 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 looking for the canonical way to create a struct, or before modifying struct initialization to ensure all construction paths are updated. NOT TO USE: For direct composite-literal sites (use gograph_literals); for struct fields (use gograph_fields). RETURNS: List of constructor function names with signatures, package paths, and file locations; empty when no factory functions are found.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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. | |
| struct | Yes | The exact name of the target Go struct to find constructors for (e.g., 'User', 'Config') |