Skip to main content
Glama
Sunalamye

MCP Claude Shell Server

by Sunalamye

claude_refactor

Refactor code using Claude AI with configurable models, retry logic, and structured output options for reliable code improvements.

Instructions

Refactor code via Claude Code CLI with retry and model selection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesPrompt to pass to Claude CLI
modelNoModel to use (haiku, sonnet, opus). Default: haiku
timeoutNoTimeout in seconds. Default: 660
maxRetriesNoMaximum retry attempts. Default: 3
maxTurnsNoMaximum agent turns (iterations). Default: unlimited
outputFormatNoOutput format: text, json, stream-json. Default: json
systemPromptNoReplace default system prompt
appendSystemPromptNoAppend to default system prompt
allowedToolsNoAdditional tools to allow without asking
disallowedToolsNoTools to disallow
addDirsNoAdditional directories to access
verboseNoEnable verbose logging. Default: false
enableMcpNoEnable MCP servers in subprocess, allowing recursive calls. Max depth: 3. Default: false
mcpConfigPathNoCustom MCP config path. Default: auto-detect project .mcp.json
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While it mentions 'retry and model selection,' it doesn't explain what 'refactor' entails operationally, whether this modifies files in place, creates backups, requires specific permissions, or has rate limits. For a code modification tool with zero annotation coverage, this leaves significant behavioral gaps.

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 a single, efficient sentence that communicates the core functionality. It's appropriately sized for the tool's complexity, though it could be more front-loaded with the primary purpose before mentioning secondary features like retry and model selection.

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 complex code refactoring tool with 14 parameters and no annotations or output schema, the description is inadequate. It doesn't explain what 'refactor' means operationally, what the expected inputs/outputs are, how errors are handled, or how this differs from sibling editing tools. The 100% schema coverage helps, but the description should provide more contextual guidance for proper tool selection and usage.

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 description coverage is 100%, so the schema already documents all 14 parameters thoroughly. The description adds minimal value beyond what's in the schema - it mentions 'retry' (related to maxRetries) and 'model selection' (related to model parameter), but doesn't provide additional context about parameter interactions or usage patterns. Baseline 3 is appropriate when schema does the heavy lifting.

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

Purpose3/5

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

The description states the tool 'refactor[s] code via Claude Code CLI' which provides a clear verb ('refactor') and resource ('code'), but it doesn't differentiate from sibling tools like claude_edit or claude_generate. The mention of 'retry and model selection' adds some specificity but doesn't clearly distinguish this as a refactoring-specific tool versus general code editing.

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 provided about when to use this tool versus alternatives like claude_edit or claude_generate. The description mentions 'retry and model selection' but doesn't explain when these features make this tool preferable. There's no mention of prerequisites, typical use cases, or comparison to sibling tools.

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/Sunalamye/mcp-claude-node'

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