gograph_godobj
Detect God Object anti-pattern candidates by scoring Go structs on method, field, and outgoing call counts, returning ranked monolithic structs to decompose during architecture reviews.
Instructions
Detect God Object anti-pattern candidates by scoring structs on method count, field count, and outgoing call count. Thresholds: methods (default: 5), fields (default: 8), calls (default: 15); top limits results (default: 10). Exceeding any enabled threshold qualifies a struct, and the combined excess determines rank. WHEN TO USE: During architecture reviews to find monolithic structs that should be decomposed. NOT TO USE: For general struct layout inspection (use gograph_fields); for single-function complexity (use gograph_complexity). RETURNS: Ranked candidates with method, field, and call counts; empty when no threshold is exceeded.
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_godobj"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | Maximum results to return (default: 10) | |
| root | No | Absolute path of your checkout or worktree (alias cwd). | |
| calls | No | Minimum outgoing call count (default: 15) | |
| fields | No | Minimum field count (default: 8) | |
| methods | No | Minimum method count (default: 5) | |
| intention | No | Rationale; required with an active session. | |
| session_id | No | Session from session_create; omit for none. |