Skip to main content
Glama

Toggle media play/pause

services_media_play_pause

Toggle a media player between playing and paused via Home Assistant. Use for a simple play/pause action when checking current state first is unnecessary.

Instructions

Toggle a media player between playing and paused.

Calls media_player.media_play_pause with {"entity_id": entity_id} over HTTP; the resulting state depends on the player's current state.

Use when: a simple play/pause toggle is enough, without checking current state first. Returns: the list of states changed by the call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entity_idYesFull media_player entity ID to control, e.g. 'media_player.living_room'.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.25.1
    • addedInput schema / properties / entity_id / description
      Added value: +"Full media_player entity ID to control, e.g. 'media_player.living_room'."
  2. First observedv0.3.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare write semantics (readOnlyHint=false, idempotentHint=false, destructiveHint=false), and the description reinforces this usefully: the resulting state depends on the player's current state, which explains the non-idempotency, and it states the return is the list of changed states. It does not mention failure modes when the player is unavailable or unsupported.

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

Conciseness5/5

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

Four short sentences, front-loaded with the purpose, then implementation, when-to-use, and return shape. No sentence is redundant and the structure follows a natural read 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?

For a single-parameter action with an output schema and safety annotations, the description is essentially complete: purpose, mechanism, non-idempotent behavior, and selection guidance are all present. The return-value sentence is technically redundant given the output schema, which keeps it just short of a 5.

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% and the single entity_id parameter is fully documented in the schema, so the description adds no new parameter detail beyond restating that entity_id is passed. Baseline 3 applies when the schema does the heavy lifting.

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 ('Toggle a media player between playing and paused') and even names the underlying service call, so an agent knows exactly what happens. It is scoped to media players, which implicitly separates it from generic entities_toggle, but it does not explicitly name any sibling to route against.

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?

Provides an explicit 'Use when' clause ('a simple play/pause toggle is enough, without checking current state first') that gives actionable selection context. It stops short of naming an alternative or a 'when-not' case (e.g. when you want deterministic play vs pause), so it is clear but not fully prescriptive.

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