Skip to main content
Glama

gograph_godobj

Read-onlyIdempotent

Scores Go structs on method count, field count, and outgoing calls to identify God Object anti-pattern candidates. Exceeds thresholds for all three metrics to flag monolithic structs for decomposition.

Instructions

Detect God Object anti-pattern candidates by scoring structs on method count, field count, and outgoing call count. Requires .gograph/graph.json — run gograph build . first. Read-only; no side effects. Thresholds: methods (default: 5), fields (default: 8), calls (default: 15); top limits results (default: 10). A struct must exceed all three thresholds to be flagged. 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 list of candidates with method, field, and call counts; empty when no structs exceed all thresholds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
callsNoMinimum outgoing call count (default: 15)
fieldsNoMinimum field count (default: 8)
methodsNoMinimum method count (default: 5)
topNoMaximum results to return (default: 10)
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond annotations (readOnlyHint, destructiveHint, idempotentHint), the description adds prerequisite (requires .gograph/graph.json, run gograph build .), confirms no side effects, and explains threshold logic (must exceed all three thresholds). This fully discloses behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured, with clear sections. Every sentence adds value, and the most critical information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description fully explains return values (ranked list with counts, empty when none). It also covers prerequisites, threshold defaults, and the condition for flagging. No gaps remain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, but the description adds defaults (methods default 5, fields 8, calls 15, top 10) and clarifies the combined condition (struct must exceed all three thresholds). This adds meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'detect' and the resource 'God Object anti-pattern candidates' using specific metrics (method count, field count, outgoing call count). It also distinguishes from sibling tools by naming gograph_fields and gograph_complexity as alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit 'WHEN TO USE' and 'NOT TO USE' sections are provided, with specific alternatives (gograph_fields, gograph_complexity). This gives clear guidance on when to select this tool over siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ozgurcd/gograph'

If you have feedback or need assistance with the MCP directory API, please join our Discord server