Skip to main content
Glama

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

TableJSON 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').

Other Tools

Related 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/freshtechbro/vibe-coder-mcp'

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