gograph_constructors
Finds factory and constructor functions that instantiate and return a named Go struct, listing signatures, package paths, and file locations so every construction path can be located and updated.
Instructions
Find all factory and constructor functions that instantiate and return a named Go struct (functions whose return type includes the struct name). 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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"struct": "<struct>"
},
"name": "gograph_constructors"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Absolute path of your checkout or worktree (alias cwd). | |
| limit | No | Rows per page. | |
| cursor | No | next_cursor from the previous page. | |
| struct | Yes | The exact name of the target Go struct to find constructors for (e.g., 'User', 'Config') | |
| intention | No | Rationale; required with an active session. | |
| session_id | No | Session from session_create; omit for none. |