Skip to main content
Glama
xzaleksey

open-mobile-mcp

by xzaleksey

get_viewport

Capture a device screenshot and retrieve its dimensions to compute accurate tap coordinates for UI automation.

Instructions

Capture screenshot of a device. Returns the image (resized to ~800px width for efficiency) and metadata with both resized and original dimensions. Use originalWidth/originalHeight for coordinate calculations when tapping. For Android, if logicalWidth/Height are provided, they represent the UI coordinate system which may differ from the physical screenshot pixels.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceIdYes
platformYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.4

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It transparently states that the image is resized to ~800px width for efficiency, returns both resized and original dimensions, and explains the Android logicalWidth/Height coordinate system discrepancy. This is valuable context beyond the tool name, though it doesn't mention side effects (likely read-only) or error conditions.

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 three sentences with no fluff. It front-loads the core action, then efficiently details the output format, resizing behavior, and the coordinate system caveat. Every sentence contributes directly to correct usage, and the structure is logical and easy to parse.

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?

Given the tool's low complexity (2 simple parameters, no output schema), the description provides all essential information: what it does, what it returns (image and metadata), how the returned dimensions should be used, and a platform-specific nuance. An agent can confidently invoke this tool without further clarification.

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?

Schema description coverage is 0%, so the description must compensate for parameter meaning. It mentions 'device' implicitly and the Android-specific note touches on the platform parameter, but it does not explicitly explain what deviceId or platform are used for. The parameters are simple and somewhat self-explanatory, but the description adds only partial contextual 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 clearly states the verb and resource: 'Capture screenshot of a device.' It also specifies the output (image and metadata), which distinguishes it from siblings like capture_diff or get_element_image. The purpose is unambiguous and immediately understandable.

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 provides implicit usage context by advising to use originalWidth/originalHeight for coordinate calculations when tapping, implying this tool is a precursor to tap actions. However, it does not explicitly mention when to use this tool over alternatives or any when-not-to-use cases. There is no comparison to sibling tools like capture_diff or get_element_image.

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