Skip to main content
Glama

ACTION_PLAY_MEDIA

Play a local audio file and wait until playback finishes or the timeout stops it. Add sound cues to automated workflows with optional looping and timeout control.

Instructions

播放本地媒体文件(只出声),播完或超时才继续。输出:play_success, play_error, play_completed, play_duration_ms。到超时就停止播放。play_success 只表示开始播放成功,是否自然播完看 play_completed;loop=true 时永远播不完,到 timeout_ms 停止且 play_completed=false。。字符串参数支持 ${var} 插值;结果以变量快照 JSON 返回。

Input Schema

NameRequiredDescriptionDefault
loopNo循环播放(默认 false)
pathYes媒体文件路径,支持 ${var}
requireNo执行后要求为 true 的变量名(如 click_success),不满足按出错处理
on_errorNo节点出错时:skip=跳过继续(默认),stop=停止整个工作流
output_varNo成功时额外写 true 的变量名
timeout_msNo等待播放结束的毫秒数(最小 1000);不填=文件时长+3 秒,时长未知时 60 秒
node_timeout_msNo单节点超时毫秒,0=不限;默认 30 分钟

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/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 burden and does well: it enumerates the output variables (play_success, play_error, play_completed, play_duration_ms), clarifies that play_success only means playback started, and describes how loop=true interacts with timeout_ms (play_completed=false). It does not describe failure conditions for bad paths or unsupported formats beyond the play_error variable.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose is front-loaded, but the body is a run-on chain of clauses with a duplicated period ('。。') and the output list wedged mid-paragraph. Every sentence earns its place content-wise, yet the ordering and punctuation could be tightened considerably.

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 all four return variables and their semantics. With 7 parameters at full schema coverage, the remaining gaps (require/on_error/output_var behavior) are documented in the schema itself, so the definition is essentially complete for correct invocation.

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, but the description adds real meaning beyond the schema: the loop/timeout interaction and the distinction between 'started' and 'completed' are not derivable from the parameter docs alone. It also reiterates ${var} interpolation for string parameters, which is already in the schema.

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: plays a local media file, audio-only, and blocks until playback finishes or times out. An agent can immediately tell what it does. It does not explicitly distinguish itself from the sibling ACTION_MEDIA_CONTROL, so it stops short of 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 Guidelines4/5

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

Explains the execution model clearly: it blocks, resumes only on completion or timeout, and stops playback when the timeout fires. That is enough to know when this node fits in a workflow. No explicit when-not guidance or named alternative (e.g. ACTION_MEDIA_CONTROL) is given.

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