code_improve
Refactor and optimize existing Python or JavaScript code for performance, readability, security, or maintainability, returning concrete suggestions and revised code.
Instructions
优化和重构现有代码,提供性能改进、可读性提升、安全性增强等方面的具体建议和优化后的代码。
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>",
"language": "<language>",
"goal": "<goal>"
},
"name": "code_improve"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | 需要优化的代码 | |
| goal | Yes | 优化目标 | |
| language | Yes | 代码语言 |