Skip to main content
Glama

find_god_objects

Finds types with high size and coupling — god classes that violate single-responsibility — using configurable thresholds for lines, members, fields, and namespace counts.

Instructions

Find types that combine high size with high coupling — 'god classes' that violate single-responsibility and become refactoring nightmares. Sharper signal than find_large_classes alone: a 1000-line internal helper used only by its own namespace is not flagged, but a 200-line class called from 15 different namespaces is. Two axes: size (lines/members/fields) and coupling (incoming/outgoing namespace counts). A type qualifies when it crosses ALL THREE size thresholds AND at least one coupling threshold — keeps DTOs (high field count only) and dispatchers (high member count only) off the list. Defaults: lines >= 300, members >= 15, fields >= 10, incoming-namespaces >= 5, outgoing-namespaces >= 5. Each threshold is independently configurable. BCL namespaces (System., Microsoft.) excluded from outgoing count. Test projects, generated code, interfaces, and nested types are skipped. Sort: total axes exceeded DESC, then line count DESC.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNoOptional: restrict to a single project by name (case-insensitive).
minLinesNoMin lines for size axis. Default 300.
minFieldsNoMin field count for size axis. Default 10.
minMembersNoMin member count for size axis. Default 15.
minIncomingNamespacesNoMin incoming-namespace count for coupling axis. Default 5.
minOutgoingNamespacesNoMin outgoing-namespace count for coupling axis. Default 5.
Behavior5/5

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

No annotations provided, so description fully describes behavior: two axes, thresholds, qualification logic, exclusions (BCL namespaces, test projects, generated code, interfaces, nested types), and sorting. No side effects expected for a read-only analysis tool.

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?

Description is dense but efficient, each sentence adds value. Structured logically: purpose, comparison, axes, qualification rule, defaults, exclusions, sorting. No wasted words.

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

Completeness4/5

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

Very detailed but lacks specification of return format (e.g., list of type names with scores). No output schema; description should mention what is returned. Otherwise complete.

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

Parameters5/5

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

Schema coverage is 100%, but description adds crucial context: all three size thresholds must be crossed AND at least one coupling threshold, defaults, and configurability. This significantly aids correct parameter usage.

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?

Description clearly states the tool finds types combining high size and high coupling, distinguishing it from sibling find_large_classes by explaining the two axes and why it's a sharper signal.

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

Usage Guidelines4/5

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

Description explains when to use (to identify god classes violating SRP) and implicitly when not (DTOs, dispatchers are excluded). It compares to find_large_classes but doesn't explicitly address other 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/MarcelRoozekrans/roslyn-codelens-mcp'

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