Skip to main content
Glama

get_apktool_yml

Extract and retrieve apktool.yml configuration details from a decoded APK project for streamlined Android reverse engineering and analysis.

Instructions

Get apktool.yml information from a decoded APK project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_dirYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'get_apktool_yml' MCP tool. It validates the input project directory, checks for the existence of 'apktool.yml', reads its content if present, and returns structured metadata including the file content, path, size, and encoding. Includes comprehensive error handling.
    async def get_apktool_yml(project_dir: str) -> Dict:
        """
        Get apktool.yml information from a decoded APK project with validation.
        
        Args:
            project_dir: Path to APKTool project directory
            
        Returns:
            Dictionary with apktool.yml content, metadata, and validation results
        """
        # Input validation
        path_validation = ValidationUtils.validate_path(project_dir, must_exist=True)
        if not path_validation["valid"]:
            return {"success": False, "error": path_validation["error"]}
        
        yml_path = os.path.join(project_dir, "apktool.yml")
        if not os.path.exists(yml_path):
            return {
                "success": False,
                "error": f"apktool.yml not found in {project_dir}",
                "expected_path": yml_path
            }
        
        try:
            with open(yml_path, 'r', encoding="utf-8") as f:
                content = f.read()
                        
            result = {
                "success": True,
                "content": content,
                "path": yml_path,
                "size": os.path.getsize(yml_path),
                "encoding": "utf-8"
            }
             
            return result
            
        except Exception as e:
            logger.error(f"Error reading apktool.yml: {str(e)}")
            return {
                "success": False,
                "error": f"Failed to read apktool.yml: {str(e)}",
                "path": yml_path
            }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves information, implying a read-only operation, but doesn't clarify aspects like error handling (e.g., if apktool.yml is missing), performance, or output format. This leaves gaps in understanding how the tool behaves beyond its basic function.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words, front-loading the key action and resource. It efficiently conveys the core purpose without unnecessary elaboration, making it easy for an AI agent to parse and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 parameter) and the presence of an output schema (which handles return values), the description is minimally adequate. However, with no annotations and incomplete parameter guidance, it lacks details on behavioral context and usage scenarios, leaving room for improvement in supporting effective tool invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 1 parameter with 0% description coverage, so the description must compensate. It mentions 'from a decoded APK project', which implicitly relates to the 'project_dir' parameter by indicating it should point to such a project. However, it doesn't add explicit details like expected directory structure or format, providing only marginal value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'apktool.yml information from a decoded APK project', making the purpose specific and understandable. However, it doesn't explicitly distinguish this tool from sibling tools like 'get_manifest' or 'get_resource_file' that also retrieve specific files from APK projects, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal guidance by mentioning 'from a decoded APK project', implying it should be used after decoding. However, it lacks explicit when-to-use instructions, alternatives (e.g., vs. other get_* tools), or prerequisites like ensuring the project is properly decoded, which limits its utility for an AI agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zinja-coder/apktool-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server