Skip to content

Commit 168b3d8

Browse files
committed
OPTIMIZE: optimize decode apk tool to don't return output of the apktool and only return true/false and output directory location to save the context length while llm chat
1 parent 2e05e2e commit 168b3d8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

apktool_mcp_server.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,12 @@ async def decode_apk(apk_path: str, force: bool = True, no_res: bool = False, no
115115
result = run_command(command)
116116

117117
if result["success"]:
118-
result["project_dir"] = output_dir
119-
120-
return result
118+
return {
119+
"success": True,
120+
"output_dir": output_dir
121+
}
122+
else:
123+
return result
121124

122125
@mcp.tool(name="build_apk", description="Build an APK file from a decoded APKTool project.")
123126
async def build_apk(project_dir: str, output_apk: Optional[str] = None, debug: bool = True, force_all: bool = False) -> Dict:

0 commit comments

Comments
 (0)