source-export
Export decompiled Java source for 1–50 selected classes from a Minecraft artifact to package-structured files, creating directories and overwriting existing files as needed.
Instructions
Write the Java source of 1-50 classes from one artifact to //.java, creating directories and overwriting existing files; a nested class writes its top-level class's file. Example: {"target":{"kind":"version","version":"1.21.10"},"classes":["net.minecraft.world.item.Item"],"outputDir":"/tmp/src"}
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": "<target>",
"classes": "<classes>",
"outputDir": "<outputDir>"
},
"name": "source-export"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | What to write: full source (default), snippet or metadata outline. | full |
| target | Yes | Fields per kind (?=optional): artifact: artifactId; version: version,projectPath?,scope?; jar: jarPath; coordinate: coordinate; workspace: projectPath,scope?; dependency: group,name,dependencyVersion|projectPath. Other fields rejected. | |
| classes | Yes | 1-50 fully qualified class names, e.g. ["net.minecraft.world.item.Item"]. | |
| mapping | No | Namespace of the class names; default the artifact's. | |
| outputDir | Yes | Directory to write into; relative paths resolve against the server's working directory. | |
| allowDecompile | No | Allow source decompilation on this call; default true. |