Skip to main content
Glama

Take a screenshot

android_screenshot
Read-only

Capture the device screen as a PNG to confirm layout changes or inspect crashes, with optional file output.

Instructions

Capture the device screen as a PNG.

By default the image is returned inline so it can be looked at directly. Screenshots are large — a phone screen is typically 0.5–2 MB, and a tablet more — so when you only need the file (for a report, or to diff later), pass output_path and set include_image=false to keep it out of the conversation.

To read UI text or find something to tap, android_dump_ui is far cheaper than a screenshot and gives exact coordinates.

Args:

  • serial (string, optional): target device

  • output_path (string, optional): absolute path to also write the PNG to

  • include_image (boolean): return the image inline (default: true)

Returns: Inline image plus: { "bytes": number, "outputPath": string, "serial": string }

Examples:

  • Use when: confirming a layout change actually rendered as intended

  • Use when: the app crashed and you want to see what is on screen

  • Don't use when: you need the text of a view or somewhere to tap (use android_dump_ui)

Error Handling:

  • A black or empty image usually means a secure window (FLAG_SECURE) or a locked screen

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serialNoDevice serial from android_list_devices. Optional when exactly one device is connected; required when several are.
output_pathNoAbsolute path to write the PNG to, in addition to returning it.
include_imageNoReturn the image inline. Set false to only write it to output_path.
Behavior5/5

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

Annotations already declare readOnlyHint=true, but the description adds substantial behavioral context: typical screenshot sizes (0.5–2 MB), default inline return, the effect of output_path and include_image, and error handling for black/empty screens (secure window or locked screen). This fully discloses operational nuances beyond the annotations.

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 compact yet well-structured, using sections for overview, args, returns, examples, and error handling. Every sentence contributes value, with no redundancy or fluff. Front-loading the core purpose makes it immediately scannable.

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

Completeness5/5

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

Even without an output schema, the description fully documents the return format (inline image plus JSON with bytes, outputPath, serial) and common failure mode (black image). It covers size implications, optional parameters, and practical usage scenarios, making it complete for the tool's complexity.

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

Parameters5/5

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

Schema covers all three parameters with descriptions (100% coverage), and the description goes further by explaining the rationale for include_image=false (avoid large images in conversation) and the optional nature of serial when a single device is connected. This adds meaning beyond the schema.

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 opens with 'Capture the device screen as a PNG', a specific verb+resource statement. It also explicitly distinguishes from sibling android_dump_ui by noting that for UI text or tapping, dump_ui is cheaper and provides coordinates, making the tool's unique scope clear.

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

Usage Guidelines5/5

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

Provides explicit 'Use when' and 'Don't use when' guidance, along with a named alternative (android_dump_ui). It also advises when to set include_image=false to avoid large images cluttering the conversation, giving concrete contextual direction.

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/jjs03111/android-build-mcp'

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