ollama_refactor_code
Refactors code to improve readability, quality, or structure using Ollama models, helping reduce complexity and modernize syntax based on a specified goal.
Instructions
Refactor code to improve quality, readability, or structure using Ollama.
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>",
"goal": "<goal>"
},
"name": "ollama_refactor_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The code to refactor | |
| goal | Yes | Refactoring goal (e.g., 'improve readability', 'reduce complexity', 'modernize syntax') | |
| model | No | Ollama model to use (default: mistral-small) | gemma3:12b |