Skip to main content
Glama

adb_sensor_read

Read current Android hardware sensor values over ADB, including last-known readings and timestamps. Filter by sensor category or list available sensors first to discover device capabilities.

Instructions

Read current hardware sensor values from the device. Enumerates all available sensors from sensorservice and returns their last-known readings with timestamps. Sensor availability is device-dependent — the tool reports what's present. No root required.

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": "adb_sensor_read"
  }
}

Input Schema

NameRequiredDescriptionDefault
deviceNoDevice serial
categoryNoFilter by sensor category: all, accelerometer, gyroscope, magnetometer, light, barometer, proximity, gravity, linear_accel, rotation, orientation, motion, step, temperatureall
listOnlyNoIf true, list available sensors without reading values (faster, useful for discovery)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.6
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changedv1.1.3
    • removedInput schema / additionalProperties
      Removed value: -false
  3. First observedv1.1.1

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does a fair job: it discloses the data source (sensorservice), the return shape (last-known readings with timestamps), that availability is device-dependent, and that no root is required. It omits permission implications for privileged sensors and whether readings can be stale or blocked.

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?

Four short sentences, front-loaded with the action and mechanism, then return shape, then the device-dependence caveat and the root note. Every sentence carries information; only minor tightening would be possible.

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?

No output schema and no annotations, so the description must cover return semantics — it does, stating that readings come with timestamps and that absent sensors simply aren't reported. Reasonably complete for a 3-parameter read-only tool, with only staleness/permission caveats missing.

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%, so the device, category enum, and listOnly flag are all already documented, including the performance tradeoff for listOnly. The description adds no extra meaning about filtering behavior or what 'all' entails, so the baseline 3 applies.

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?

States a specific verb and resource ('Read current hardware sensor values') plus the underlying mechanism ('Enumerates all available sensors from sensorservice'). This clearly distinguishes it from general-purpose siblings like adb_shell or adb_dumpsys, though it never explicitly contrasts with the closely related adb_iio_read or adb_thermal_snapshot.

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?

Usage is implied by the phrasing — read sensor values, or use the discovery mode when you only need the sensor list. There is no explicit when-to-use/when-not guidance and no named alternative for overlapping needs such as adb_iio_read or adb_orientation, leaving the agent to infer routing.

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