Skip to main content
Glama

ACTION_GET_AUDIO_STATE

Checks whether music is currently playing and if a wired, USB, or Bluetooth headset is connected, returning audio state variables for workflow decisions.

Instructions

读取是否在播放音乐、是否连着耳机。输出:music_active, headset_connected, audio_state_success, audio_state_error。headset_connected 含有线/USB 耳机和蓝牙 A2DP。。字符串参数支持 ${var} 插值;结果以变量快照 JSON 返回。

Input Schema

NameRequiredDescriptionDefault
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

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does meaningful work: it lists the four result variables including an explicit success/error pair, and clarifies that headset_connected covers wired/USB and Bluetooth A2DP. It omits anything about permissions, foreground requirements, latency, or what audio_state_error contains when the read fails.

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?

Purpose is front-loaded in the first clause, followed by the output variable list, then the interpolation/return-format note. Dense and largely waste-free, though the closing sentence reads as framework boilerplate rather than tool-specific information.

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 exists, so the description must name return values and it does, covering both the data variables and the error variable, plus the JSON-snapshot return form. For a simple boolean-state reader this is nearly sufficient; only failure modes and preconditions are unaddressed.

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 three framework parameters (require, on_error, node_timeout_ms) are already documented, and the baseline is 3. The note that string parameters support ${var} interpolation adds a small amount of meaning beyond the schema, but nothing tool-specific about require or on_error is elaborated.

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 description opens with a concrete read action and names the exact states read (music playback, headset connection), which an agent can distinguish from the mutating siblings ACTION_MEDIA_CONTROL and ACTION_PLAY_MEDIA. It never explicitly names those siblings, so differentiation is by implication rather than statement.

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 when-to-use or when-not-to-use guidance, no mention of prerequisites, and no pointer to ACTION_MEDIA_CONTROL for the action side. The only cue is that it is a state query, which an agent must infer from the verb.

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