map_existing_codebase
Generate a legibility report for translating a Python codebase into a target language, with per-file translatability, construct counts, unmapped constructs, and coverage summary.
Instructions
Report what translating a codebase into a language would look like.
The legibility report: per-file translatability, construct counts, constructs the target language's pack cannot map yet (they stay English after translation), and an aggregate coverage summary. Orchestrates per-file translate + validate; for a large repo, iterate in batches of files across calls.
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": {
"files": "<files>",
"target_lang": "<target_lang>"
},
"name": "map_existing_codebase"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | Files to map. Paths are report labels only — they are content, never logged, never used to touch the filesystem. | |
| source_lang | No | ISO 639 language code from the legesher://languages catalog. | en |
| target_lang | Yes | ISO 639 language code from the legesher://languages catalog. | |
| python_version | No | 3.13 | |
| include_translations | No | Also return the translated files (default: report only). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | ||
| summary | Yes | ||
| source_lang | Yes | ||
| target_lang | Yes | ||
| python_version | Yes | ||
| translated_files | No |