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
| Name | Required | Description | Default |
|---|---|---|---|
| w | No | ||
| x | No | ||
| y | No | ||
| z | No | ||
| type | Yes | accelerometer, linear-acceleration, gravity, gyroscope, magnetometer, absolute-orientation, relative-orientation, ambient-light. | |
| value | No | For ambient-light, in lux. | |
| available | No | false reports the sensor as absent on this device. | |
| target_id | No | Target handle (tgt_*). Omit for the active page. | |
| browser_id | No | Browser handle (br_*). Omit to use the only running browser, or auto-launch one. |