Skip to main content
Glama

sensor.set

Set raw sensor readings—accelerometer, gyroscope, orientation, ambient light—for a page, and mark sensors unavailable to test missing-sensor fallbacks.

Instructions

Set one raw sensor reading: accelerometer, linear-acceleration, gravity, gyroscope or magnetometer take x/y/z; absolute-orientation and relative-orientation take a quaternion x/y/z/w; ambient-light takes value in lux. available:false makes the page see the sensor as missing, which is how to test the "no gyroscope" fallback.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "type": "<type>"
    },
    "name": "sensor.set"
  }
}

Input Schema

NameRequiredDescriptionDefault
wNo
xNo
yNo
zNo
typeYesaccelerometer, linear-acceleration, gravity, gyroscope, magnetometer, absolute-orientation, relative-orientation, ambient-light.
valueNoFor ambient-light, in lux.
availableNofalse reports the sensor as absent on this device.
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

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and openWorldHint=true, so the mutating nature is known. The description adds genuine behavioral context — which fields each sensor type consumes and the effect of available:false on page-visible sensor availability — but says nothing about persistence, whether readings replace earlier ones, or interaction with recorded paths.

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?

A single dense sentence, front-loaded with the core action and followed by the type-to-field mapping and then the fallback-testing trick. Every clause carries information; only the quoted "no gyroscope" phrasing is slightly verbose.

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 9-parameter mutation tool with no output schema, the description covers the hard part — heterogeneous per-type field requirements and the available flag. Remaining gaps (targeting scope, whether a set persists across navigations) are secondary and partially handled by schema descriptions.

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 only 56%, and the description compensates well by mapping type values to parameter shapes (x/y/z for accel/gyro/mag, x/y/z/w quaternion for orientations, value in lux for ambient-light). It does not explain target_id or browser_id targeting, but the schema covers those.

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?

"Set one raw sensor reading" gives a specific verb plus resource, and the description enumerates the eight sensor types it accepts, so the agent knows exactly what operation it performs. It does not distinguish itself from siblings such as sensor.motion or sensor.reset, keeping it short of a 5.

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?

One concrete usage case is given: available:false to exercise a "no gyroscope" fallback. Otherwise there is no guidance on when to prefer this tool over sensor.motion, sensor.orientation or sensor.reset, so when-to-use is only partially implied.

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