Skip to main content
Glama

atlas_refactor

Refactors code by detecting smells, reducing complexity, enforcing SOLID principles, and applying design patterns. Automates optimizations to modernize code.

Instructions

AI-powered code refactoring with pattern detection, complexity reduction, SOLID principles enforcement, and automated optimizations. Detects code smells, applies design patterns, and modernizes code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe code to refactor
targetsNoSpecific refactoring targets
addTypesNoAdd TypeScript types if missing
filePathNoOptional file path for context
languageYesProgramming language
modernizeNoUpdate to latest language features
dependenciesNoProject dependencies
enforceSOLIDNoEnforce SOLID principles (default: true)
maxComplexityNoTarget cyclomatic complexity (default: 10)
projectContextNoAdditional project context
preserveBehaviorNoEnsure no behavior changes (default: true)
Behavior2/5

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

With no annotations, the description carries the full burden of disclosing behavioral traits. It does not state that the tool modifies the input code, what the output format is, whether behavior is preserved, or any side effects or prerequisites. The description only lists high-level capabilities and omits critical operational details.

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 two succinct sentences, front-loaded with the core purpose and immediately enumerating key features. Every phrase adds value without redundancy or irrelevant detail.

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

Completeness2/5

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

This is a high-complexity tool with 11 parameters and no output schema, so the description should explain return values or operational outcomes. It does neither; it fails to mention what the user gets after refactoring, whether it's a diff, rewritten code, or suggestions. The clear param schema helps, but the missing output/side-effect context makes it incomplete.

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?

The schema provides 100% parameter coverage, so the baseline is 3. The description mentions concepts like complexity and SOLID principles which map to parameters, but it does not add new meanings or clarify defaults beyond what the schema already states.

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

Purpose4/5

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

The description clearly identifies the tool as code refactoring with pattern detection, complexity reduction, SOLID enforcement, and modernizations. It distinguishes itself from sibling tools by listing these refactoring-specific capabilities, though it lacks an explicit action verb like 'Refactors' and doesn't directly contrast with siblings.

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 implies usage for code smells, design patterns, and modernization, but does not provide explicit when-to-use/when-not-to-use guidance or mention alternatives like atlas_decompose or atlas_optimize. The context is clear enough but the lack of explicit exclusions or alternatives leaves a gap.

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/IamNishant51/atlas-mcp-server'

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