file-read
Read a single source, resource, or data file from a Minecraft artifact by its internal path, with optional byte limits and truncation reporting.
Instructions
Read one file inside an artifact by its path: a source file, or a resource or data file of the backing jar. maxBytes caps the returned content; a cut is reported in meta.truncation. Example: {"target":{"kind":"version","version":"1.21.10"},"filePath":"net/minecraft/world/item/Item.java"}
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>",
"filePath": "<filePath>"
},
"name": "file-read"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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. | |
| filePath | Yes | Path inside the artifact, e.g. "net/minecraft/world/item/Item.java". | |
| maxBytes | No |