Skip to main content
Glama

ACTION_GET_SENSOR

Read a single light, proximity, or accelerometer sensor value to retrieve sensor data and success or error status, with a 3-second timeout for workflow decisions.

Instructions

读取一次光线、距离或加速度传感器的值。输出:sensor_value, sensor_type, sensor_success, sensor_error。只取首个读数的第一个分量(加速度为 X 轴);3 秒内没有读数即失败。。字符串参数支持 ${var} 插值;结果以变量快照 JSON 返回。

Input Schema

NameRequiredDescriptionDefault
typeNo传感器类型(默认 light)
requireNo执行后要求为 true 的变量名(如 click_success),不满足按出错处理
on_errorNo节点出错时:skip=跳过继续(默认),stop=停止整个工作流
output_varNo读数另存到的变量名(sensor_value 总会写)(默认 sensor_value)
node_timeout_msNo单节点超时毫秒,0=不限;默认 30 分钟

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

With no annotations, the description carries the full disclosure burden and does well: it declares the 3-second no-reading failure, the first-component-only behavior (X axis for accelerometer), the ${var} interpolation support, and the snapshot JSON return. It omits permission/auth requirements and does not explain what makes the read succeed or fail beyond the timeout.

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 the core action, then output fields, then constraints, with no filler sentences. A minor formatting blemish: a doubled Chinese full stop ('。。') and the trailing interpolation note sits slightly out of order.

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?

There is no output schema, and the description fills that gap by enumerating sensor_value, sensor_type, sensor_success, and sensor_error. Since no annotations exist, the disclosed timeout and failure behavior is necessary and present. It is not fully complete because sensor-specific semantics (for example, what a proximity value represents) and permission needs are unstated.

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 coverage is 100%, so all five parameters are already documented, establishing a baseline of 3. The description adds only the ${var} interpolation note and the first-component behavior, which is marginally useful but does not deepen the meaning of type, require, on_error, output_var, or node_timeout_ms.

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: reads one value from a light, proximity, or accelerometer sensor. That is clearly distinct from siblings such as ACTION_GET_BATTERY or ACTION_GET_DEVICE_INFO, though it never names an alternative or boundary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit when-to-use or when-not-to-use guidance, and no sibling alternative is mentioned. Usage is only implied by 'reads a single value', which an agent must infer.

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