refactor-code
Refactor code to improve structure, readability, or performance; specify code, a refactoring goal, and language.
Instructions
Refactors code to improve its structure, readability, or performance
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>"
},
"name": "refactor-code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The code to refactor | |
| goal | No | The goal of the refactoring (e.g., 'improve readability', 'optimize performance', 'reduce complexity') | |
| model | No | Optional model to use (e.g., 'qwen-turbo'). If not specified, uses the default model (qwen-plus). | |
| language | No | Programming language of the code (e.g., 'python', 'javascript', 'java', 'cpp'). If not specified, Qwen will try to detect it. |