Skip to main content
Glama

mobile_take_screenshot

Capture the current screen display on an Android device to obtain a visual reference for analysis or documentation.

Instructions

Take a screenshot of the current Android screen.

Returns an image object that can be viewed by the LLM.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:270-270 (registration)
    The @mcp.tool() decorator registers the mobile_take_screenshot function as an MCP tool.
    @mcp.tool()
  • main.py:271-287 (handler)
    The handler function that captures the Android screen screenshot using uiautomator2, saves it as PNG bytes in memory, and returns it as a FastMCP Image object.
    def mobile_take_screenshot() -> Image:
        """Take a screenshot of the current Android screen.
        
        Returns an image object that can be viewed by the LLM.
        """
        if device is None:
            return "Error: Device not initialized. Please call mobile_init() first to establish connection with Android device."
        try:
            screenshot = device.screenshot()
        
            buf = io.BytesIO()
            screenshot.save(buf, format="PNG")
            img_bytes = buf.getvalue()
            return Image(data=img_bytes, format="png")
            
        except Exception as e:
            return f"Error taking screenshot: {str(e)}"
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the return type ('image object') but lacks critical details: whether this requires specific permissions, if it works on locked screens, potential latency, or error conditions. The description adds some value but leaves significant behavioral gaps.

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?

Two concise sentences with zero waste: first states the core action, second clarifies the return value. Perfectly front-loaded with essential information, no redundant phrasing or structural issues.

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 moderate complexity (device interaction with no parameters but no output schema), the description is minimally adequate. It covers purpose and return type but lacks behavioral context (permissions, constraints) that would be expected for a device control tool without annotations. The absence of an output schema means the description should ideally detail the image format or viewing method, which it only partially addresses.

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

Parameters4/5

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

The tool has 0 parameters with 100% schema description coverage (empty schema). The description appropriately doesn't discuss parameters since none exist, which aligns with the baseline expectation for parameterless tools. No additional parameter context is needed or provided.

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 ('Take a screenshot') and target resource ('current Android screen'), distinguishing it from sibling tools like mobile_dump_ui (which likely provides UI hierarchy data) or mobile_click (which performs interaction). It uses precise verb+resource phrasing without being tautological.

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

Usage Guidelines3/5

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

The description implies usage context (when you need a visual capture of the Android screen) but doesn't explicitly state when to use this versus alternatives like mobile_dump_ui for structural UI data. No guidance on prerequisites (e.g., device must be unlocked) or exclusions is provided.

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

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/erichung9060/Android-Mobile-MCP'

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