hac_self_improve
Update the MCP's own Python modules safely: back up code, run syntax and regression tests, and roll back automatically if tests fail.
Instructions
Self-evolves the MCP by updating one of its own Python modules. Automatically creates a backup, runs syntax checks and full regression test suite. Rolls back immediately if tests fail.
Args: target_file: Relative filename within MCP directory (e.g. 'site_scaffolder.py', 'b2b_org_helper.py') description: Summary of the improvement, fix, or capability being added updated_code: Complete updated Python code for the target module
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": {
"target_file": "<target_file>",
"description": "<description>",
"updated_code": "<updated_code>"
},
"name": "hac_self_improve"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | ||
| target_file | Yes | ||
| updated_code | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |