Skip to main content
Glama

sensor.orientation

Simulate device orientation angles or a named pose so deviceorientation events, compass and VR head-tracking fire on desktop browsers.

Instructions

Set how the device is held, so deviceorientation fires on a desktop: alpha (compass turn), beta (front-back tilt) and gamma (left-right tilt) in degrees, or a named pose (flat-face-up, portrait-upright, landscape-left, landscape-right). Angles given alongside a pose override it. For VR, aim the head instead: yaw/pitch/roll turn the head from the pose (default landscape-left, a phone in a headset), e.g. pitch:-30 to look down at a menu. This is the gyroscope a VR viewer, compass or tilt control reads.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "sensor.orientation"
  }
}

Input Schema

NameRequiredDescriptionDefault
yawNoHead turn left (+) / right (-) in degrees, about the vertical.
betaNoFront-back tilt, -180 to 180. 90 is upright in portrait (use 89: exactly 90 reads as null).
poseNoflat-face-up, portrait-upright, landscape-left (a phone in a VR headset) or landscape-right.
rollNoHead roll toward the right ear (+) in degrees.
alphaNoRotation about the vertical axis, 0-360.
gammaNoLeft-right tilt, -90 to 90. -90 is upright in landscape with the top to the left.
pitchNoHead tilt up (+) / down (-) in degrees.
absoluteNoAlso drive deviceorientationabsolute / AbsoluteOrientationSensor.
target_idNoTarget handle (tgt_*). Omit for the active page.
browser_idNoBrowser handle (br_*). Omit to use the only running browser, or auto-launch one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations are thin (readOnlyHint=false, openWorldHint=true), yet the description adds real behavioral context: the state feeds deviceorientation and is read by 'a VR viewer, compass or tilt control', and pose/angle precedence is stated. It stops short of disclosing persistence, whether the simulated state survives navigation, or how it is undone (a sensor.reset sibling exists but is never mentioned).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then modes, then the VR variant, then what consumes the value — no filler sentences. It is a single dense paragraph, so the mode and VR sections are slightly harder to scan than they would be as separate clauses, but nothing is redundant.

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?

For a 10-parameter, zero-required mutator with no output schema, the description covers the two main usage modes and their interaction well, and the plumbing params (target_id, browser_id, absolute) are fully documented in the schema. Minor gap: it never states what happens when no arguments are supplied outside the VR case, or that the setting can be cleared.

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 coverage is 100%, so the baseline is 3, but the description genuinely adds meaning beyond the field docs: 'Angles given alongside a pose override it' (precedence), and yaw/pitch/roll are defined as offsets from the pose with a stated default ('default landscape-left, a phone in a headset'). Those relational facts are not derivable from the schema alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a concrete verb and resource: 'Set how the device is held, so deviceorientation fires on a desktop', and enumerates the controlled channels (alpha/beta/gamma, named poses, VR yaw/pitch/roll). It is clear what the tool does. It does not, however, differentiate itself from the similarly-named sibling device.orientation or from sensor.motion, which an agent would plausibly confuse with it.

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?

Within the tool it routes usage well: use angles or a named pose for desktop deviceorientation, 'For VR, aim the head instead' with yaw/pitch/roll, and a concrete example ('pitch:-30 to look down at a menu'). It gives no when-not guidance or comparison to sibling sensor tools, so selection across the sensor family is still left to inference.

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

Deploy Server

Other Tools