tool_auto_fix
Detects and repairs common Ren'Py project issues automatically, then recompiles the project to verify fixes build correctly.
Instructions
Detect and repair common Ren'Py issues automatically, then re-compile to verify.
Runs a set of safe, targeted fixers on a project. Each fixer handles a specific class of problem. After applying fixes, re-compiles to verify the project still builds.
Available fixers:
- "return_values": Convert return True/False in labels to global
variable + bare return (fixes 'Could not find return label' errors)
- "missing_from": Add from _call_<label>_<N> to call statements
missing the from clause (fixes save/load issues)
- "bom_normalize": Ensure .rpy files with CJK content have consistent BOM
- "missing_labels": Detect jump/call to undefined labels (report only)
- "stale_saves": Detect stale save files that may cause runtime errors
Args: project_path: Absolute path to the Ren'Py project root directory. fixes: List of fixer names to run. If None, runs all fixers.
Returns: dict with {ok, applied, skipped, applied_count, skipped_count, compile_before, compile_after}.
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": {
"project_path": "<project_path>"
},
"name": "tool_auto_fix"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fixes | No | ||
| project_path | Yes |