Skip to main content
Glama

get_manifest

Extract and retrieve the AndroidManifest.xml file from a decoded APK project to analyze app permissions, components, and configurations.

Instructions

Get the AndroidManifest.xml content from a decoded APK project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_dirYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler function for the 'get_manifest' MCP tool. It validates the project directory, locates and reads the AndroidManifest.xml file, and returns its content along with metadata and file information. Includes comprehensive error handling.
    @mcp.tool()
    async def get_manifest(project_dir: str) -> Dict:
        """
        Get the AndroidManifest.xml content from a decoded APK project with validation.
        
        Args:
            project_dir: Path to the APKTool project directory
            
        Returns:
            Dictionary with manifest 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"]}
        
        manifest_path = os.path.join(project_dir, "AndroidManifest.xml")
        if not os.path.exists(manifest_path):
            return {
                "success": False,
                "error": f"AndroidManifest.xml not found in {project_dir}",
                "expected_path": manifest_path
            }
        
        try:
            with open(manifest_path, 'r', encoding="utf-8") as f:
                content = f.read()
     
            result = {
                "success": True,
                "manifest": content,
                "path": manifest_path,
                "size": os.path.getsize(manifest_path),
                "encoding": "utf-8"
            }
            
            return result
            
        except Exception as e:
            logger.error(f"Error reading manifest: {str(e)}")
            return {
                "success": False,
                "error": f"Failed to read AndroidManifest.xml: {str(e)}",
                "path": manifest_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 'Get[s]' content, implying a read-only operation, but does not clarify if this requires specific permissions, what happens if the file is missing, or details about the output format (though an output schema exists). For a tool with zero annotation coverage, this is minimal transparency.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, making it easy for an agent to parse quickly. Every part of the sentence earns its place by conveying essential information.

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

Completeness4/5

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

Given the tool's moderate complexity (reading a specific file from a project) and the presence of an output schema (which handles return values), the description is mostly complete. It clearly identifies the target file and context, though it lacks usage guidelines and parameter details. With annotations absent, it could benefit from more behavioral context, but the output schema mitigates some gaps.

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 description does not add any meaning beyond the input schema, which has 0% schema description coverage. It does not explain what 'project_dir' represents (e.g., a path to a decoded APK directory) or its expected format. With one parameter and no schema descriptions, the baseline is 3, as the description does not compensate for the coverage gap.

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

Purpose5/5

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

The description clearly states the specific action ('Get') and resource ('AndroidManifest.xml content from a decoded APK project'), distinguishing it from siblings like get_resource_file or get_smali_file that target different files. It precisely identifies what the tool does without being vague or tautological.

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 no guidance on when to use this tool versus alternatives. It does not mention prerequisites (e.g., requiring a decoded APK project from decode_apk) or exclusions, leaving the agent to infer context from the tool name alone. This lack of explicit usage instructions is a significant gap.

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