Skip to main content
Glama

ACTION_FLASHLIGHT

Turn the Android device flashlight on, off, or toggle it in automation workflows; track on/off state for reliable toggling when no direct status API is available.

Instructions

手电筒开关。输出:flashlight_success, flashlight_on。系统没有同步查询手电状态的 API:toggle 按本次运行记录的 flashlight_on 取反,没记录时一律打开。。字符串参数支持 ${var} 插值;结果以变量快照 JSON 返回。

Input Schema

NameRequiredDescriptionDefault
actionYeson/off/toggle
requireNo执行后要求为 true 的变量名(如 click_success),不满足按出错处理
on_errorNo节点出错时:skip=跳过继续(默认),stop=停止整个工作流
node_timeout_msNo单节点超时毫秒,0=不限;默认 30 分钟

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/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 add real behavioral detail: toggle is stateful per run and defaults to on without a prior record, there is no way to read the current flashlight state, string parameters accept ${var} interpolation, and results come back as a variable-snapshot JSON. It omits device-permission requirements and whether the light persists after the workflow ends.

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 compact clauses with the purpose front-loaded and no filler; the output variable names are stated up front where an agent will see them first. Minor blemishes: a duplicated "。。" and a slightly abrupt jump from toggle semantics to interpolation/return format.

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 compensates by naming both return variables (flashlight_success, flashlight_on) and the snapshot-JSON shape. For a simple one-enum actuator with fully documented parameters this is nearly sufficient, though it could note what happens on failure or whether the light state survives run completion.

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; the description earns above that by explaining the semantics of the `toggle` enum value (invert run-recorded state, else turn on) which the schema only labels as "on/off/toggle". It also clarifies that ${var} interpolation applies to string parameters such as `require`.

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 first clause "手电筒开关" names a specific resource plus the concrete action set (on/off/toggle) resolved through the `action` enum, so the agent knows exactly what the tool controls. It does not explicitly differentiate itself from adjacent hardware-control siblings such as ACTION_BRIGHTNESS or ACTION_SCREEN_WAKE, which keeps it one step below 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?

The note that no synchronous state-query API exists, and that toggle inverts the run-recorded flashlight_on (defaulting to on), implicitly steers the agent toward on/off when state is known. However, it never states the condition explicitly ("prefer on/off when you know the current state") and gives no exclusions or error-handling guidance for the non-toggle actions.

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