Skip to main content
Glama

detect_code_smells

Analyzes Python code to identify code smells. Get actionable suggestions for improving code quality.

Instructions

Kod kokularını (code smells) tespit eder.

Args: path: Proje kök dizini file: Belirli dosya (None ise tüm proje, sadece Python)

Returns: Code smell listesi — kategori, şiddet, dosya, öneri

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
fileNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses that scanning is limited to Python files, and if file=None, scans the entire project. Return format is specified (category, severity, file, suggestion). Missing details on side effects (none expected) or resource usage, but sufficient for safe invocation.

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?

Extremely concise: one sentence plus bullet-style Args and Returns. Every part adds value. Front-loaded with purpose. No wasted words. Structure aids quick scanning by AI.

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?

Given output schema exists (not shown), description needn't detail return format, but it does. It covers main aspects: scope, inputs, output structure. Missing technical details like detection method (AST/regex) or dependencies, but overall complete for a moderately complex tool.

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 0%, so description must add meaning. It does: path is 'project root directory', file is 'specific file (None means entire project, only Python)'. This fully explains both parameters beyond the raw schema types.

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 'detects code smells', a specific verb+resource. It distinguishes from siblings like find_dead_code and find_circular_dependencies by being a general smell detector. The scope (only Python, entire project if file=None) further clarifies purpose.

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?

Implied usage via Args: path and file parameters are explained. However, no explicit guidance on when to use this tool versus siblings (e.g., find_dead_code for dead code). The description lacks when-not-to-use or alternative recommendations.

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/iamseyhmus7/mcp-codebase-oracle'

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