Skip to main content
Glama

Get or lock display rotation

mobile_orientation

Read or set screen rotation for a logical Android display. Lock to 0-3, free to accelerometer, or get free/lock state and observed rotation.

Instructions

Read or set user rotation for one logical display. action lock uses rotation 0, 1, 2, or 3. action free lets the accelerometer decide. action get returns free or lock N, plus observedRotation from the live display when it is known.

Input Schema

NameRequiredDescriptionDefault
actionNoget
serialYesExact ADB serial from mobile_devices_list; never inferred when multiple devices exist
rotationNo
displayIdNoAndroid framework logical display ID, not a SurfaceFlinger physical ID

Output Schema

NameRequiredDescriptionDefault
rawNo
modeYes
rotationNo
displayIdYes
observedRotationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations declare a non-read-only, non-destructive, non-idempotent, closed-world mutation; the description adds real behavioral detail beyond that, notably that 'free' delegates to the accelerometer and that 'get' returns 'free' or 'lock N' plus observedRotation when known. It leaves out any note on permission requirements or what happens to a locked display across reboots/disconnects.

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?

Three tight sentences, each carrying distinct information (scope, lock/free semantics, get semantics). The read-or-write framing is front-loaded and nothing is padded.

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?

An output schema exists, so the return-value sentence is bonus rather than a requirement. Scope, action semantics, and the display-ID caveat (carried in the schema) together cover what an agent needs; only behavioral edge cases and the exact serial requirement (schema-only) are left unaddressed here.

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?

Schema description coverage is only 50% (serial and displayId are documented; action and rotation are not). The description compensates by enumerating the action values and tying rotation 0-3 specifically to the lock action, which the schema's bare 0-3 enum does not explain.

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?

States a specific verb pair and resource: 'Read or set user rotation for one logical display.' No sibling tool touches rotation, and the display scoping ('one logical display') is stated up front, so an agent can place it immediately.

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?

The description disambiguates the three actions concretely: 'lock' consumes rotation 0-3, 'free' hands control to the accelerometer, 'get' reports state. That is clear per-action context, though it does not explicitly frame when a caller should prefer get vs lock vs free (e.g. before asserting orientation in a test).

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