Skip to main content
Glama
appium

MCP Appium

Official
by appium

appium_get_window_size

Read-only

Need pixel coordinates for mobile gestures? Get device screen width and height in pixels to calculate tap, swipe, and scroll positions.

Instructions

Get the width and height of the device screen in pixels. Useful for calculating coordinates for swipes, taps, and scrolls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdNoSession ID; defaults to the active session.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.95.0
    • changedInput schema / properties / sessionId / description
      Previous value: -"Session ID to target. If omitted, uses the active session."New value: +"Session ID; defaults to the active session."
  2. First observedv1.92.11

TDQS

A4.3/5.0
Behavior4/5

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

No contradiction with annotations: readOnlyHint=true matches the read-only 'Get' wording. The description adds useful context beyond the annotation by specifying the result is the device screen dimensions in pixels rather than element-level or abstract coordinates.

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 short sentences with no redundancy: the first states the return value and unit, the second states the practical use case. Every sentence earns its place.

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?

The tool is simple: one optional parameter, read-only, and the return semantics are clear from 'width and height in pixels.' The description plus schema fully equip an agent to decide to call it and interpret the result.

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 100% and the only parameter, sessionId, is already documented as 'Session ID; defaults to the active session.' The description adds nothing needed about parameters, so the schema carries the burden.

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 names a specific verb and resource: 'Get the width and height of the device screen in pixels.' This clearly distinguishes the tool from sibling getters like appium_get_text, appium_get_element_attribute, appium_get_page_source, and appium_get_active_element.

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

Usage Guidelines4/5

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

It gives a concrete intended use: 'calculating coordinates for swipes, taps, and scrolls,' which tells an agent when to call it. It does not explicitly name exclusions or alternative tools, but for a simple screen-size query the context is clear enough.

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