[GH-ISSUE #4982] [Feature] Offer table-only Apktool string projection for locale queries #3081

Closed
opened 2026-10-31 00:36:12 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @N0zoM1z0 on GitHub (Oct 18, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/4982

Area

MCP or agent integration; shared CLI/provider resource projection.

Current limitation

Following #4777 / merged #4804, a completed default + German + Brazilian Portuguese resource question uses one decode with locales: ["de", "pt-BR"]. The primary table appears twice: top-level strings and string_tables[0].strings. This compatibility default is useful, but a caller cannot request just the typed tables.

Observed through the production stdio MCP workflow at 8f7d12e30d63f3d3b4cfe2a90336362841438f56, Apktool 3.0.3 / JDK 21 / Node 24.18.0 on Linux, one CPU and an 8 GiB family bound. First completed pair on official NewPipe 0.29.1 (SHA-256 18447bfb1e06d113edc88df93f471827280de06f6f3d4dc42f56f28b9c1bab79): three separate calls took 21.49 s in decode calls and returned 616,059 total reply bytes; one batch took 7.40 s and returned 680,188 bytes. The repeated primary strings occupy 86,690 bytes in one normalized result JSON encoding. Raw MCP reply sizes include both content and structured representations; these are not actual model token measurements. ApiDemos' larger common manifest makes its batch smaller, so the cost depends on the target.

Desired outcome and success criteria

Offer an explicit table-only string projection through the existing operation and shared implementation. Preserve current defaults, caller locale labels, physical alias reuse, counts, coverage, provenance and complete selected facts. Charge aggregate budgets for the output actually selected. Keep this useful for a single selected table as well as a batch without introducing another tool or a cross-call engine cache.

Expected interaction with targets

Read existing local APK files; run the existing static decoder in owned temporary workspaces. No APK execution, device attachment, injection, original-byte mutation or new provider authority.

Verification available so far

Observed real workflows above; repeated comparisons are in progress. Workspace deletion and unchanged target digests checked. Independent Expat projection against separately decoded XML, small/empty selections, CLI/MCP parity, aggregate/cancellation regressions and full task token estimates are planned, not claimed completed here. Binary ARSC decoder completeness and actual agent usage remain unverified.

Alternatives considered / possible direction

Separate locale calls preserve data but repeat expensive decoding. Dropping the primary field by default would change existing responses. An additive opt-in selector can avoid the duplicate while retaining the default behavior; include_strings: false currently suppresses every table and cannot answer this question. No duplicate proposal found in open/closed issue search beyond #4777.

Originally created by @N0zoM1z0 on GitHub (Oct 18, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/4982 ### Area MCP or agent integration; shared CLI/provider resource projection. ### Current limitation Following #4777 / merged #4804, a completed default + German + Brazilian Portuguese resource question uses one decode with `locales: ["de", "pt-BR"]`. The primary table appears twice: top-level `strings` and `string_tables[0].strings`. This compatibility default is useful, but a caller cannot request just the typed tables. Observed through the production stdio MCP workflow at `8f7d12e30d63f3d3b4cfe2a90336362841438f56`, Apktool 3.0.3 / JDK 21 / Node 24.18.0 on Linux, one CPU and an 8 GiB family bound. First completed pair on official NewPipe 0.29.1 (SHA-256 `18447bfb1e06d113edc88df93f471827280de06f6f3d4dc42f56f28b9c1bab79`): three separate calls took 21.49 s in decode calls and returned 616,059 total reply bytes; one batch took 7.40 s and returned 680,188 bytes. The repeated primary strings occupy 86,690 bytes in one normalized result JSON encoding. Raw MCP reply sizes include both content and structured representations; these are not actual model token measurements. ApiDemos' larger common manifest makes its batch smaller, so the cost depends on the target. ### Desired outcome and success criteria Offer an explicit table-only string projection through the existing operation and shared implementation. Preserve current defaults, caller locale labels, physical alias reuse, counts, coverage, provenance and complete selected facts. Charge aggregate budgets for the output actually selected. Keep this useful for a single selected table as well as a batch without introducing another tool or a cross-call engine cache. ### Expected interaction with targets Read existing local APK files; run the existing static decoder in owned temporary workspaces. No APK execution, device attachment, injection, original-byte mutation or new provider authority. ### Verification available so far Observed real workflows above; repeated comparisons are in progress. Workspace deletion and unchanged target digests checked. Independent Expat projection against separately decoded XML, small/empty selections, CLI/MCP parity, aggregate/cancellation regressions and full task token estimates are planned, not claimed completed here. Binary ARSC decoder completeness and actual agent usage remain unverified. ### Alternatives considered / possible direction Separate locale calls preserve data but repeat expensive decoding. Dropping the primary field by default would change existing responses. An additive opt-in selector can avoid the duplicate while retaining the default behavior; `include_strings: false` currently suppresses every table and cannot answer this question. No duplicate proposal found in open/closed issue search beyond #4777.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#3081
No description provided.