Skip to main content
Glama

smell_refactor_plan

Turn detected code smells into a clear refactoring plan by analyzing a project directory. Get actionable steps to eliminate technical debt.

Instructions

Generate a comprehensive refactoring plan for all detected code smells (Pro feature)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyNo
directoryYesProject directory
Behavior2/5

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

With no annotations provided, the description carries the full behavioral burden. It discloses one useful trait — that this is a 'Pro feature' implying a licensing/paywall gate — but it never states whether the tool modifies code, writes a file, or merely outputs a plan, nor whether an api_key is required to pass the Pro gate. The safety profile of this operation is entirely unknown.

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?

A single 11-word sentence with the verb and object front-loaded and zero filler. The 'Pro feature' parenthetical is a legitimate extra signal packed efficiently. Slightly under-specified, but under-specification is penalized in other dimensions; as a concise artifact it is well-formed.

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?

For a tool with no output schema and no annotations, the description leaves critical gaps: no indication of what the plan looks like (file? console output?), no prerequisite relationship to the smell_detect_* siblings, and no explanation of the Pro feature's operational impact. An agent cannot confidently predict invocation outcomes or failure modes.

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

Parameters2/5

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

Schema description coverage is only 50% (directory is documented as 'Project directory', api_key is not), so the description should compensate. It doesn't mention either parameter, fails to explain that api_key is likely tied to the 'Pro feature' gate, and gives no format or usage details for directory. An agent gets no added meaning beyond the bare schema.

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 names a specific verb ('Generate'), a concrete resource ('refactoring plan'), and a scope ('all detected code smells'). This distinguishes it from the smell_detect_* siblings, which detect smells rather than plan their refactoring. However, it doesn't explicitly contrast with similar plan-producing siblings like dead_cleanup_plan or complexity_report, so full differentiation is left to inference.

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

Usage Guidelines2/5

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

No guidance is given on when to invoke this tool. It doesn't state that smell detection should run first, doesn't mention whether it complements or replaces the smell_detect_* tools, and provides no exclusions or alternatives. The sequencing implied by 'all detected code smells' is not made explicit.

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/barnburner121/claude-plugin-marketplace'

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