Vibe Coder MCP

by freshtechbro
Verified

refactor-code

Refactor code snippets by applying specific instructions, using optional file context for precision. Supports multiple programming languages to enhance code quality and maintainability.

Instructions

Refactors a given code snippet based on specific instructions, optionally using surrounding file context.

Input Schema

NameRequiredDescriptionDefault
codeContentYesThe actual code snippet to be refactored.
contextFilePathNoOptional relative path to a file whose content provides broader context for the refactoring task.
languageYesThe programming language of the code snippet (e.g., 'typescript', 'python', 'javascript')
refactoringInstructionsYesSpecific instructions on how the code should be refactored (e.g., 'extract the loop into a separate function', 'improve variable names', 'add error handling', 'convert promises to async/await').

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "codeContent": { "description": "The actual code snippet to be refactored.", "minLength": 1, "type": "string" }, "contextFilePath": { "description": "Optional relative path to a file whose content provides broader context for the refactoring task.", "type": "string" }, "language": { "description": "The programming language of the code snippet (e.g., 'typescript', 'python', 'javascript')", "minLength": 1, "type": "string" }, "refactoringInstructions": { "description": "Specific instructions on how the code should be refactored (e.g., 'extract the loop into a separate function', 'improve variable names', 'add error handling', 'convert promises to async/await').", "minLength": 1, "type": "string" } }, "required": [ "language", "codeContent", "refactoringInstructions" ], "type": "object" }

You must be authenticated.

Other Tools from Vibe Coder MCP

Related Tools

ID: yvtu46xhkx