Skip to main content
Glama
UrbanDiver

Local DeepWiki MCP Server

by UrbanDiver

get_design_smells

Read-onlyIdempotent

Detect design smells like God Class, Long Method, Long Parameter List, and Feature Envy using AST-based heuristics. Returns severity, file location, and refactoring suggestions.

Instructions

Detect common design smells using heuristic AST-based thresholds: God Class (>15 methods AND >500 lines), Long Method (>80 lines AND cyclomatic complexity >7, or CC >15), Long Parameter List (>6 params), Feature Envy (>3 calls to another class's methods), Large File (>800 lines), Deep Nesting (>4 levels), Data Clump (3+ functions share 3+ identical parameter names). Returns smells with severity, file location, entity name, description, and refactoring suggestion.

No prior indexing required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_pathYesPath to the repository
severity_thresholdNoMinimum severity to include (default: medium)
exclude_testsNoExclude test files (default: true)
top_nNoLimit output to the top N smells sorted by severity (optional, returns all if omitted)
summary_onlyNoReturn only a smells_by_type count dict instead of individual smell records (default: false)
Behavior4/5

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

Annotations already declare the tool as read-only, non-destructive, idempotent, and not open-world. The description adds behavioral detail beyond annotations by specifying the heuristic thresholds for each smell (e.g., God Class >15 methods AND >500 lines) and the return structure (severity, file location, entity name, description, refactoring suggestion). This gives the agent a clear picture of what the tool computes.

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

Conciseness4/5

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

The description is well-structured: it opens with the tool's purpose, lists thresholds concisely, and ends with the return structure. Each sentence adds value, though the threshold list could be more compact. At 4 sentences, it is appropriately sized.

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?

The description covers the detection criteria, return fields, and the prerequisite (no indexing required). No output schema exists, but the description explains what the agent can expect. For a detection tool with well-defined thresholds, this is largely complete. Minor gap: it doesn't mention if the results are cached or if repeated calls are cheap.

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

Parameters3/5

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

Schema coverage is 100%, so the input schema fully describes all parameters. The description does not add extra meaning to individual parameters beyond what the schema provides (e.g., it doesn't explain the default values or how they affect detection). Baseline 3 is appropriate.

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 specifies the action (detect), the resource (design smells), and the method (heuristic AST-based thresholds). It lists specific smell types and their thresholds, making the purpose clear and distinct from siblings like detect_bugs or detect_secrets.

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

Usage Guidelines3/5

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

The description notes that no prior indexing is required, which is a useful prerequisite. However, it does not explicitly state when to use this tool versus alternative sibling tools (e.g., detect_bugs, analyze_architecture) or provide exclusions. The usage context is implied but not directly guided.

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/UrbanDiver/local-deepwiki-mcp'

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