@adhisang/minecraft-modding-mcp 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +62 -34
  2. package/README.md +79 -100
  3. package/dist/access-transformer-parser.d.ts +17 -0
  4. package/dist/access-transformer-parser.js +97 -0
  5. package/dist/concurrency.d.ts +1 -0
  6. package/dist/concurrency.js +24 -0
  7. package/dist/config.js +19 -11
  8. package/dist/decompiler/vineflower.js +22 -21
  9. package/dist/entry-tools/analyze-mod-service.d.ts +4 -4
  10. package/dist/entry-tools/analyze-symbol-service.d.ts +22 -20
  11. package/dist/entry-tools/analyze-symbol-service.js +6 -3
  12. package/dist/entry-tools/inspect-minecraft-service.d.ts +166 -149
  13. package/dist/entry-tools/inspect-minecraft-service.js +318 -55
  14. package/dist/entry-tools/validate-project-service.d.ts +153 -16
  15. package/dist/entry-tools/validate-project-service.js +360 -23
  16. package/dist/gradle-paths.d.ts +4 -0
  17. package/dist/gradle-paths.js +57 -0
  18. package/dist/index.js +274 -13
  19. package/dist/mapping-pipeline-service.d.ts +3 -1
  20. package/dist/mapping-pipeline-service.js +16 -1
  21. package/dist/mapping-service.d.ts +5 -0
  22. package/dist/mapping-service.js +200 -84
  23. package/dist/minecraft-explorer-service.d.ts +13 -0
  24. package/dist/minecraft-explorer-service.js +8 -4
  25. package/dist/mixin-validator.d.ts +33 -2
  26. package/dist/mixin-validator.js +197 -11
  27. package/dist/mod-analyzer.d.ts +1 -0
  28. package/dist/mod-analyzer.js +17 -1
  29. package/dist/mod-decompile-service.js +4 -4
  30. package/dist/mod-remap-service.js +1 -54
  31. package/dist/mod-search-service.d.ts +1 -0
  32. package/dist/mod-search-service.js +84 -51
  33. package/dist/response-utils.d.ts +35 -0
  34. package/dist/response-utils.js +113 -0
  35. package/dist/source-jar-reader.d.ts +16 -0
  36. package/dist/source-jar-reader.js +103 -1
  37. package/dist/source-resolver.js +9 -10
  38. package/dist/source-service.d.ts +24 -2
  39. package/dist/source-service.js +1052 -139
  40. package/dist/tool-contract-manifest.js +74 -74
  41. package/dist/types.d.ts +17 -0
  42. package/dist/workspace-mapping-service.d.ts +13 -0
  43. package/dist/workspace-mapping-service.js +146 -14
  44. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,55 @@ All notable changes to this project are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project aims to follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.2.0] - 2026-04-12
9
+
10
+ ### Added
11
+ - `resolve-artifact`, `find-mapping`, `resolve-method-mapping-exact`, `resolve-workspace-symbol`, and `check-symbol-exists` now accept an optional `compact` parameter (default `false`). When `true`, empty arrays, null values, and empty objects are stripped from the top-level response. For `resolve-artifact`, compact mode additionally omits `provenance`, `artifactContents`, `sampleEntries`, `adjacentSourceCandidates`, `binaryJarPath`, `coordinate`, `repoUrl`, and `resolvedSourceJarPath`. For mapping tools, compact mode omits the redundant `candidates` array when the result is a single full-confidence exact-match resolution.
12
+ - `validate-access-widener` now accepts `projectPath`, `scope`, and `preferProjectVersion` for runtime-aware validation against Loom runtime jars, and reports additive `provenance`, `resolvedInRuntime`, and `resolvedRuntimeAccess` evidence for matched class, method, and field entries.
13
+ - Added `validate-access-transformer` for Forge / NeoForge Access Transformer validation, including `atNamespace` support, workspace-driven namespace inference, runtime artifact provenance, and per-entry runtime access evidence.
14
+ - `analyze-mod-jar` now surfaces packaged Access Transformer paths alongside mod metadata.
15
+
16
+ ### Fixed
17
+ - `validate-access-widener` and `validate-access-transformer` runtime-aware method validation now preserves remapped JVM descriptors through exact and fallback member remaps, eliminating false-negative `method not found` results for entries whose descriptors reference remapped Minecraft classes such as `Level#setBlock(BlockPos, BlockState, int)`.
18
+ - `validate-access-widener` runtime-aware `scope: "merged"` now prefers explicit `*merged-intermediary*` / `*merged-mojang*` runtime jars over ambiguous `minecraft-merged.jar` candidates, and Loom tiny lookup now scans workspace and Gradle user-home caches so runtime validation can resolve descriptor remaps in normal Loom setups.
19
+ - `validate-project` now forwards workspace runtime context to discovered Access Widener validation so project-summary runs can use the same runtime-aware behavior as direct `validate-access-widener` calls.
20
+ - `validate-project` now discovers Access Transformer files, supports `task="access-transformer"`, and can include those validations in workspace summaries when `discover` requests them.
21
+ - `resolve-artifact`, `get-class-source`, `get-class-members`, and `inspect-minecraft` source/class-member flows now treat unobfuscated releases such as `26.1+` as native `mojang` runtime namespaces for both version and versioned-coordinate targets, avoiding false `ERR_MAPPING_NOT_APPLIED` failures and wrong-version Loom source-jar approximations when no exact source jar is present.
22
+ - `validate-mixin` tool-health diagnostics now treat unobfuscated `mojang` runtime names as available, while still flagging `intermediary`/`yarn` as unavailable on `26.1+`.
23
+ - `validate-project task="project-summary"` now pre-resolves `preferProjectVersion=true` consistently across discovered Access Widener and workspace Mixin checks, and returns a blocked summary with version-agnostic recovery guidance when discovered validators need a version but neither the request nor `gradle.properties` can supply one.
24
+ - `check-symbol-exists` and `analyze-symbol task="exists"` now fall back to unobfuscated runtime bytecode for `mojang`/runtime-name existence checks on `26.1+`, preserve the original `mapping_unavailable` result when the runtime JAR cannot be resolved, and return a targeted warning when callers provide only a short class name.
25
+ - Loom tiny mapping discovery no longer performs unbounded directory traversal when the version-specific cache directory is absent, preventing excessive memory consumption on systems with large Gradle caches.
26
+ - Mapping graph cache eviction after lifecycle scans now correctly releases all cached entries for a version instead of silently skipping them.
27
+
28
+ ### Performance
29
+ - `resolve-artifact` source-jar detection and mapping tiny-jar loading now reuse a single ZIP walk per jar probe instead of reopening and fully enumerating matching archives on each helper call.
30
+ - `search-mod-source`, `decompile-mod-jar`, `get-mod-class-source`, `validate-project` workspace discovery, and workspace mapping detection now avoid synchronous hot-path file/glob reads and use bounded concurrent text reads where safe, reducing event-loop stalls on larger decompiled outputs and multi-module workspaces.
31
+
32
+ ## [3.1.1] - 2026-03-21
33
+
34
+ ### Fixed
35
+ - `analyze-symbol task="api-overview"` now inherits `sourceMapping` as the default `classNameMapping`, avoiding unintended fallback to `obfuscated` when callers omit `classNameMapping`.
36
+ - `get-class-api-matrix` now builds rows from the explicitly requested `classNameMapping` instead of silently pivoting to `obfuscated` when both identities are available.
37
+ - `find-mapping` now accepts short obfuscated class ids such as `dhl` when `sourceMapping="obfuscated"` instead of rejecting them at input validation.
38
+ - `find-mapping` now restores `mojang -> intermediary`, `mojang -> yarn`, and `intermediary -> mojang` conversions on mappings builds where those paths previously failed.
39
+ - `trace-symbol-lifecycle` now strips an accidental inline signature suffix from `symbol` before splitting `Class.method`, preventing misparsed lifecycle lookups while keeping the separate `descriptor` field as the exact-match path.
40
+ - `trace-symbol-lifecycle` now rejects class-like `symbol` inputs such as `net.minecraft.world.item.Item` with `ERR_INVALID_INPUT` instead of scanning versions until lookup work fails elsewhere.
41
+ - `analyze-symbol task="lifecycle"` now applies its required `version` as the lifecycle scan upper bound instead of ignoring that input and always scanning the default full range, and the high-level helper now keeps that scan to a recent 5-version window for predictable runtime.
42
+ - `trace-symbol-lifecycle` now completes broad lifecycle scans more reliably without long stalls.
43
+ - `analyze-mod` and `validate-project` now return retryable `suggestedCall` guidance when older string-subject or domain-include payloads fail with `ERR_INVALID_INPUT`.
44
+ - `validate-mixin` and `validate-project task="project-summary"` now treat empty mixin configs as warning-only discovery results with zero validated classes instead of `ERR_INVALID_INPUT`.
45
+ - `inspect-minecraft` now keeps workspace `class-overview`, class-like `search`, and `list-files` usable when source coverage is partial, with partial-status guidance where needed.
46
+ - `inspect-minecraft` invalid task/subject combinations now return retryable `suggestedCall` guidance instead of dead-end `ERR_INVALID_INPUT` messages, preserving the requested task when artifact context is the only missing input and otherwise pointing to the subject-compatible retry path.
47
+ - Path-based environment overrides now treat blank values and the literal strings `undefined` and `null` as unset, preventing accidental `./undefined` and `./null` cache roots and invalid JAR override paths when clients serialize missing values incorrectly.
48
+
49
+ ### Performance
50
+ - `trace-symbol-lifecycle`, `check-symbol-exists`, and `find-mapping` now respond faster on Mojang/obfuscated-only workflows, especially on cold lookups.
51
+
52
+ ### Documentation
53
+ - Shortened the English and Japanese READMEs so onboarding guidance, workflow notes, and detailed reference material no longer repeat the same content across multiple sections.
54
+ - Simplified the generated tool-surface tables in both READMEs to compact purpose-only summaries and pointed exact input/output details to `docs/tool-reference.md`.
55
+ - Rewrote the Japanese workflow guidance in more natural Japanese and clarified that the detailed examples and full reference remain English-first for now.
56
+
8
57
  ## [3.1.0] - 2026-03-15
9
58
 
10
59
  ### Changed
@@ -16,15 +65,11 @@ and this project aims to follow [Semantic Versioning](https://semver.org/spec/v2
16
65
  - Error recovery payloads (`suggestedCall`) now omit parameters when the supplied value matches the tool's default behavior, keeping retryable calls smaller without changing their semantics.
17
66
 
18
67
  ### Performance
19
- - Explicit text/path scan fallbacks no longer materialize the full scoped file-path list before scanning, reducing heap growth and keeping full-scan cost more predictable on large artifacts.
20
- - Runtime metrics now keep cache LRU byte-accounting rows by reference and only materialize `cache_artifact_bytes_lru` during snapshot reads, removing per-publish array copies from the cache hit path.
68
+ - Explicit text and path scan fallbacks in `search-class-source` now use less memory and stay more predictable on large artifacts.
21
69
 
22
70
  ### Documentation
23
- - README tool tables are now validated from a shared contract manifest in code, correcting the documented `compare-minecraft` class-only `subject.kind="class".sourcePriority` input and aligning the published `inspect-minecraft` / `validate-project` output summaries with the implementation.
24
- - Clarified the updated `search-class-source` `queryMode` behavior and the summary-first follow-up contract for the top-level workflow tools in both READMEs.
71
+ - Corrected the published `compare-minecraft` class-only `subject.kind="class".sourcePriority` input and aligned the documented `inspect-minecraft` / `validate-project` outputs with current behavior.
25
72
  - Documented that safe fixed defaults now appear in `tools/list` schema output and that `suggestedCall` omits default-valued parameters.
26
- - Reorganized the English README around package-user quick start, start-here examples, and linked reference docs so setup guidance is easier to scan without losing detailed contract notes.
27
- - Synchronized the Japanese README with the current English README structure, examples, quick-start guidance, and tool-surface summary.
28
73
 
29
74
  ## [3.0.0] - 2026-03-09
30
75
 
@@ -33,9 +78,6 @@ and this project aims to follow [Semantic Versioning](https://semver.org/spec/v2
33
78
  - The new v3 entry tools share `detail` / `include` response shaping and always return `result.summary` inside the standard `{ result?, error?, meta }` envelope, reducing default payload size and making next actions explicit.
34
79
  - `analyze-mod` now exposes `executionMode="preview" | "apply"` for safe remap planning and execution, and `manage-cache` now exposes the same preview/apply model for cache deletion, pruning, and rebuild workflows.
35
80
 
36
- ### Documentation
37
- - Added v3 entry-tool usage guidance, shared response-shaping notes, and entry-tool-first migration guidance to both READMEs.
38
-
39
81
  ### Fixed
40
82
  - `inspect-minecraft` now routes `subject.kind="workspace"` requests with `focus.kind="class" | "file" | "search"` through the matching task for `task=auto`, while preserving workspace-aware artifact resolution for focused file and search follow-up flows.
41
83
  - `inspect-minecraft task=class-overview | class-source | class-members` now accepts `subject.kind="workspace"` with `focus.kind="class"` even when the focus omits an explicit artifact reference, reusing workspace version detection to resolve artifact context first.
@@ -56,8 +98,8 @@ and this project aims to follow [Semantic Versioning](https://semver.org/spec/v2
56
98
 
57
99
  ### Fixed
58
100
  - `compare-versions` now applies `packageFilter` consistently to `classes.addedCount`, `removedCount`, and `unchanged`, so class summary counts reflect the same filtered package scope as the returned class lists.
59
- - Heavy analysis tools are now serialized behind a bounded in-process queue, and queue overflow fails fast with `ERR_LIMIT_EXCEEDED` instead of amplifying concurrent load across the whole MCP transport.
60
- - The stdio CLI entrypoint now supervises an internal worker process, automatically restarts it after an unexpected exit, replays MCP initialization for the live session, and turns in-flight crashes into retryable JSON-RPC request failures instead of a full transport disconnect.
101
+ - Heavy analysis tools now fail fast with `ERR_LIMIT_EXCEEDED` when too many expensive requests arrive at once, instead of letting the whole MCP session degrade under load.
102
+ - The stdio CLI now recovers more cleanly from unexpected internal exits, reducing full-session disconnects during live use.
61
103
  - `trace-symbol-lifecycle` now uses strict method remapping when a descriptor is provided, falls back to name-only lookup when it is omitted, and surfaces real mapping input failures in warnings instead of collapsing them into generic lookup errors.
62
104
  - `get-class-source` / `get-class-members` now infer a missing artifact version from `projectPath` when `preferProjectVersion=true`, making project-aware lookups more consistent for previously resolved artifacts.
63
105
  - Error recovery payloads (`suggestedCall`) now use the current `target` object schema instead of deprecated `targetKind` / `targetValue` fields.
@@ -70,7 +112,7 @@ and this project aims to follow [Semantic Versioning](https://semver.org/spec/v2
70
112
  - `resolve-workspace-symbol` now recognizes NeoForge ModDevGradle workspaces as `mojang` compile mappings instead of returning `mapping_unavailable`.
71
113
  - `resolve-artifact`, `get-class-source`, and `get-class-members` now preserve `ERR_JAR_NOT_FOUND` for missing `target.kind=jar` paths instead of leaking raw filesystem `ENOENT` failures through the public contract.
72
114
  - `get-registry-data` now invalidates corrupt cached `registries.json` snapshots, regenerates them on demand, and reports `ERR_REGISTRY_GENERATION_FAILED` when the regenerated snapshot is still unreadable.
73
- - `validate-mixin` now retries with `sourcePriority="maven-first"` after a partial `loom-first` validation caused by mapping/signature resolution limits, reducing false warnings from Loom-only resolution paths.
115
+ - `validate-mixin` now retries with Maven mapping data after Loom-only partial results when that can complete validation, reducing false warnings.
74
116
  - `validate-mixin` no longer emits schema-invalid `check-symbol-exists` recovery payloads in `suggestedCall`; unsupported parameters such as `scope` and `projectPath` are omitted from those calls.
75
117
  - `validate-mixin` now lowers confidence for skipped member validation and exposes requested-vs-applied scope/source-priority details instead of making partial results look fully verified.
76
118
  - `validate-mixin` now follows the resolved artifact namespace during bytecode lookup for non-vanilla scopes, so `scope="merged"` on Mojang-mapped Loom workspaces validates against merged class names instead of falling back to false partial results and retry-driven timeouts.
@@ -80,13 +122,11 @@ and this project aims to follow [Semantic Versioning](https://semver.org/spec/v2
80
122
  - `check-symbol-exists` no longer repeats raw Loom tiny-cache miss warnings when Maven tiny mappings successfully satisfy the lookup; successful fallback now emits concise fallback context instead.
81
123
 
82
124
  ### Documentation
83
- - Corrected the `compare-versions` README contract to document registry results under `result.registry`.
84
- - Documented the new compact-response options, `summary-first` validate-mixin mode, bare-string `target` recovery guidance, and updated token-efficient examples in both READMEs.
125
+ - Corrected the published `compare-versions` response docs to show registry results under `result.registry`.
85
126
 
86
127
  ### Performance
87
- - `resolve-artifact`, `index-artifact`, and `get-runtime-metrics` now keep cache entry/byte accounting incrementally during ingest, reindex, cache hits, and eviction, avoiding repeated full-cache rescans after each artifact load.
88
- - `find-mapping`, `get-class-api-matrix`, `resolve-workspace-symbol`, `check-symbol-exists`, and `validate-mixin` now reuse hot-path mapping graph paths, class remaps, and normalization work, reducing latency for repeated namespace lookups and large Mixin validation batches.
89
- - Warm-cache source and mod workflows now avoid extra regex recompilation, statement-cache churn, and FIFO cache evictions across search, signature lookup, source resolution, and decompile paths.
128
+ - Cache-heavy artifact loading and runtime metric reads now stay faster after repeated operations instead of rescanning cache state each time.
129
+ - `find-mapping`, `get-class-api-matrix`, `resolve-workspace-symbol`, `check-symbol-exists`, and `validate-mixin` now respond faster on repeated mapping-heavy workflows.
90
130
 
91
131
  ## [2.0.0] - 2026-03-07
92
132
 
@@ -102,7 +142,7 @@ and this project aims to follow [Semantic Versioning](https://semver.org/spec/v2
102
142
 
103
143
  ### Fixed
104
144
  - `resolve-artifact`: `targetKind=coordinate` now reuses the local Gradle `modules-2` cache in addition to the local Maven repository and configured source repos, so cached third-party libraries such as Architectury can resolve without manual cache spelunking.
105
- - `resolve-artifact`: `mapping=mojang` + Loom merged source discovery now flags partial source coverage with `qualityFlags=["partial-source-no-net-minecraft"]` and a warning when the selected source jar does not actually contain `net.minecraft` entries.
145
+ - `resolve-artifact`: `mapping=mojang` + Loom merged source discovery now warns when the selected source jar only provides partial Minecraft source coverage.
106
146
  - `get-class-source` / `get-class-members`: when an artifact is resolved from a `*-sources.jar`, the server now keeps the sibling binary jar and automatically falls back to it when source coverage is incomplete instead of treating the source jar as bytecode.
107
147
  - `get-class-source`: partial-source binary fallback now bypasses the same sibling `*-sources.jar` that triggered the miss, and fallback failures for vanilla classes point to `get-class-api-matrix` instead of misleading `find-class` recovery.
108
148
  - `get-class-members`: bytecode lookup now follows the resolved artifact namespace (`mappingApplied`) before remapping members back to the requested namespace, fixing merged Mojang artifacts that were incorrectly forced through obfuscated class names.
@@ -112,18 +152,14 @@ and this project aims to follow [Semantic Versioning](https://semver.org/spec/v2
112
152
  - Tool input parsing now leaves nested `typedJson` and JSON Patch `value` payload fields untouched, even when their keys happen to match top-level numeric option names such as `limit` or `maxLines`.
113
153
 
114
154
  ### Performance
115
- - `search-class-source`: reduce search latency, heap growth, and DB round-trips by returning compact hits only and skipping snippet hydration, relation expansion, and `totalApprox` count queries.
116
- - Tool input preprocessing now stays shallow, avoiding recursive scans through large nested payloads such as NBT typed JSON and patch bodies.
155
+ - `search-class-source` now returns compact hits more efficiently, reducing latency and memory use on larger artifacts.
117
156
 
118
157
  ## [1.2.1] - 2026-03-05
119
158
 
120
159
  ### Fixed
121
- - MCP startup regression: removed eager `SourceService` pre-initialization during server startup so `tools/list` handshakes are not blocked by SQLite initialization on slower environments.
160
+ - MCP startup regression: `tools/list` handshakes no longer stall on SQLite initialization in slower environments.
122
161
  - Decompiler: skip Java/Vineflower availability checks when decompiled source is already cached, avoiding unnecessary startup errors on systems without Java.
123
162
 
124
- ### Documentation
125
- - Clarified startup behavior in README (`SourceService` remains lazy and is not pre-initialized before tool discovery).
126
-
127
163
  ## [1.2.0] - 2026-03-05
128
164
 
129
165
  ### Added
@@ -165,12 +201,7 @@ and this project aims to follow [Semantic Versioning](https://semver.org/spec/v2
165
201
  - Mojang proguard mapping: JVM descriptor parsing fixes.
166
202
 
167
203
  ### Changed
168
- - Lazy `SourceService` initialization deferred until first tool/resource access, reducing cold-start latency during MCP handshake.
169
- - Eagerly init `SourceService` during MCP handshake idle time for faster first-request response.
170
-
171
- ### Performance
172
- - Avoid duplicate UTF-8 decode during truncation.
173
- - Eager `SourceService` init during handshake idle time.
204
+ - `SourceService` startup work now avoids slowing the MCP handshake while still using idle time to reduce the wait before the first source-heavy request.
174
205
 
175
206
  ## [1.1.1] - 2026-03-02
176
207
 
@@ -180,11 +211,8 @@ and this project aims to follow [Semantic Versioning](https://semver.org/spec/v2
180
211
 
181
212
  ## [1.1.0] - 2026-03-01
182
213
 
183
- ### Changed
184
- - Migrate stdio transport from mcp-use to @modelcontextprotocol/sdk.
185
-
186
214
  ### Fixed
187
- - Restore Codex startup handshake compatibility by accepting both newline-delimited and `Content-Length` stdio framing.
215
+ - Restore Codex startup handshake compatibility by accepting both newline-delimited and `Content-Length` stdio framing on stdio connections.
188
216
 
189
217
  ### Documentation
190
218
  - Add Quick Start setup for Claude Code, OpenAI Codex CLI, and Gemini CLI.
package/README.md CHANGED
@@ -20,8 +20,8 @@
20
20
  - **Source Exploration**: browse and search decompiled Minecraft source code with line-level precision and cursor-paginated file listing
21
21
  - **Multi-Mapping Conversion**: translate class, field, and method names between `obfuscated`, `mojang`, `intermediary`, and `yarn`
22
22
  - **Version Comparison**: diff class signatures and registry entries between Minecraft versions
23
- - **Mod JAR Analysis**: extract metadata, dependencies, entrypoints, and Mixin configs from Fabric, Forge, and NeoForge mod JARs
24
- - **Mixin and Access Widener Validation**: validate source and `.accesswidener` files against a target Minecraft version
23
+ - **Mod JAR Analysis**: extract metadata, dependencies, entrypoints, Mixin configs, and packaged Access Transformer paths from Fabric, Forge, and NeoForge mod JARs
24
+ - **Mixin, Access Widener, and Access Transformer Validation**: validate source, `.accesswidener`, and Forge/NeoForge access transformer files against a target Minecraft version
25
25
  - **NBT Round-Trip**: decode NBT binary to typed JSON, apply RFC 6902 patches, and encode it back to NBT
26
26
  - **Registry Data and Runtime Metrics**: query generated registry snapshots and inspect cache and latency counters
27
27
  - **MCP Resources**: expose versions, class source, artifact metadata, and mappings through URI-based resources
@@ -128,21 +128,29 @@ Pass environment variables to override defaults:
128
128
 
129
129
  These six top-level workflow tools cover the common workflows and return summary-first results, so they are the best default starting points for agents and MCP clients.
130
130
 
131
+ All six return `result.summary` first, and can include `summary.nextActions` when there is a clear follow-up step. Use the table for tool selection, then use the examples and reference docs for exact payloads.
132
+
131
133
  | Tool | Start here for |
132
134
  | --- | --- |
133
135
  | `inspect-minecraft` | versions, artifacts, classes, files, and source search |
134
136
  | `analyze-symbol` | symbol existence checks, mapping conversion, lifecycle tracing, and workspace symbol resolution |
135
137
  | `compare-minecraft` | version-pair diffs, class diffs, registry diffs, and migration-oriented overviews |
136
138
  | `analyze-mod` | mod metadata, decompile/search flows, class source, and safe remap preview/apply |
137
- | `validate-project` | workspace summaries plus direct Mixin and Access Widener validation |
139
+ | `validate-project` | workspace summaries plus direct Mixin, Access Widener, and Access Transformer validation |
138
140
  | `manage-cache` | cache inventory, verification, and preview/apply cleanup workflows |
139
141
 
140
142
  ### Workflow Notes
141
143
 
142
- - These top-level workflow tools return `result.summary` first and include `summary.nextActions` when there is a clear follow-up step.
144
+ Keep only the high-frequency notes here. For the full pitfall list, exact contract details, migration notes, and environment variables, see [docs/tool-reference.md](docs/tool-reference.md).
145
+
143
146
  - `search-class-source` defaults to `queryMode="auto"` and keeps separator queries such as `foo.bar`, `foo_bar`, and `foo$bar` on the indexed path. Use `queryMode="literal"` for an explicit full substring scan.
144
- - When a public parameter has a fixed safe default, `tools/list` exposes it through the JSON Schema `default` field.
145
- - Error recovery `suggestedCall` payloads omit parameters when the supplied value already matches the tool default, keeping retry calls smaller without changing behavior.
147
+ - If you do not already have an artifact, prefer `subject.kind="workspace"` for `inspect-minecraft` instead of guessing artifact details. When artifact context is the only missing input, a retryable `suggestedCall` preserves the requested task.
148
+ - `trace-symbol-lifecycle` expects `Class.method` in `symbol`. Keep exact overload matching in the separate `descriptor` field.
149
+ - Workspace inspection can still confirm vanilla classes when source coverage is partial, and `inspect-minecraft task="list-files"` reports a partial result with follow-up guidance when that happens.
150
+ - `check-symbol-exists` and `analyze-symbol task="exists"` now validate `mojang` lookups on unobfuscated releases such as `26.1+` against runtime bytecode when no mapping graph exists, preserve the original `mapping_unavailable` result if the runtime JAR itself cannot be resolved, and return a targeted warning when callers provide only a short class name.
151
+ - `analyze-mod` and `validate-project` still require structured `subject` objects and canonical `include` groups, but stale string-subject or domain-include payloads now return `ERR_INVALID_INPUT` with a retryable `suggestedCall`.
152
+ - `validate-project task="project-summary"` now pre-resolves `preferProjectVersion=true` consistently across discovered Access Widener, Access Transformer, and Mixin checks, and blocks with version-agnostic recovery guidance when discovered validators need a version but neither the request nor `gradle.properties` can supply one.
153
+ - Local source-jar probing, decompiled mod source reads, and workspace discovery now avoid synchronous hot-path ZIP/file scans and use bounded concurrent reads where safe, so cold `resolve-artifact`, `analyze-mod`, and `validate-project` workflows stay more responsive on larger jars and multi-module workspaces.
146
154
 
147
155
  ### Inspect Minecraft source from a version
148
156
 
@@ -211,7 +219,7 @@ These six top-level workflow tools cover the common workflows and return summary
211
219
  "subject": {
212
220
  "kind": "workspace",
213
221
  "projectPath": "/workspace/modid",
214
- "discover": ["mixins", "access-wideners"]
222
+ "discover": ["mixins", "access-wideners", "access-transformers"]
215
223
  },
216
224
  "preferProjectVersion": true,
217
225
  "preferProjectMapping": true
@@ -219,11 +227,13 @@ These six top-level workflow tools cover the common workflows and return summary
219
227
  }
220
228
  ```
221
229
 
230
+ Workspace summaries still default to discovering mixins and access wideners. Add `"access-transformers"` to `subject.discover` when you want Access Transformer files included in the summary run.
231
+
222
232
  ## Documentation
223
233
 
224
- - [Detailed example requests](docs/examples.md)
225
- - [Tool and configuration reference](docs/tool-reference.md)
226
- - [日本語 README](docs/README-ja.md)
234
+ - [Detailed example requests](docs/examples.md) for copyable payloads and common workflows
235
+ - [Tool and configuration reference](docs/tool-reference.md) for exact inputs, outputs, resource behavior, environment variables, and migration notes
236
+ - [日本語 README](docs/README-ja.md) for a Japanese onboarding overview
227
237
 
228
238
  ## Tool Surface
229
239
 
@@ -232,14 +242,14 @@ Start with these top-level workflow tools unless you already know the exact spec
232
242
  ### Top-Level Workflow Tools
233
243
 
234
244
  <!-- BEGIN GENERATED TOOL TABLE: v3-entry-tools -->
235
- | Tool | Purpose | Key Inputs | Key Outputs |
236
- | --- | --- | --- | --- |
237
- | `inspect-minecraft` | Start from a version, artifact, class, file, search query, or workspace and route to the most relevant Minecraft inspection flow | `task?`, `subject?`, `detail?`, `include?`, `limit?`, `cursor?`, `includeSnapshots?` | `result.summary`, `versions?`, `subject`, `artifact?`, `class?`, `source?`, `members?`, `search?`, `file?`, `files?` |
238
- | `analyze-symbol` | One entry point for symbol existence checks, namespace mapping, lifecycle tracing, workspace symbol analysis, and API overview | `task`, `subject`, `version?`, `sourceMapping?`, `targetMapping?`, `projectPath?`, `classNameMapping?`, `signatureMode?`, `nameMode?`, `includeKinds?`, `maxRows?`, `maxCandidates?`, `detail?`, `include?` | `result.summary`, `match?`, `candidates?`, `ambiguity?`, `matrix?`, `workspace?` |
239
- | `compare-minecraft` | Compare version pairs, class signatures, registries, or produce a migration-oriented overview | `task?`, `subject`, `detail?`, `include?`, `subject.kind="class".sourcePriority?`, `maxClassResults?`, `maxEntriesPerRegistry?`, `includeFullDiff?`, `limit?` | `result.summary`, `comparison`, `classes?`, `classDiff?`, `registry?`, `migration?` |
240
- | `analyze-mod` | Metadata-first entry point for mod summary, decompile/search flows, class source, and safe remap previews/applies | `task`, `subject`, `query?`, `searchType?`, `targetMapping?`, `outputJar?`, `executionMode?`, `includeFiles?`, `maxFiles?`, `maxLines?`, `maxChars?`, `limit?`, `detail?`, `include?` | `result.summary`, `metadata?`, `decompile?`, `hits?`, `source?`, `operation?` |
241
- | `validate-project` | Project-level validation entry for workspace summaries plus direct Mixin and Access Widener validation | `task`, `subject`, `version?`, `mapping?`, `sourcePriority?`, `scope?`, `preferProjectVersion?`, `preferProjectMapping?`, `sourceRoots?`, `configPaths?`, `minSeverity?`, `hideUncertain?`, `explain?`, `warningMode?`, `warningCategoryFilter?`, `treatInfoAsWarning?`, `includeIssues?`, `detail?`, `include?` | `result.summary`, `project`, `workspace?`, `issues?` |
242
- | `manage-cache` | User-facing cache summary, listing, verification, previewed deletion/pruning/rebuild, and explicit apply operations | `action`, `cacheKinds?`, `selector?`, `executionMode?`, `detail?`, `include?`, `limit?`, `cursor?` | `result.summary`, `stats?`, `cacheEntries?`, `operation?`, `meta.pagination.nextCursor?` |
245
+ | Tool | Purpose |
246
+ | --- | --- |
247
+ | `inspect-minecraft` | Inspect versions, artifacts, classes, files, source text, and workspace-aware lookup flows |
248
+ | `analyze-symbol` | Handle symbol existence checks, namespace mapping, lifecycle tracing, workspace symbol resolution, and API overviews |
249
+ | `compare-minecraft` | Compare version pairs, class diffs, registry diffs, and migration-oriented summaries |
250
+ | `analyze-mod` | Summarize mod metadata, decompile and search mod code, inspect class source, and preview or apply remaps |
251
+ | `validate-project` | Summarize workspaces and run direct Mixin, Access Widener, or Access Transformer validation |
252
+ | `manage-cache` | List, verify, and preview or apply cache cleanup and rebuild operations |
243
253
  <!-- END GENERATED TOOL TABLE: v3-entry-tools -->
244
254
 
245
255
  ### Source Exploration
@@ -247,29 +257,31 @@ Start with these top-level workflow tools unless you already know the exact spec
247
257
  Tools for browsing Minecraft versions, resolving source artifacts, and reading or searching decompiled source code.
248
258
 
249
259
  <!-- BEGIN GENERATED TOOL TABLE: source-exploration -->
250
- | Tool | Purpose | Key Inputs | Key Outputs |
251
- | --- | --- | --- | --- |
252
- | `list-versions` | List available Minecraft versions from Mojang manifest + local cache | `includeSnapshots?`, `limit?` | `result.latest`, `result.releases[]`, `meta.warnings[]` |
253
- | `resolve-artifact` | Resolve source artifact from `version` / `jar` / `coordinate` | `target`, `mapping?`, `sourcePriority?`, `allowDecompile?`, `projectPath?`, `scope?`, `preferProjectVersion?`, `strictVersion?` | `artifactId`, `origin`, `mappingApplied`, `qualityFlags[]`, `artifactContents`, `adjacentSourceCandidates?`, `sampleEntries?`, `warnings[]` |
254
- | `find-class` | Resolve simple or fully-qualified class names inside an artifact | `className`, `artifactId`, `limit?` | `matches[]`, `total`, `warnings[]` |
255
- | `get-class-source` | Get class source by artifact target or resolve target on demand (`mode=metadata` by default) | `className`, `target`, `mode?`, `mapping?`, `sourcePriority?`, `allowDecompile?`, `projectPath?`, `scope?`, `preferProjectVersion?`, `strictVersion?`, `startLine?`, `endLine?`, `maxLines?`, `maxChars?`, `outputFile?` | `mode`, `sourceText`, `returnedRange`, `truncated`, `charsTruncated?`, `outputFile?`, `artifactId`, `returnedNamespace`, `artifactContents`, mapping/provenance metadata |
256
- | `get-class-members` | Get class fields/methods/constructors from bytecode | `className`, `target`, `mapping?`, `sourcePriority?`, `allowDecompile?`, `access?`, `includeSynthetic?`, `includeInherited?`, `memberPattern?`, `maxMembers?`, `projectPath?`, `scope?`, `preferProjectVersion?`, `strictVersion?` | `members.{constructors,fields,methods}`, `counts`, `truncated`, `context`, `returnedNamespace`, `artifactContents`, `warnings[]` |
257
- | `search-class-source` | Search indexed class source for symbols/text/path | `artifactId`, `query`, `intent?`, `match?`, `packagePrefix?`, `fileGlob?`, `symbolKind?`, `queryMode?`, `limit?`, `cursor?` | `hits[]`, `nextCursor?`, `mappingApplied`, `returnedNamespace`, `artifactContents` |
258
- | `get-artifact-file` | Read full source file with byte guard | `artifactId`, `filePath`, `maxBytes?` | `content`, `contentBytes`, `truncated`, `mappingApplied`, `returnedNamespace`, `artifactContents` |
259
- | `list-artifact-files` | List indexed source file paths with cursor pagination | `artifactId`, `prefix?`, `limit?`, `cursor?` | `items[]`, `nextCursor?`, `mappingApplied`, `artifactContents`, `warnings[]` |
260
- | `index-artifact` | Rebuild index metadata for an existing artifact | `artifactId`, `force?` | `reindexed`, `reason`, `counts`, `indexedAt`, `durationMs` |
260
+ | Tool | Purpose |
261
+ | --- | --- |
262
+ | `list-versions` | List available Minecraft versions from Mojang metadata and local cache |
263
+ | `resolve-artifact` | Resolve source artifacts from versions, JAR paths, or Maven coordinates |
264
+ | `find-class` | Find simple or fully-qualified class names inside an artifact |
265
+ | `get-class-source` | Read class source from an artifact or resolve the backing artifact on demand |
266
+ | `get-class-members` | List constructors, fields, and methods from bytecode |
267
+ | `search-class-source` | Search indexed class source by symbol, text, or path |
268
+ | `get-artifact-file` | Read a full source file with a byte limit |
269
+ | `list-artifact-files` | List indexed source file paths with cursor pagination |
270
+ | `index-artifact` | Rebuild indexed metadata for an existing artifact |
261
271
  <!-- END GENERATED TOOL TABLE: source-exploration -->
262
272
 
273
+ For unobfuscated releases such as `26.1+`, `mapping="mojang"` now uses the runtime/decompile path directly for version and versioned-coordinate targets and skips Loom source-jar discovery entirely, while `intermediary` and `yarn` still fall back to `obfuscated` with a warning.
274
+
263
275
  ### Version Comparison & Symbol Tracking
264
276
 
265
277
  Tools for comparing class and registry changes across Minecraft versions and tracing symbol existence over time.
266
278
 
267
279
  <!-- BEGIN GENERATED TOOL TABLE: version-comparison-symbol-tracking -->
268
- | Tool | Purpose | Key Inputs | Key Outputs |
269
- | --- | --- | --- | --- |
270
- | `trace-symbol-lifecycle` | Trace when `Class.method` exists across Minecraft versions (`descriptor` omitted = name-only lookup) | `symbol`, `descriptor?`, `fromVersion?`, `toVersion?`, `mapping?`, `sourcePriority?`, `includeSnapshots?`, `maxVersions?`, `includeTimeline?` | `presence.firstSeen`, `presence.lastSeen`, `presence.missingBetween[]`, `presence.existsNow`, `timeline?`, `warnings[]` |
271
- | `diff-class-signatures` | Compare one class between two versions and return member deltas | `className`, `fromVersion`, `toVersion`, `mapping?`, `sourcePriority?`, `includeFullDiff?` | `classChange`, `constructors/methods/fields.{added,removed,modified}`, `modified`, `modified[].{key,changed,from?,to?}`, `summary`, `warnings[]` |
272
- | `compare-versions` | Compare class/registry changes between two versions | `fromVersion`, `toVersion`, `category?`, `packageFilter?`, `maxClassResults?` | `classes`, `registry`, `summary`, `warnings[]` |
280
+ | Tool | Purpose |
281
+ | --- | --- |
282
+ | `trace-symbol-lifecycle` | Trace when `Class.method` exists across Minecraft versions |
283
+ | `diff-class-signatures` | Compare one class across two versions and return member deltas |
284
+ | `compare-versions` | Compare class and registry changes between two versions |
273
285
  <!-- END GENERATED TOOL TABLE: version-comparison-symbol-tracking -->
274
286
 
275
287
  ### Mapping & Symbols
@@ -277,25 +289,27 @@ Tools for comparing class and registry changes across Minecraft versions and tra
277
289
  Tools for converting symbol names between namespaces and checking symbol existence.
278
290
 
279
291
  <!-- BEGIN GENERATED TOOL TABLE: mapping-symbols -->
280
- | Tool | Purpose | Key Inputs | Key Outputs |
281
- | --- | --- | --- | --- |
282
- | `find-mapping` | Find mapping candidates for class/field/method symbols between namespaces | `version`, `kind`, `name`, `owner?`, `descriptor?`, `sourceMapping`, `targetMapping`, `sourcePriority?`, `disambiguation?`, `maxCandidates?` | `querySymbol`, `mappingContext`, `resolved`, `status`, `resolvedSymbol?`, `candidates[]`, `candidateCount`, `candidatesTruncated?`, `ambiguityReasons?`, `provenance?`, `meta.warnings[]` |
283
- | `resolve-method-mapping-exact` | Resolve one method mapping with strict owner+name+descriptor matching | `version`, `name`, `owner`, `descriptor`, `sourceMapping`, `targetMapping`, `sourcePriority?`, `maxCandidates?` | `querySymbol`, `mappingContext`, `resolved`, `status`, `resolvedSymbol?`, `candidates[]`, `candidateCount`, `candidatesTruncated?`, `provenance?`, `meta.warnings[]` |
284
- | `get-class-api-matrix` | Show one class API as a mapping matrix (`obfuscated/mojang/intermediary/yarn`) | `version`, `className`, `classNameMapping`, `includeKinds?`, `sourcePriority?`, `maxRows?` | `classIdentity`, `rows[]`, `rowCount`, `rowsTruncated?`, `ambiguousRowCount?`, `meta.warnings[]` |
285
- | `resolve-workspace-symbol` | Resolve compile-visible symbol names for a Gradle workspace (`build.gradle/.kts`) | `projectPath`, `version`, `kind`, `name`, `owner?`, `descriptor?`, `sourceMapping`, `sourcePriority?`, `maxCandidates?` | `querySymbol`, `mappingContext`, `resolved`, `status`, `resolvedSymbol?`, `candidates[]`, `candidateCount`, `candidatesTruncated?`, `workspaceDetection`, `meta.warnings[]` |
286
- | `check-symbol-exists` | Strict symbol presence check for class/field/method | `version`, `kind`, `name`, `owner?`, `descriptor?`, `sourceMapping`, `sourcePriority?`, `nameMode?`, `signatureMode?`, `maxCandidates?` | `querySymbol`, `mappingContext`, `resolved`, `status`, `resolvedSymbol?`, `candidates[]`, `candidateCount`, `candidatesTruncated?`, `meta.warnings[]` |
292
+ | Tool | Purpose |
293
+ | --- | --- |
294
+ | `find-mapping` | Look up mapping candidates for class, field, or method symbols |
295
+ | `resolve-method-mapping-exact` | Resolve one method mapping with strict owner, name, and descriptor matching |
296
+ | `get-class-api-matrix` | Show one class API across `obfuscated`, `mojang`, `intermediary`, and `yarn` |
297
+ | `resolve-workspace-symbol` | Resolve compile-visible symbol names from a Gradle workspace |
298
+ | `check-symbol-exists` | Check whether a class, field, or method exists in a namespace |
287
299
  <!-- END GENERATED TOOL TABLE: mapping-symbols -->
288
300
 
301
+ `resolve-artifact`, `find-mapping`, `resolve-method-mapping-exact`, `resolve-workspace-symbol`, and `check-symbol-exists` accept an optional `compact` parameter (default `false`). When `true`, empty arrays, null values, and empty objects are stripped from the top-level response to reduce token overhead. For `resolve-artifact`, compact mode additionally omits diagnostic fields (`provenance`, `artifactContents`, `sampleEntries`, `adjacentSourceCandidates`, `binaryJarPath`, `coordinate`, `repoUrl`, `resolvedSourceJarPath`), returning only the essential fields needed for downstream tool calls. For mapping tools, compact mode omits the redundant `candidates` array when the result is a single full-confidence exact-match resolution (`resolved=true`, `resolvedSymbol` present, `candidates.length=1`, `candidateCount=1`, `!candidatesTruncated`, `matchKind="exact"`, `confidence` missing or `1`).
302
+
289
303
  ### NBT Utilities
290
304
 
291
305
  Tools for decoding, patching, and encoding Java Edition NBT binary data using a typed JSON representation.
292
306
 
293
307
  <!-- BEGIN GENERATED TOOL TABLE: nbt-utilities -->
294
- | Tool | Purpose | Key Inputs | Key Outputs |
295
- | --- | --- | --- | --- |
296
- | `nbt-to-json` | Decode Java Edition NBT binary (`base64`) to typed JSON | `nbtBase64`, `compression?` (`none`, `gzip`, `auto`) | `typedJson`, `meta.compressionDetected`, `meta.inputBytes` |
297
- | `nbt-apply-json-patch` | Apply RFC 6902 patch (`add/remove/replace/test`) to typed NBT JSON | `typedJson`, `patch` | `typedJson`, `meta.appliedOps`, `meta.testOps`, `meta.changed` |
298
- | `json-to-nbt` | Encode typed JSON back to Java Edition NBT binary (`base64`) | `typedJson`, `compression?` (`none`, `gzip`) | `nbtBase64`, `meta.outputBytes`, `meta.compressionApplied` |
308
+ | Tool | Purpose |
309
+ | --- | --- |
310
+ | `nbt-to-json` | Decode Java Edition NBT binary payloads into typed JSON |
311
+ | `nbt-apply-json-patch` | Apply RFC 6902 patches to typed NBT JSON |
312
+ | `json-to-nbt` | Encode typed JSON back to Java Edition NBT binary |
299
313
  <!-- END GENERATED TOOL TABLE: nbt-utilities -->
300
314
 
301
315
  ### Mod Analysis
@@ -303,24 +317,27 @@ Tools for decoding, patching, and encoding Java Edition NBT binary data using a
303
317
  Tools for extracting metadata from mod JARs, decompiling mod source, searching mod code, and remapping mod namespaces.
304
318
 
305
319
  <!-- BEGIN GENERATED TOOL TABLE: mod-analysis -->
306
- | Tool | Purpose | Key Inputs | Key Outputs |
307
- | --- | --- | --- | --- |
308
- | `analyze-mod-jar` | Extract mod metadata/dependencies/entrypoints from mod JAR | `jarPath`, `includeClasses?` | `modId`, `loader`, `jarKind`, `dependencies`, `entrypoints`, `mixinConfigs`, class stats |
309
- | `decompile-mod-jar` | Decompile mod JAR and optionally return one class source | `jarPath`, `className?`, `includeFiles?`, `maxFiles?` | `outputDir`, `fileCount`, `files?`, `returnedFileCount?`, `filesTruncated?`, `filesOmitted?`, `source?`, `warnings[]` |
310
- | `get-mod-class-source` | Read one class source from decompiled mod cache | `jarPath`, `className`, `maxLines?`, `maxChars?`, `outputFile?` | `className`, `content`, `totalLines`, `truncated?`, `charsTruncated?`, `outputFilePath?`, `warnings[]` |
311
- | `search-mod-source` | Search decompiled mod source by class/method/field/content | `jarPath`, `query`, `searchType?`, `limit?` | `hits[]`, `totalHits`, `truncated`, `warnings[]` |
312
- | `remap-mod-jar` | Remap a Fabric/Quilt mod JAR to yarn/mojang names; Mojang-mapped inputs are copied for `targetMapping="mojang"` | `inputJar`, `targetMapping`, `mcVersion?`, `outputJar?` | `outputJar`, `mcVersion`, `fromMapping`, `targetMapping`, `resolvedTargetNamespace`, `warnings[]` |
320
+ | Tool | Purpose |
321
+ | --- | --- |
322
+ | `analyze-mod-jar` | Extract mod metadata, dependencies, entrypoints, mixin config info, and packaged access transformer paths from a JAR |
323
+ | `decompile-mod-jar` | Decompile a mod JAR and optionally return one class source |
324
+ | `get-mod-class-source` | Read one class source from the decompiled mod cache |
325
+ | `search-mod-source` | Search decompiled mod source by class, method, field, or content |
326
+ | `remap-mod-jar` | Remap a Fabric or Quilt mod JAR to `yarn` or `mojang` names |
313
327
  <!-- END GENERATED TOOL TABLE: mod-analysis -->
314
328
 
315
329
  ### Validation
316
330
 
317
- Tools for validating Mixin source and Access Widener files against a target Minecraft version.
331
+ Tools for validating Mixin source, Access Widener files, and Forge/NeoForge Access Transformer files against a target Minecraft version.
332
+ `validate-access-widener` keeps vanilla bytecode validation by default, and now also supports runtime-aware validation through `projectPath`, `scope`, and `preferProjectVersion`, returning runtime `provenance` plus per-entry `resolvedRuntimeAccess` evidence when that mode is used. Runtime-aware method validation now preserves remapped JVM descriptors across namespace changes, searches Loom tiny mappings from workspace and Gradle user-home caches, and prefers explicit `*merged-intermediary*` / `*merged-mojang*` jars over ambiguous `minecraft-merged.jar` candidates.
333
+ `validate-access-transformer` infers `atNamespace` from Forge or NeoForge workspace context when `projectPath` is provided, validates packaged or inline AT content, and uses loader/runtime artifacts for `scope="loader"` instead of treating loader as a merged-only alias.
318
334
 
319
335
  <!-- BEGIN GENERATED TOOL TABLE: validation -->
320
- | Tool | Purpose | Key Inputs | Key Outputs |
321
- | --- | --- | --- | --- |
322
- | `validate-mixin` | Parse/validate Mixin source against target Minecraft version | `input`, `sourceRoots?`, `version`, `mapping?`, `sourcePriority?`, `projectPath?`, `scope?`, `preferProjectVersion?`, `minSeverity?`, `hideUncertain?`, `warningMode?`, `preferProjectMapping?`, `reportMode?`, `warningCategoryFilter?`, `treatInfoAsWarning?`, `explain?`, `includeIssues?` | `mode`, `results[].validationStatus`, `summary.partial`, `issueSummary?`, `provenance?`, `incompleteReasons?`, `toolHealth?`, `confidenceScore?`, `confidenceBreakdown?` |
323
- | `validate-access-widener` | Parse/validate Access Widener content against target version | `content`, `version`, `mapping?`, `sourcePriority?` | `valid`, `issues[]`, `warnings[]`, `summary` |
336
+ | Tool | Purpose |
337
+ | --- | --- |
338
+ | `validate-mixin` | Validate Mixin source against a target Minecraft version |
339
+ | `validate-access-widener` | Validate Access Widener content against a target Minecraft version, optionally using runtime-aware Loom artifacts |
340
+ | `validate-access-transformer` | Validate Access Transformer content against a target Minecraft version, optionally using Forge/NeoForge runtime artifacts |
324
341
  <!-- END GENERATED TOOL TABLE: validation -->
325
342
 
326
343
  ### Registry & Diagnostics
@@ -328,52 +345,14 @@ Tools for validating Mixin source and Access Widener files against a target Mine
328
345
  Tools for querying generated registry data and inspecting server runtime state.
329
346
 
330
347
  <!-- BEGIN GENERATED TOOL TABLE: registry-diagnostics -->
331
- | Tool | Purpose | Key Inputs | Key Outputs |
332
- | --- | --- | --- | --- |
333
- | `get-registry-data` | Get generated registry snapshots (blocks/items/entities etc.) | `version`, `registry?`, `includeData?`, `maxEntriesPerRegistry?` | `registries`, `data?`, `entryCount`, `returnedEntryCount?`, `registryEntryCounts?`, `dataTruncated?`, `warnings[]` |
334
- | `get-runtime-metrics` | Inspect runtime counters and latency snapshots | none | `result.*` runtime metrics, `meta` envelope |
348
+ | Tool | Purpose |
349
+ | --- | --- |
350
+ | `get-registry-data` | Read generated registry snapshots and optionally include entry data |
351
+ | `get-runtime-metrics` | Inspect runtime metrics and latency snapshots |
335
352
  <!-- END GENERATED TOOL TABLE: registry-diagnostics -->
336
353
 
337
354
  Detailed parameter constraints, migration notes, resource behavior, and the full environment-variable matrix live in [docs/tool-reference.md](docs/tool-reference.md).
338
355
 
339
- ## Resources
340
-
341
- Fixed resources:
342
-
343
- - `mc://versions/list`
344
- - `mc://metrics`
345
-
346
- Template resources:
347
-
348
- - `mc://source/{artifactId}/{className}`
349
- - `mc://artifact/{artifactId}/files/{filePath}`
350
- - `mc://mappings/{version}/{sourceMapping}/{targetMapping}/{kind}/{name}`
351
- - `mc://artifact/{artifactId}/members/{className}`
352
- - `mc://artifact/{artifactId}`
353
-
354
- See [docs/tool-reference.md#resources](docs/tool-reference.md#resources) for the full resource table and response behavior.
355
-
356
- ## Response Model
357
-
358
- Tools and JSON resources return the standard `{ result?, error?, meta }` envelope. Text resources (`class-source` and `artifact-file`) return raw text on success and structured JSON on failure.
359
-
360
- See [docs/tool-reference.md#response-envelope](docs/tool-reference.md#response-envelope) for the exact envelope fields and error shape.
361
-
362
- ## Common Environment Variables
363
-
364
- These are the most commonly changed settings. For the full supported list, see [docs/tool-reference.md#environment-variables](docs/tool-reference.md#environment-variables).
365
-
366
- | Variable | Default | Description |
367
- | --- | --- | --- |
368
- | `MCP_CACHE_DIR` | `~/.cache/minecraft-modding-mcp` | Cache root for downloads and SQLite |
369
- | `MCP_SOURCE_REPOS` | Maven Central + Fabric + Forge + NeoForge | Comma-separated Maven repository URLs |
370
- | `MCP_MAPPING_SOURCE_PRIORITY` | `loom-first` | Mapping source priority (`loom-first` or `maven-first`) |
371
- | `MCP_ENABLE_INDEXED_SEARCH` | `true` | Enable indexed search for `search-class-source` |
372
- | `MCP_VINEFLOWER_JAR_PATH` | unset | Override the Vineflower JAR path |
373
- | `MCP_TINY_REMAPPER_JAR_PATH` | unset | Override the tiny-remapper JAR path |
374
- | `MCP_MAX_SEARCH_HITS` | `200` | Maximum search result count |
375
- | `MCP_MAX_CACHE_BYTES` | `2147483648` | Maximum total cache size in bytes |
376
-
377
356
  ## Development
378
357
 
379
358
  Repository requirements:
@@ -0,0 +1,17 @@
1
+ export type AccessTransformerAccessAction = "public" | "protected" | "package-private" | "private";
2
+ export type AccessTransformerFinalAction = "add" | "remove";
3
+ export type AccessTransformerEntry = {
4
+ line: number;
5
+ targetKind: "class" | "field" | "method";
6
+ owner: string;
7
+ target: string;
8
+ name?: string;
9
+ descriptor?: string;
10
+ accessAction: AccessTransformerAccessAction;
11
+ finalAction?: AccessTransformerFinalAction;
12
+ };
13
+ export type ParsedAccessTransformer = {
14
+ entries: AccessTransformerEntry[];
15
+ parseWarnings: string[];
16
+ };
17
+ export declare function parseAccessTransformer(content: string): ParsedAccessTransformer;
@@ -0,0 +1,97 @@
1
+ function parseAccessDeclaration(raw) {
2
+ const match = raw.match(/^(public|protected|default|private)([+-]f)?$/i);
3
+ if (!match) {
4
+ return undefined;
5
+ }
6
+ const finalModifier = match[2]?.toLowerCase();
7
+ return {
8
+ accessAction: match[1]?.toLowerCase() === "default"
9
+ ? "package-private"
10
+ : match[1]?.toLowerCase(),
11
+ ...(finalModifier === "+f" ? { finalAction: "add" } : {}),
12
+ ...(finalModifier === "-f" ? { finalAction: "remove" } : {})
13
+ };
14
+ }
15
+ function splitMemberToken(tokens) {
16
+ if (tokens.length === 0) {
17
+ return { targetKind: "class" };
18
+ }
19
+ if (tokens.length === 1) {
20
+ const token = tokens[0] ?? "";
21
+ const descriptorStart = token.indexOf("(");
22
+ if (descriptorStart >= 0) {
23
+ return {
24
+ targetKind: "method",
25
+ name: token.slice(0, descriptorStart),
26
+ descriptor: token.slice(descriptorStart)
27
+ };
28
+ }
29
+ return {
30
+ targetKind: "field",
31
+ name: token
32
+ };
33
+ }
34
+ return {
35
+ targetKind: "method",
36
+ name: tokens[0],
37
+ descriptor: tokens.slice(1).join("")
38
+ };
39
+ }
40
+ export function parseAccessTransformer(content) {
41
+ const entries = [];
42
+ const parseWarnings = [];
43
+ const lines = content.split(/\r?\n/);
44
+ for (let index = 0; index < lines.length; index++) {
45
+ const lineNumber = index + 1;
46
+ const rawLine = (lines[index] ?? "").trim();
47
+ if (!rawLine || rawLine.startsWith("#")) {
48
+ continue;
49
+ }
50
+ const withoutComment = rawLine.replace(/\s+#.*$/, "").trim();
51
+ if (!withoutComment) {
52
+ continue;
53
+ }
54
+ const parts = withoutComment.split(/\s+/);
55
+ if (parts.length < 2) {
56
+ parseWarnings.push(`Line ${lineNumber}: Incomplete access transformer entry "${withoutComment}".`);
57
+ continue;
58
+ }
59
+ const declaration = parseAccessDeclaration(parts[0] ?? "");
60
+ if (!declaration) {
61
+ parseWarnings.push(`Line ${lineNumber}: Unsupported access declaration "${parts[0]}".`);
62
+ continue;
63
+ }
64
+ const owner = parts[1] ?? "";
65
+ if (!owner) {
66
+ parseWarnings.push(`Line ${lineNumber}: Incomplete access transformer entry "${withoutComment}".`);
67
+ continue;
68
+ }
69
+ const member = splitMemberToken(parts.slice(2));
70
+ if (member.targetKind === "method" && (!member.name || !member.descriptor)) {
71
+ parseWarnings.push(`Line ${lineNumber}: Method entry requires a method name and JVM descriptor.`);
72
+ continue;
73
+ }
74
+ if ((member.targetKind === "field" || member.targetKind === "method") && !member.name) {
75
+ parseWarnings.push(`Line ${lineNumber}: Member entry requires a target name.`);
76
+ continue;
77
+ }
78
+ const target = member.targetKind === "class"
79
+ ? owner
80
+ : `${owner}#${member.name}${member.descriptor ?? ""}`;
81
+ entries.push({
82
+ line: lineNumber,
83
+ owner,
84
+ target,
85
+ targetKind: member.targetKind,
86
+ ...(member.name ? { name: member.name } : {}),
87
+ ...(member.descriptor ? { descriptor: member.descriptor } : {}),
88
+ accessAction: declaration.accessAction,
89
+ ...(declaration.finalAction ? { finalAction: declaration.finalAction } : {})
90
+ });
91
+ }
92
+ return {
93
+ entries,
94
+ parseWarnings
95
+ };
96
+ }
97
+ //# sourceMappingURL=access-transformer-parser.js.map
@@ -0,0 +1 @@
1
+ export declare function mapWithConcurrencyLimit<T, R>(items: readonly T[], limit: number, mapper: (item: T, index: number) => Promise<R>): Promise<R[]>;