gograph_godobj
Detect God Object anti-pattern candidates by scoring structs against configurable thresholds for methods, fields, and outgoing calls, identifying monolithic structs for decomposition.
Instructions
Detect God Object anti-pattern candidates by scoring structs on method count, field count, and outgoing call count. 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. 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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | Maximum results to return (default: 10) | |
| calls | No | Minimum outgoing call count (default: 15) | |
| fields | No | Minimum field count (default: 8) | |
| methods | No | Minimum method count (default: 5) |